Skip to content

Commit b6b8d60

Browse files
committed
minor edits, add link to github issues
1 parent 1211711 commit b6b8d60

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

draft-parecki-oauth-identity-assertion-authz-grant.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -465,16 +465,16 @@ AI agents, including those based on large language models (LLMs), are designed t
465465
### Preconditions
466466

467467
* The LLM Agent has a registered OAuth 2.0 Client (`com.example.ai-agent`) with the Enterprise IdP (`cyberdyne.idp.example`)
468-
* The LLM Agent has a registered OAuth 2.0 Client (`com.example.ai-agent`) with the External Tool Application (`saas.example.com`)
468+
* The LLM Agent has a registered OAuth 2.0 Client (`4960880b83dc9`) with the External Tool Application (`saas.example.net`)
469469
* Enterprise has established a trust relationship between their IdP and the LLM Agent for SSO
470470
* Enterprise has established a trust relationship between their IdP and the External Tool Application for SSO and Identity Assertion Authorization Grant
471471
* Enterprise has granted the LLM Agent permission to act on behalf of users for the External Tool Application with a specific set of scopes
472472

473-
### LLM Agent establishes a User Identity with Enteprise IdP
473+
### LLM Agent establishes a User Identity with Enterprise IdP
474474

475475
LLM Agent discovers the Enterprise IdP's OpenID Connect Provider configuration based on a configured `issuer` that was previously establshed.
476476

477-
> Note: IdP discovery where an agent discovers which IdP the agent should use to authenticate a given user is out-of-scope of this specification.
477+
> Note: IdP discovery where an agent discovers which IdP the agent should use to authenticate a given user is out of scope of this specification.
478478

479479
GET /.well-known/openid-configuration
480480
Host: cyberdyne.idp.example
@@ -504,11 +504,11 @@ LLM Agent discovers the Enterprise IdP's OpenID Connect Provider configuration b
504504

505505
LLM Agent discovers all necessary endpoints for authentication as well as support for the Token Exchange grant type `urn:ietf:params:oauth:grant-type:token-exchange`
506506

507-
> Note: Unfortunately Token Exchange {{RFC8693}} doesn't define an authorization server metadata parameter for `requested_token_types_supported` to discover if `urn:ietf:params:oauth:token-type:id-jag` is specifically supported so the LLM Agent needs to first attempt Token Exchange to learn if the specific Enterprise IdP supports issuing an Identity Assertion Grant.
507+
> Note: Token Exchange {{RFC8693}} doesn't define an authorization server metadata parameter for `requested_token_types_supported` to discover if `urn:ietf:params:oauth:token-type:id-jag` is specifically supported. Currently, the LLM Agent needs to first attempt Token Exchange to learn if the specific Enterprise IdP supports issuing an Identity Assertion Grant. This specification could define an Authorization Server Metadata {{RFC8414}} parameter to enable the agent to discover if this request is supported. See [issue #16](https://github.com/aaronpk/draft-parecki-oauth-identity-assertion-authz-grant/issues/16).
508508

509509
### IdP Authorization Request (with PKCE)
510510

511-
LLM Agent generates a `code_verifier` and a `code_challenge` (usually a SHA256 hash of the verifier, base64url-encoded) and redirects the end-user to the Enterprise IdP with an authorization request
511+
LLM Agent generates a PKCE `code_verifier` and a `code_challenge` (usually a SHA256 hash of the verifier, base64url-encoded) and redirects the end-user to the Enterprise IdP with an authorization request
512512

513513
GET /authorize?
514514
response_type=code
@@ -526,7 +526,7 @@ Enterprise IdP authenticates the end-user and redirects back to the LLM Agent's
526526

527527
https://ai-agent.example.com/oauth2/callback?code=SplxlOBeZQQYbYS6WxSbIA&state=xyzABC123
528528

529-
LLM Agent exchanges the `code` with PKCE `code_verifier` to obtain an ID Token and Access Token for the IdP's UserInfo endpoint
529+
LLM Agent exchanges the `code` and PKCE `code_verifier` to obtain an ID Token and Access Token for the IdP's UserInfo endpoint
530530

531531
POST /oauth2/token
532532
Host: cyberdyne.idp.example
@@ -566,40 +566,38 @@ LLM Agent now has an identity binding for context
566566

567567
### LLM Agent calls Enterprise External Tool
568568

569-
LLM Agent tool calls an external tool provided by an Enterprise SaaS Application(Resource Server) without a valid access token and is issued an authentication challenge using {{I-D.ietf-oauth-resource-metadata}}
569+
LLM Agent tool calls an external tool provided by an Enterprise SaaS Application (Resource Server) without a valid access token and is issued an authentication challenge using {{I-D.ietf-oauth-resource-metadata}}
570570

571-
> Note: How agents discover available tools is out-of-scope of this specification
571+
> Note: How agents discover available tools is out of scope of this specification
572572

573573
GET /tools
574-
Host: saas.example.com
574+
Host: saas.example.net
575575
Accept: application/json
576576

577-
HTTP/1.1 400 Bad Request
578-
WWW-Authenticate: Bearer error="invalid_request",
579-
error_description="No access token was provided in this request",
580-
resource_metadata=
581-
"https://saas.example.com/tools/.well-known/oauth-protected-resource"
577+
HTTP/1.1 401 Unauthorized
578+
WWW-Authenticate: Bearer resource_metadata=
579+
"https://saas.example.net/.well-known/oauth-protected-resource"
582580

