Repository navigation
Add isolated asymmetric signing for Topcoder access tokens - #57
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.
Topcoder login tokens currently use a shared HMAC key distributed to API verifiers. This adds an RS256 signing path backed by an isolated AWS KMS RSA key, while retaining the Topcoder issuer. The private key stays in KMS; the new public
/v6/authorizations/.well-known/jwks.jsonendpoint exposes verification keys only.Login and service-account authorization still construct claims after existing authentication and role lookup. RS256 binds issuer, API audience, user subject, issuance time, expiry and token ID on the server. Signing failures never fall back to HMAC. The infrastructure template limits signing to a dedicated Identity task role, explicitly denies other principals and retains keys on stack deletion.
Deployment is staged: the default remains HS256 until the coordinated issuer/verifier cutover. Public keys can be published beforehand.
docs/asymmetric-access-tokens.mddocuments configuration, key isolation, browser refresh compatibility, retiring keys and the fleet migration with tc-core-library-js PR #8. No KMS resources are created by application startup, and the existing one-time-proof key remains separate.Validation: 46 targeted signer, public-route and authorization tests pass; changed-file lint, application build and CloudFormation template validation pass. The full suite has the same nine failing suites / 67 failing tests on the unchanged develop baseline; the new signer tests pass. Production asymmetric signing has not been enabled by this PR.