Validate and register fmsgid addresses before issuing CLI API keys - #40
Merged
Merged
Conversation
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.
The operator CLI can currently print an API key for an address that is absent from fmsgid, leaving the key unusable at token exchange. Validate addresses before persisting a grant, and automatically register derived addresses using the same flow as the self-service API.
api-key createrequires an existing, accepting owner, registers the derived address with fmsgid's default quotas, then verifies that address before storing the key. Existing address settings are preserved.create-delegationrequires both addresses to exist and accept messages; it does not provision delegated addresses.Validation:
go build ./...,go vet ./..., andgo test -race ./...pass with PostgreSQL integration tests enabled. New tests cover CLI registration and rejection paths, persisted grants and successful token exchange, rejection of unregistered derived identities, malformed responses, service-specific caching, registration cache invalidation, and address escaping. The lookup regressions reproduced the failures before the fixes.GitHub build, vet, and race tests passed for
db6a6b584ae493c54cd6c64be4d37c84acdec35c.Cross-service validation: fmsg-docker integration run passed all 15 tests. The harness used merged Docker main (
183133e8bbdfa286609221af5c8e8ba83dbfeb71),api-key-checksatdb6a6b584ae493c54cd6c64be4d37c84acdec35cfor fmsg-webapi, and main for the other components. No companion branches were used.