OpenID Connect and OAuth
Cross-application access (ID-JAG)
On this page
Introduction
When Ada has signed in to Acme's chat application through Signari, the chat application can reach another application on her behalf. There is no redirect and no second consent screen. The chat application gets a signed grant from Signari, a JSON Web Token (JWT, see the glossary) called an Identity Assertion JWT Authorization Grant (ID-JAG).
It trades that grant at the other application's "authorization server", the service that issues its tokens, for an access token. The other application accepts Signari's statement of who Ada is. An administrator decides which application can reach which, and Ada sees no popup.
This follows
draft-ietf-oauth-identity-assertion-authz-grant, on datatracker.ietf.org.
Signari does both halves, and you can use one of them or both. As the identity
provider, you allow each application with signari client id-jag-allow.
As the identity provider
Signari issues nothing until you write down which application may ask, for which
authorization server, and the most it may carry there. These commands allow
chat-app one entry, list its entries, and remove the entry again:
Shellsignari client id-jag-allow -client-id chat-app \ -audience https://as.files.example/ -remote-client-id f53f191f \ -resources https://api.files.example/ -scopes files.readsignari client id-jag-audiences -client-id chat-appsignari client id-jag-forget -client-id chat-app -audience https://as.files.example/
-audience is the other authorization server's issuer identifier.
-remote-client-id is what that server calls this application, which need not be
what it is called at Signari.
Grants are signed with RS256, which the draft makes mandatory, unless
-alg ES256 says otherwise. An entry is refused unless the instance holds an
active key of that algorithm.
The application then makes a token exchange, authenticated, with the ID token it was given at sign-in:
Textgrant_type=urn:ietf:params:oauth:grant-type:token-exchangerequested_token_type=urn:ietf:params:oauth:token-type:id-jagaudience=https://as.files.example/resource=https://api.files.example/scope=files.readsubject_token=<the ID token>subject_token_type=urn:ietf:params:oauth:token-type:id_token
It gets back a grant good for five minutes, in access_token. Its token_type is
N_A, because it is not an access token.
Signari checks all of these:
- The application is confidential and authenticated. A public client gets
invalid_client. - The subject token is an ID token Signari issued to this application, and in date. An access token, a grant or a signed userinfo response is refused. So is one from another application.
- The sign-in behind it still stands. The session is read at the request. So somebody signed out or deactivated since gets nothing from an ID token that has not expired yet.
- There is an entry for this application and that audience. A request for an
authorization server that no application here has an entry for is
invalid_target. One that another application has an entry for isaccess_denied. So the application can tell a mistaken request from one that needs an administrator to grant access. - Each
resourceandscopeis on the entry. Scopes mean what the other server says, so nothing on the entry is read as OpenID Connect's. Asking for none grants none. - A person who withdrew this application's access on their account page gets
access_denied. Your access policy is asked, as it is for any grant.
The grant carries these claims:
sub, the person's identifier at Signari, whatever the application's ID token said;client_id, the application's name over there;tenant, the organisation, since an instance can hold several;email;auth_time,acrandamr, from the sign-in.
Each grant issued is recorded as oauth.id_jag_issued, with its audience,
resources and scopes. These events show when an application starts reaching a new
audience.
The discovery document names identity_chaining_requested_token_types_supported
once there is an entry.
As the application's authorization server
Here Signari is the receiving side. A grant from another identity provider is presented as an RFC 7523 assertion. So it arrives the way a jwt-bearer grant assertion does, and everything that grant requires holds:
- The issuer is a provider you registered and enabled for that grant.
- The application is paired with it.
- The signature verifies against that provider's keys.
- The person is linked and active.
A typ of oauth-id-jag+jwt adds to that:
audis Signari's issuer, not its token endpoint as a plain assertion may say.client_idis the application that authenticated, or the grant was issued to somebody else.- Each
resourceis one this organisation governs, and the access token is restricted to those. scopegrants no more than the application is registered for.openidis never available, since nobody signed in here. With noscope, it gets the application's registration.
No refresh token comes back. The grant is what an application presents again, and
it can do that once, since each grant's jti is spent. To get another, the
application makes another token exchange.
The discovery document names authorization_grant_profiles_supported. That says
the profile is implemented, and nothing about whose grants are taken.
Signari identifies the person from the provider's link to sub. So somebody who
has never signed in through that provider is refused. No account is created
from a grant's email.
What is not here
- A refresh token, or an assertion in Security Assertion Markup Language
(SAML), as
subject_token. The draft requires only that an identity assertion is taken, and ID tokens are. An application whose ID token has expired gets another by refreshing. authorization_detailsin a grant, which is refused. Signari has no policy for which details to allow when no person is there to approve them.actor_token, which the draft leaves to future work and which is ignored.- A sender-constrained grant (§9.11). Both ends always authenticate the
application, and a grant carrying
cnfis refused, since the proof it asks for cannot be checked here. - An issuer that serves several organisations, on the accepting side. A
provider is one issuer. So a provider whose organisations, its "tenants", share
an issuer cannot be told apart by
tenant.aud_tenantandsub_idare not read.
Changed Signari v0.2