JanssenProject / jans

An open source enterprise digital identity platform for CIAM or workforce... Janssen is a distribution of standards-based, developer friendly, components that are engineered to work together in any cloud. #OAuth #OpenID #FIDO
https://docs.jans.io
Apache License 2.0
459 stars 73 forks source link

feat(jans-cedarling): Parse access_token -- create Access Token and Workload entities #9588

Open olehbozhok opened 1 week ago

olehbozhok commented 1 week ago

Is your feature request related to a problem? Please describe. To make the authorization request we need:

Describe the solution you'd like

Additional context

The access token is issued based on a request to the OAuth /token endpoint, which requires client authentication. This authenitcation proves which workload authenticated.

An id_token is a JWT issued to detail a User authentication event (i.e. User = human). It tells you who authenticated (the subject or sub), when the person authenticated (authn_time), how they authenticated (acr). The id_token also tells you the aud -- i.e. to which workload this token was issued. But the id_token itself does not prove any client authentication--the only place the client authenticates is at the /token endpoint. In OpenID, sometimes an id_token is returned without client authentication (i.e. PKCE flow or implicit flow).

nynymike commented 1 week ago

Looks good.

olehbozhok commented 5 days ago

It looks like it has sense to cache only when CEDARLING_JWT_VALIDATION has value Enabled

But we have no implementation to this.

Only for Disabled. And in this case, all we do it is decoding base64 and parsing JSON

In the current sparKV implementation, we store data in string. So using the cache we also need to parse JSON. So using cache for Disabled value has no sense...