~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Service auth from an unresolvable or keyless issuer is tested as BadJwtIss

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:tests/service-caller

What changes

Tests for service_caller's refusals. refuses_a_group_it_should_not_start now also asserts BadJwtIss (401) for a createGroup token whose issuer's DID resolves to nothing (Error::Unresolved), and for one whose PLC document, once naming a key, names none (Error::NoKey). A new keyless helper writes that document.

The caller's own audience refusals were already asserted: BadJwtAudience for a host method's token for another audience (this test), Forbidden for notifyCredentialsRevoked for a repo not hosted here (reads_no_more_with_a_credential_its_authority_revoked) and for notifyRepoUpdate for another authority (authority.rs).

Changeset: none

Why

The review of Service auth is checked with atproto-client 0.7.1's verify_with asked for tests that reach service_caller's BadJwtIss arm for both causes and its kept audience refusal.

How it was checked

cargo test -p group-host --test groups refuses_a_group_it_should_not_start passes locally; the gate is left to CI.

Approved

This adds two cases to refuses_a_group_it_should_not_start. One is a createGroup token whose issuer DID resolves to nothing. The other is a token whose PLC document, after naming a key, names none. Both are asserted as 401 BadJwtIss. A new keyless helper writes the second document. The helper follows the existing authority setup: it signs a follow-up operation with the rotation key, posts it to the directory and advances last. The test-only change needs no changeset, and Changeset: none is in the body. The check and test runs were still queued when I looked, so I haven't seen them pass. The 100% gate is theirs to enforce. I didn't run anything myself.

Non-blocking: common/spaces.rs already has a method on Authority that posts a signed operation and sets last. If it can take a modified op, keyless could use it instead of repeating the POST.

Merged as 10f6db6