583581
LLM Agent fetches the external tool resource's `OAuth 2.0 Protected Resource Metadata` per {{I-D.ietf-oauth-resource-metadata}} to dynamically discover an authorization server that can issue an access token for the resource.
584582

585-
GET /tools/.well-known/oauth-protected-resource
586-
Host: saas.example.com
583+
GET /.well-known/oauth-protected-resource
584+
Host: saas.example.net
587585
Accept: application/json
588586

589587
HTTP/1.1 200 Ok
590588
Content-Type: application/json
591589

592590
{
593591
"resource":
594-
"https://saas.example.com/tools",
592+
"https://saas.example.net/",
595593
"authorization_servers":
596594
[ "https://authorization-server.saas.com" ],
597595
"bearer_methods_supported":
598596
["header", "body"],
599597
"scopes_supported":
600598
["agent.tools.read", "agent.tools.write"],
601599
"resource_documentation":
602-
"https://saas.example.com/tools/resource_documentation.html"
600+
"https://saas.example.net/tools/resource_documentation.html"
603601
}
604602

605603
LLM Agent discovers the Authorization Server configuration per {{RFC8414}}
@@ -633,6 +631,8 @@ LLM Agent has learned all necessary endpoints and supported capabilites to obtai
633631

634632
If the `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type is supported the LLM can first attempt to silently obtain an access token using an Identity Assertion Authorization Grant from the Enterprise's IdP otherwise it can fallback to interactively obtaining a standard `authorization_code` from the SaaS Application's Authorization Server
635633

634+
> Note: This would benefit from an Authorization Server Metadata {{RFC8414}} property to indicate whether the Identity Assertion Authorization Grant form of `jwt-bearer` would be accepted by this authorization server. There are other uses of `jwt-bearer` that may be supported by the authorization server as well, and is not necessarily a reliable indication that the Identity Assertion Authorization Grant would be supported. See [issue #16](https://github.com/aaronpk/draft-parecki-oauth-identity-assertion-authz-grant/issues/16).
635+
636636
### LLM Agent obtains an Identity Assertion Grant for Enterprise External Tool from the Enterprise IdP
637637

638638
LLM Agent makes an Identity Assertion Grant Token Exchange {{RFC8693}} request for the external tool's resource from the user's Enterprise IdP using the ID Token the LLM Agent obtained when establishing an identity binding context along with scopes and the resource identifier for the external tool that was returned in the tool's `OAuth 2.0 Protected Resource Metadata`
@@ -643,7 +643,7 @@ LLM Agent makes an Identity Assertion Grant Token Exchange {{RFC8693}} request f
643643

644644
grant_type=urn:ietf:params:oauth:grant-type:token-exchange
645645
&requested_token_type=urn:ietf:params:oauth:token-type:id-jag
646-
&resource=https://saas.example.com/tools"
646+
&resource=https://saas.example.net/
647647
&scope=agent.read+agent.write
648648
&subject_token=eyJraWQiOiJzMTZ0cVNtODhwREo4VGZCXzdrSEtQ...
649649
&subject_token_type=urn:ietf:params:oauth:token-type:id_token
@@ -665,7 +665,7 @@ If access is granted, the Enterprise IdP creates a signed Identity Assertion Aut
665665
"expires_in": 300
666666
}
667667

668-
Identity Assertion Authorization Grant
668+
Identity Assertion Authorization Grant JWT claims:
669669

670670
{
671671
"alg": "ES256",
@@ -687,11 +687,11 @@ Identity Assertion Authorization Grant
687687

688688
### LLM Agent obtains an Access Token for Enterprise External Tool
689689

690-
LLM Agent makes a token request to the previously discovered external tool's Authorization Server token endpoint using the Identity Assertion Authorization Grant obtained from the Enterprise IdP as a JWT Assertion as defined by {{RFC7523}}.
690+
LLM Agent makes a token request to the previously discovered external tool's Authorization Server token endpoint using the Identity Assertion Authorization Grant obtained from the Enterprise IdP as a JWT Assertion as defined by {{RFC7523}}.
691691

692-
The LLM Agent authenticates with it's client credentials that were registered with the SaaS Authorization Server
692+
The LLM Agent authenticates with its client credentials that were registered with the SaaS Authorization Server
693693

694-
> Note: How the LLM Agent registers with the Authorization Server (e.g static or dynamic client registration) is out-of-scope of this specification
694+
> Note: How the LLM Agent registers with the Authorization Server (e.g static or dynamic client registration), and whether or not it has credentials, is out-of-scope of this specification
695695

696696
POST /oauth2/token HTTP/1.1
697697
Host: authorization-server.saas.com
@@ -720,7 +720,7 @@ SaaS Authorization Server validates the Identity Assertion Authorization Grant u
720720
LLM Agent tool calls an external tool provided by the Enterprise SaaS Application (Resource Server) with a valid access token
721721

722722
GET /tools
723-
Host: saas.example.com
723+
Host: saas.example.net
724724
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA"
725725
Accept: application/json
726726

0 commit comments

Comments
 (0)