You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-parecki-oauth-identity-assertion-authz-grant.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -465,16 +465,16 @@ AI agents, including those based on large language models (LLMs), are designed t
465
465
### Preconditions
466
466
467
467
* 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`)
469
469
* Enterprise has established a trust relationship between their IdP and the LLM Agent for SSO
470
470
* Enterprise has established a trust relationship between their IdP and the External Tool Application for SSO and Identity Assertion Authorization Grant
471
471
* Enterprise has granted the LLM Agent permission to act on behalf of users for the External Tool Application with a specific set of scopes
472
472
473
-
### LLM Agent establishes a User Identity with Enteprise IdP
473
+
### LLM Agent establishes a User Identity with Enterprise IdP
474
474
475
475
LLM Agent discovers the Enterprise IdP's OpenID Connect Provider configuration based on a configured `issuer` that was previously establshed.
476
476
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.
478
478
479
479
GET /.well-known/openid-configuration
480
480
Host: cyberdyne.idp.example
@@ -504,11 +504,11 @@ LLM Agent discovers the Enterprise IdP's OpenID Connect Provider configuration b
504
504
505
505
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`
506
506
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).
508
508
509
509
### IdP Authorization Request (with PKCE)
510
510
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
512
512
513
513
GET /authorize?
514
514
response_type=code
@@ -526,7 +526,7 @@ Enterprise IdP authenticates the end-user and redirects back to the LLM Agent's
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
530
530
531
531
POST /oauth2/token
532
532
Host: cyberdyne.idp.example
@@ -566,40 +566,38 @@ LLM Agent now has an identity binding for context
566
566
567
567
### LLM Agent calls Enterprise External Tool
568
568
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}}
570
570
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
572
572
573
573
GET /tools
574
-
Host: saas.example.com
574
+
Host: saas.example.net
575
575
Accept: application/json
576
576
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",
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.
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
633
631
634
632
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
635
633
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
+
636
636
### LLM Agent obtains an Identity Assertion Grant for Enterprise External Tool from the Enterprise IdP
637
637
638
638
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
@@ -665,7 +665,7 @@ If access is granted, the Enterprise IdP creates a signed Identity Assertion Aut
665
665
"expires_in": 300
666
666
}
667
667
668
-
Identity Assertion Authorization Grant
668
+
Identity Assertion Authorization Grant JWT claims:
669
669
670
670
{
671
671
"alg": "ES256",
@@ -687,11 +687,11 @@ Identity Assertion Authorization Grant
687
687
688
688
### LLM Agent obtains an Access Token for Enterprise External Tool
689
689
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}}.
691
691
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
693
693
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
695
695
696
696
POST /oauth2/token HTTP/1.1
697
697
Host: authorization-server.saas.com
@@ -720,7 +720,7 @@ SaaS Authorization Server validates the Identity Assertion Authorization Grant u
720
720
LLM Agent tool calls an external tool provided by the Enterprise SaaS Application (Resource Server) with a valid access token
0 commit comments