Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported multiples audience for a SSO (Zitadel) #929

Closed
perrze opened this issue Dec 23, 2023 · 8 comments
Closed

Unsupported multiples audience for a SSO (Zitadel) #929

perrze opened this issue Dec 23, 2023 · 8 comments

Comments

@perrze
Copy link

perrze commented Dec 23, 2023

Hi,
I tried to connect Warpgate to a ZITADEL SSO.
Problem, this OIDC provider send multiples strings for the aud claims.
Example:

"aud": [
    "246260630850437123@project",
    "246263290592821251@project_old_name",
    "246361787010646019" // Project ID
]

I guess that Warpgate want that there is only the client ID in the aud claims.

I tried looking at the Warpgate code, didn't understand where I could modify it.

When I tries to connect, it raises : (SsoError::ClaimsVerification)
claims verification error: Invalid audiences: "246361787010646019" is not a trusted audience

Does a fix exist (in code or in config) to allow this ?

Thanks for your help !

@linhxhust
Copy link

Me too. Please help me to fix it.

@Eugeny
Copy link
Member

Eugeny commented Jan 13, 2024

Multiple audiences should already be supported, what does your SSO section of the config file look like? Particularly, what's the client_id value?

@perrze
Copy link
Author

perrze commented Jan 13, 2024

The client ID is the first entry in thé aud scope: "246260630850437123@project"

And both "246263290592821251@project_old_name"and "246361787010646019" will trigger the error.
The scopes that I request is "roles"

@Eugeny Eugeny closed this as completed in 75a2b8c Jan 13, 2024
@Eugeny
Copy link
Member

Eugeny commented Jan 13, 2024

Thanks - I've added an additional_trusted_audiences provider option (array of strings) where you can add the other audiences. Per the OIDC spec clients have to reject any additional audiences unless explicitly trusted ✌️

@perrze
Copy link
Author

perrze commented Jan 13, 2024

Thanks for your help !

@WilliamB78
Copy link

WilliamB78 commented Aug 8, 2024

Sorry to dig this issue up, but i tried to add the following config with the last version of warpgate (0.10.1) and it does not seem to work, any idea @Eugeny ?

sso_providers:
   - name: custom
     provider:
     ...
       additional_trusted_audiences: ["123456789098765432"]
     ...

@Eugeny
Copy link
Member

Eugeny commented Aug 14, 2024

@WilliamB78 are you getting the same error as OP? (not a trusted audience)

@WilliamB78
Copy link

@Eugeny Yes i am getting this error :

claims verification error: Invalid audiences: 123456789098765432 is not a trusted audience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants