fix(agent): drop --org from enrollkey, derive org from the key#30
Merged
Conversation
The org is always the one the FREEFORM key resolves to, so requiring --org was redundant and a footgun — passing the key-order uuid (the segment after __ord__) instead of the org produced an opaque 'Not authorized'. Now the CLI sends no org and uses the new AgentSigningKeyInput. Simplifies runEnrollkey to the AGENT path (the unreachable committer branch is removed; operator committer enrol stays on the JWT mutation). Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Match the flag removal — org is derived from the calling key. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rearm agent enrollkeyno longer takes--org. The org is always the one the FREEFORM key resolves to, so requiring it was redundant and a footgun: passing the key-order uuid (the segment after__ord__in the key ID) instead of the org produced an opaqueNot authorized.AgentSigningKeyInput.runEnrollkeysimplified to the AGENT path; the unreachable committer branch is removed (operator committer enrol stays on the JWTenrollSigningKeymutation).Requires
Backend: relizaio/rearm-saas#193 (adds
AgentSigningKeyInput). Deploy that first — the new mutation arg type won't exist on older backends.Test plan
rearm agent enrollkey --agent <uuid> --format SSH --pubkey-file <f> --identity <email>enrols without--org--helpno longer lists--org