[OIDC] Using different client IDs with OpenCloud & Authentik (Web, Desktop, iOS Client) #1771
Replies: 3 comments 3 replies
-
|
We have just discovered that Webfinger (https://github.com/opencloud-eu/opencloud/tree/main/services/webfinger) returns different responses depending on the query parameter, so we will be redesigning the whole thing. An update will follow. :) |
Beta Was this translation helpful? Give feedback.
-
|
Update: Unfortunately, the simple Nginx rewrite did not cover all eventualities, so we wrote our own proxy in Go, which you can find here: https://github.com/2bros-group/opencloud-oidc-webfinger-proxy |
Beta Was this translation helpful? Give feedback.
-
|
@dennisoderwald awesome could you imagine to add some of the code to the webfinger service in openCloud? @rhafer and @butonic suggested to use the webfinger service as a permanent solution. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Update: Unfortunately, the simple Nginx rewrite did not cover all eventualities, so we wrote our own proxy in Go, which you can find here: https://github.com/2bros-group/opencloud-oidc-webfinger-proxy
We use Authentik as our IdP and have encountered the same issues reported by others - specifically, that the different client IDs cause problems.
We’ve found a temporary workaround until the core issue is resolved, and we’d like to share it with you. Of course, we’re open to any suggestions for improvement.
This solution has been tested with the official web, desktop (macOS), and iOS clients.
We haven’t yet been able to test it with Android.
The idea is simple: intercept the
/.well-known/webfingerpath in your reverse proxy and modify the response so that the correct issuer is returned.Nginx Example:
Additionally, you can map user agents to return the appropriate issuer:
Required environment variable:
Make sure to set the following environment variable:
By default, this value is set to
jwt.According to the official documentation: https://docs.opencloud.eu/de/docs/dev/server/Services/proxy/proxy-envvars
Disabling token signature verification (none) lowers the level of security - tokens will not be validated cryptographically.
Only use this option if you fully understand the implications and have other means of ensuring trusted communication between your Reverse Proxy, OpenCloud, and Authentik.
This approach is certainly not perfect, but it works reliably in our tests with the clients mentioned above.
Beta Was this translation helpful? Give feedback.
All reactions