Skip to content

Allow configuring valid audiences #3456

Description

@butonic

When an OpenID Connect identity provider issues access tokens for multiple applications, an access token for e.g. Immich could be used for OpenCloud. The

From https://www.rfc-editor.org/info/rfc7519/#section-4.1.3

4.1.3.  "aud" (Audience) Claim

   The "aud" (audience) claim identifies the recipients that the JWT is
   intended for.  Each principal intended to process the JWT MUST
   identify itself with a value in the audience claim.  If the principal
   processing the claim does not identify itself with a value in the
   "aud" claim when this claim is present, then the JWT MUST be
   rejected.  In the general case, the "aud" value is an array of case-
   sensitive strings, each containing a StringOrURI value.  In the
   special case when the JWT has one audience, the "aud" value MAY be a
   single case-sensitive string containing a StringOrURI value.  The
   interpretation of audience values is generally application specific.
   Use of this claim is OPTIONAL.

Currently, OpenCloud does not verify this "aud" claim. We should create an env var PROXY_OIDC_AUDIENCES or OIDC_AUDIENCES to configure an optional list of valid audiences. Default is empty, since Use of this claim is OPTIONAL.

cc @dragotin @rhafer @pbleser-oc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions