[PoC] code chain grant implementation + agent chat example#153
Open
patatoid wants to merge 33 commits into
Open
[PoC] code chain grant implementation + agent chat example#153patatoid wants to merge 33 commits into
patatoid wants to merge 33 commits into
Conversation
7f97e4c to
335b105
Compare
e3d56b5 to
6b01936
Compare
d626aa1 to
4698af4
Compare
f02743c to
c301488
Compare
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.
Mixed Authentication Model
This example highlights that the same authorization chain can combine different kinds of actors and proofs while keeping an auditable code chain:
id_tokenpresentation proves control of a wallet credential and creates the first authorization code in the chain.authorization_coderequest brings a normal user-facing OAuth authorization step into the same chain.id_tokenwithgrant_type=code_chain, allowing non-human agents to advance the chain.Scopes can also be requested and authorized at each level of the chain. A wallet-backed step can authorize credential-related scopes, a user-facing browser step can authorize user scopes, and a machine handoff can request scopes for the receiving agent’s responsibilities. The authorization codes produced at those steps can then be exchanged for access tokens or a verifiable credentials associated with the corresponding actor, proof, and authorized scopes.
Each step consumes the previous authorization code and produces the next one, so the workflow remains linked from the wallet-originated proof, through user authorization, through machine-to-machine agent handoffs. This keeps the full mixed-authentication workflow traceable as one auditable chain instead of splitting it into separate flows.
Summary
Adds a browser-bootstrapped agent chat example that demonstrates Boruta’s authorization code chain across a multi-agent workflow, with a mixed
id_token/authorization_code/code_chainpipeline.The flow starts with a browser
id_tokenpresentation, continues through agent-to-agentcode_chainhandoffs, then inserts a browserauthorization_coderequest before the final writer step.user -> plannerid_tokenpresentation.response_type=id_tokenwith the credential scope.planner -> researcher/security/implementerid_tokencontaining its message.id_tokenwith the sender’s latest authorization code usinggrant_type=code_chain.authorization_code, making each handoff part of the chain.researcher/security/implementer -> merger -> criticcode_chainpattern:authorization_codeid_tokenauthorization_codereturned by/oauth/tokencritic -> writerauthorization_coderequest.response_type=codeand includes the previous chained code.How to run
Start Boruta locally, configure the example client, then run the script:
Configure the example client (quickstart) then add
http://127.0.0.1:8765/oauth-callbackas an authorized redirect urirun the script
Example output
Notes