OIDC public client support needed — incompatible with IdPs that only support confidential clients #198
Labels
No labels
bug
chore
documentation
enhancement
help
in-progress
question
ready-for-release
released
translation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
adam/gate#198
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe your idea for an enhancement:
It would be beneficial for VoidAuth to support public OIDC clients (i.e., clients that do not use a client_secret).
Many modern applications — especially browser-based apps, mobile apps, and desktop clients — are designed as public clients and cannot securely store a secret. Supporting this type of client would significantly improve compatibility with a wide range of identity and authentication ecosystems.
Describe alternatives you've considered:
Additional context:
In my specific case, I’m trying to integrate VoidAuth with OpenCloud, whose Web/desktop/mobile clients are public-only according to their documentation:
https://docs.opencloud.eu/docs/next/admin/configuration/authentication-and-user-management/external-idp
Because VoidAuth only supports confidential clients and OpenCloud only supports public clients, integration is currently impossible.
Adding support for public clients would resolve this and improve interoperability with many similar applications.
Hello! Thank you for opening an issue!
Can you try adding the OIDC Client anyways and selecting
nonefor theToken Endpoint Auth Methodoption? That might work, and if it does I will improve the UI to make that more clear. For theClient Secretjust autogenerate one.Hello — thanks for your reply!
I was unsure this was the right option for public clients because it forced me to provide a client secret. I think in that case the field should not be required and should be disabled (or hidden) for public clients to avoid confusion.
I'll try adding the OIDC Client with Token Endpoint Auth Method set to
noneand autogenerating a client secret. I'll try this over the weekend if I have the time (and the inclination), and I'll let you know if it works. Thanks again for your response and great project 😊Adding onto this discussion with Opencloud there is another issue for the mobile apps:
For iOS the redirect is
oc://ios.opencloud.euand Android isoc://android.opencloud.euBoth give the below error when attempting to create an OIDC client in VoidAuth
Opencloud's OIDC implementation is a little obtuse in my opinion, though I suppose it's not the worst I've dealt with...
That is a bummer, that error/requirement (
redirect_uris for native clients using Custom URI scheme should use reverse domain name based scheme) is built into the package VoidAuth uses for OIDC flow,node-oidc-provider. There probably isn't much I can do to help with that, my guess is that those custom URI schemes are not fully OIDC compliant but I will do some researchAfter some quick searching it looks like that requirement is based on IETF RFC documents like this one that define the best practices of native app oauth. It is even specified in that same document (here) that providers should reject native app urls that do not use the reverse domain name based scheme. In order to be compliant, the OpenCloud native app OIDC callbacks should instead look like
eu.opencloud.ios:///oc, for example Immich usesapp.immich:///oauth-callback.What is actually causing the error is that the scheme of
oc://ios.opencloud.euisoc, and that does not include a dot/period character in it.That's what I found as well, hence my previous statement about it being a little obtuse. It's technically out of spec but I guess the other auth providers I've tried just ignore that and let you use it anyway. Just wanted to share for anyone else's awareness.
I am making an update to silence the
redirect_uris for native clients using Custom URI scheme should use reverse domain name based schemeerror, since it seems to be a best-practices issue just to incentivize app creators in a certain way. Security impacts seem to be mostly centered around proving app ownership in the case of counterfeit apps in app storesAdditional support for public OIDC Clients has been released in v1.6.0, but it could probably still use some work. Let me know if the changes work for OpenCloud 😊
I've got OpenCloud web working but I can't quite get the desktop/mobile apps working. The two errors I'm still seeing for desktop/mobile:
oidc-provider:authentication:error { error: 'invalid_request', error_description: 'unsupported prompt value requested' ... }It looks like the prompts being sent areconsent&select_accountoidc-provider:error path=/token method=POST error={ error: 'invalid_client', error_description: 'client authentication failed' } detail=the provided authentication mechanism does not match the registered client authentication methodI have Auth Method set toNone (Public)The desktop clients also use
http://127.0.0.1with a randomized port number for the redirect URL and it doesn't look like wildcards are supported for redirect URLs. Normally I'd usehttp://127.0.0.1:*here.The update to silence the
redirect_uriserror probably should also be applied to PostLogout URL field since it gives the same message.I am planning on adding wildcard support in redirect urls in the next release. Will need to look into how to properly handle un-implemented prompts like
select_account.If you need to set the Auth Method to
None (Public)but then get thatinvalid_clienterror, that seems to me like you might just need two OIDC Clients (one for public, and one that seems to be using a Client Secret).I'm not sure what's up with
invalid_clientsince all of the below is supposed to be true. It also used to work on my previous IDP but since testing the various clients with VoidAuth and then moving things back, only Web is working there too.Hii!
I have been trying to setup OpenCloud with VoidAuth too, and faced another problem: I faced this error, which requires the settings
PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD=noneon the OpenCloud side.This means that VoidAuth does not send JWT-encrypted responses to OpenCloud in Public Client mode? Is it a feature of the OIDC standard?
BTW a bit of doc about how to setup VoidAuth with OpenCloud would be awesome 😄
Hello, public clients seems to work, but I have to use the id token because the access token seems to be an opaque token and not a jwt token? As far as I know this should not be the case, but correct me if I'm wrong?
Interesting, looks like OIDC does support opaque and JWT access tokens (good docs without having to read spec -> https://auth0.com/docs/secure/tokens/access-tokens), but I am still working out if this is something that
node-oidc-providersupports. My guess is that it probably is supported, and is probably behind a feature flag (maybe this one -> https://github.com/panva/node-oidc-provider/tree/main/docs#featuresjwtresponsemodes)You are indeed correct, in the case of opaque token, the api has to do an additional introspection. So for me this is fine, but perhaps it's possible to have a choice for the access_token to be jwt or opaque? Which is a feature ofcourse, no pressure there from me. Thanks for the app already!
Edit: the .well-known/openid-configuration response does not specify an introspection endpoint at this moment, so I think the returned opaque token can't be used?