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

Multiple Client IDs per OIDC Issuer? #7251

Open
mrdrogdrog opened this issue Oct 21, 2023 · 9 comments
Open

Multiple Client IDs per OIDC Issuer? #7251

mrdrogdrog opened this issue Oct 21, 2023 · 9 comments
Labels
question Further information is requested

Comments

@mrdrogdrog
Copy link

mrdrogdrog commented Oct 21, 2023

Describe your question
Hello 👋 ,

is it possible to use different OIDC client ids that work on the same issuer?
I try to setup a software which consists of multiple different parts:

  • A server, which gets the client id for the web client and the OIDC issuer URL
  • A web client (provided by the server), which uses public client type and redirects back to the URL of the application
  • A desktop client, which uses confidential client type and redirect to 127.0.0.1
  • An app client, which uses confidential client type and redirects to an unknown url

In my first run i've setup the server (and therefore also the web client). I've created an OIDC provider and an application in authentik. Everything works fine so far.
If I use the desktop client or the app then it doesn't work anymore. Both of these force specific client ids and secrets. Therefore I've created more OIDC providers and applications with the requested client id and secret because apparently there is no way to assign multiple provders to one application or multiple client ids to one issuer.
I can get through the login flow with these but then the server says that the provided JWTs are invalid because the issuer is invalid.

Have I missed anything or am I right and this kind of setup is just not possible with Authentik?

Relevant infos

  • OCIS 4.0.0+3c7bae407
  • OwnCloud Desktop Client 5.0.0.12278

Version and Deployment (please complete the following information):

  • Authentik: 2023.8.3
  • Deployment: Docker
@mrdrogdrog mrdrogdrog added the question Further information is requested label Oct 21, 2023
@WoodyWoodsta
Copy link

I'll add that when you set up Google as an OIDC provider, they require you to generate a client id and secret pair per platform. We have, at the moment, an iOS and Android app, which means we need to configure at least two providers.

Not sure if this question is the same as above.

@bbl232
Copy link

bbl232 commented Apr 6, 2024

I would also like to see this added. Owncloud requires this for the same reason. One client ID for the web app, and the android, iOS and desktop sync clients all have their own client id/secret baked in.

@NeZios
Copy link

NeZios commented Apr 12, 2024

Same issue here, I followed this tutorial to add OIDC on my OCIS instance with Authentik : https://helgeklein.com/blog/owncloud-infinite-scale-with-openid-connect-authentication-for-home-networks/

  • Owncloud Web Client works great
  • Owncloud Desktop Client give me an Error 403
  • Owncloud iOS works on reading but not on adding or modifying content
  • And I didn't tried Owncloud Android.

Thanks for the help

@codesalatdev
Copy link

Since OwnCloud follows OIDC spec, one cannot use a .well-known provided at https://auth.example.com/application/o/owncloud/.well-known/openid-configuration which contains the issuer https://auth.example.com (when trying to use a single issuer for multiple providers). Likewise, we cannot use https://auth.example.com as an issuer, because as per OIDC spec issuers with discovery functionality MUST expose an openid-configuration at [ISSUER_URL]/.well-known/openid-configuration, which Authentik does not.

I was also unable to use a single issuer, like https://auth.example.com/application/o/owncloud for multiple providers.

I MUST be doing something wrong here, because I cannot imagine hitting a hard limit with Authentik while trying to migrate the first of many applications away from KeyCloak.

@BeryJu
Copy link
Member

BeryJu commented Jun 4, 2024

This is not currently possible, even with policies this cannot be done as the client_id check/lookup happens before any policy is run. The fact that when setting the issuer mode to be global, the discovery endpoints are not available is also on purpose, as authentik wouldn't know which provider to associate the request with (However this might be possible soon with #5440)

@bbangert
Copy link

I just ran into this myself, I used the 'use same issuer' which seemed like it was almost going to work..... except that when one specifies the WEB_OIDC_METADATA_URL value for OCIS, the web front-end uses it, but OCIS does not have any way to be told where to look for the well-known configuration.

If Authentik is following spec by not allowing two providers to have the same issuer, then alternatively perhaps we should file a bug with OCIS that there needs to be a way to configure multiple valid issuer's.

@mrdrogdrog
Copy link
Author

mrdrogdrog commented Jul 30, 2024

Tbh.. i'm confused now 😅 Who is following the spec correctly now? OCIS or authentik?

@BeryJu
Copy link
Member

BeryJu commented Jul 30, 2024

afaik the spec doesnt really specify anything about this, imo neither ocis nor authentik are "wrong"

irregardless some of this should be easier to do with #10400

@butonic
Copy link

butonic commented Aug 26, 2024

Tbh.. i'm confused now 😅 Who is following the spec correctly now? OCIS or authentik?

Both are doing the right thing AFAICT. Setting 'PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD=none' for oCIS does not reduce security. See owncloud/ocis#6479 (comment) for a longer explanation.

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

No branches or pull requests

8 participants