Repository navigation
feat: machine-agent-identity grants and admin surface - #38
Merged
Merged
Conversation
- getToken: client_credentials (secret or RFC 7523 client_assertion) and RFC 8693 token exchange (subject/actor token, RFC 8707 resource); only set params are sent. Server-side-only warning in JSDoc. - AuthorizerAdmin: clients, trusted issuers (graphql + rest), and graphql-only organizations, org members, org OIDC/SAML connections, SCIM endpoints — no grpc-gateway routes exist for those yet. - export grant-type / token-type / client-assertion-type constants - unit tests assert exact request bodies with mocked fetch
RFC 6749 token requests must be form-encoded. The server binds most params from JSON too, but reads the RFC 8707 resource param only via PostForm, so token exchange silently failed with a JSON body. Security review caught this; mocked tests now assert the content type.
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.
What
Brings the SDK up to date with the server's machine-agent-identity program.
getToken
client_credentialsgrant:client_secret,scope, secretlessclient_assertion(_type)subject_token(_type),actor_token(_type),resourcecode/code_verifieronly sent forauthorization_codeclient_secretin a browser bundleGRANT_TYPE_*,TOKEN_TYPE_*,CLIENT_ASSERTION_TYPE_JWT_BEARERAuthorizerAdmin — 27 new methods
graphql+rest(grpc-gateway routes verified against serveradmin.proto)adminSignup/generateJWTKeysschema.graphqls; secret-shown-once semantics documented onCreateClientResponse/ SCIM token rotationTesting
npm run build(tsup ESM/CJS/DTS) +npm run lintpass__test__/tokenGrants.test.ts: 11 unit tests (mocked fetch) asserting exact/oauth/tokenbodies for both grants, secretless assertion, subject_token validation, refresh regression, OAuth error surfacing, admin graphql/REST dispatch + unwrap, graphql-only rejection over rest