Repository navigation
Use webfinger for OIDC parameter discovery - #847
TheOneRing merged 10 commits into
Conversation
b345a3c to
063efde
Compare
|
Did this PR worked for you @kulmann ? Just tried it without success on my side, when both web + iOS are working perfectly. I have tested the webfinger with: Which returns But when the Authelia page appears I can see that groups are not part of the request. Edit: You can see that scopes ( |
063efde to
01406ed
Compare
|
@RichardFevrier thanks for testing the PR!
|
|
Thanks for your work @kaivol I'll test that tomorrow! 🤩 |
|
@RichardFevrier Have you tested this PR? :) |
|
@kaivol FYI CI ^ says this: Might be related to
I can't say anything to this topic specifically, if it's easier to keep a lower C++ standard or check if all our platforms would support 23. |
01406ed to
5e7ecb7
Compare
|
@kaivol one more failure :) ^ @TheOneRing FYI, i can't seem to be able to ask macos and windows to re-run if linux already failed ^ |
5e7ecb7 to
e259baa
Compare
|
I'm a little confused, the CI error seems to be in the OpenVFS plugin, not at all related to my changes 😕 |
|
@kaivol You're right, sorry! |
e259baa to
dbeb743
Compare
|
^ OAuth test fails |
a83044a to
b7e4712
Compare
|
Okay, I adjusted the OAuth test and added a response for the Let me know if you agree with the changes. |
Override openIdConnectScopes() in OpenCloudTheme to include the "groups" scope alongside the default openid/offline_access/email/profile set. IDPs that scope-gate their group claim (Authelia, Keycloak and Authentik in default config) only emit it when the corresponding scope is requested in the authorization request. Without it, server-side role mapping via PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM=groups fails with "no roles in user claims" and login dies on the post-OAuth user-info step with "Failed to get user info from server". Stopgap until opencloud-eu#847 (webfinger-based OIDC parameter discovery) lands upstream. Refs opencloud-eu#217. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
I can confirm this PR works, I'm logged in a test server with a different client_id and additional scopes. I'll post my review comments later, it's only small stuff I think. Thank you for the PR @kaivol By the way I see this in log: |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Compiled and tested it with authelia, it's working well. groups are now requested by the client. |
| if (flag & defaultOauthPromtValue()) | ||
| _supportedPromtValues |= flag; | ||
| } | ||
| this->_scopes = scopesJoined; |
There was a problem hiding this comment.
QStringList scopes; scopes.join(QStringLiteral(" "));
| const QString contentTypeHeader = webfingerReply->header(QNetworkRequest::ContentTypeHeader).toString(); | ||
| if (!contentTypeHeader.contains(QStringLiteral("application/json"), Qt::CaseInsensitive)) { | ||
| qCWarning(lcOauth) << u"server sent invalid content type:" << contentTypeHeader; | ||
| handleError(QNetworkReply::NoError, QStringLiteral("WebFinger response had unexpected content type: %1").arg(contentTypeHeader) ); |
There was a problem hiding this comment.
While apparently the errors string is currently unused, those errors should probably be translatable.
so pleas euse the 'tr' macro tr("WebFinger response had unexpected content type: %1").arg(contentTypeHeader) for the error messages
|
tested this on 7.3.0 with authentik as IdP and it worked great :) |
|
@ember-ana thanks for the feedback! |
b625d9f to
ff446eb
Compare
ff446eb to
43ebe68
Compare
|
Thank you for your contribution, and many thanks for your patience. Any changes to the authentication flows give me a headache. |
|
Hi all, Testing of pre-release with webfinger client_id/scope support would be appreciated. |
Hey @guruz . I stumbled upon the problem today (OpenCloud 7.4.0 on the server side & Authelia as an OIDC provider). By "the problem" I mean the fact that OpenCloud desktop could not authenticate because it seems the groups claim wasn't requested accordingly from authelia by opencloud-desktop. I switched to 4.0.0-rc.1 and I can confirm that it does indeed fix the issue, I'm now able to login with opencloud-desktop 🙌 Thank you so much for the "fix" @kaivol 🙌 🙌 |
Closes #811.
Client side implementation of the changes described in https://github.com/opencloud-eu/opencloud/blob/main/docs/adr/0003-oidc-client-config-discovery.md.
Based on #776.