Skip to content

Conversation

@jlallana
Copy link

@jlallana jlallana commented Mar 13, 2020

After continuing with the changes in this application, I found that for openid connect to work it also needs changes in core. I gave up for the moment and I'm trying to make an application from scratch to give full support to openid connect.

@jlallana
Copy link
Author

The continuous integration server fails, but for reasons that are completely unchanged from the change I made in the application. Does anyone follow these cases?

@rullzer rullzer self-assigned this Mar 17, 2020
Copy link

@philippstappert philippstappert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know, why the check won't pass...
Checked the code on my own, works fine 👍

],
[
'name' => 'OauthApi#discovery',
'url' => '/.well-known/openid-configuration',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well known urls need to be at the root of the domain I think.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nowhere is it specified that a subdirectory cannot be used as an identity provider. In fact keycloak as it has several realms uses the pattern https://{keycloak-domain}/auth/ realms/{realm-name}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://tools.ietf.org/html/rfc5785

If you define the route like above and Nextcloud is installed in a subdirectory the discovery endpoint would be https://nextcloud.test/subdirectory/.well-known/openid-configuration.

#16231 / nextcloud/documentation#1024 might be a starting point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rewrite rules in .htaccess cannot influence paths outside of Nextcloud's subdirectory, either. So #16231 is equally affected by this problem. But apparently it's convention to register such routes with public.php instead of directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. To make this work for every setup we need to update nginx configuration and service discovery behind reverse proxy documentation. I would also prefer to add the redirect to .htaccess and pick a different name for the route (because it's like that for the other service discovery endpoints as well) but the current approach should also work.

It depends a bit how you read https://tools.ietf.org/html/rfc5785#section-1.1. I would say returning to openid configuration is fine here. But others might argue that we should redirect to a another route.

@jlallana
Copy link
Author

jlallana commented Mar 23, 2020 via email

Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not bad to create a new controller only for the discovery logic.

cc @rullzer @ChristophWurst

* @return JSONResponse
*/
public function discovery() {
$util = new Util();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably

Comment on lines +77 to +79
Throttler $throttler,
IUserSession $userSession,
IURLGenerator $urlGenerator) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

apps/oauth2/tests/Controller/OauthApiControllerTest.php needs an update for the new dependencies.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I fix it and resend the pull request

@rullzer
Copy link
Member

rullzer commented Jul 4, 2020

Probably not bad to create a new controller only for the discovery logic.

cc @rullzer @ChristophWurst

yes. Small controller are happy controllers.

@jlallana
Copy link
Author

jlallana commented Jul 6, 2020

After continuing with the changes in this application, I found that for openid connect to work it also needs changes in core. I gave up for the moment and I'm trying to make an application from scratch to give full support to openid connect.

@JBM1866
Copy link

JBM1866 commented Nov 8, 2021

Any update on this?

@jlallana
Copy link
Author

jlallana commented Nov 9, 2021 via email

@mortee
Copy link

mortee commented Jan 18, 2022

Would be nice to know if this will work in the near future. Apparently multiple oauth clients can't be integrated with NC in its current form.

@mcassaniti
Copy link

Was this supposed to also target RFC7591: OAuth 2.0 Dynamic Client Registration Protocol?

@skjnldsv
Copy link
Member

As there is no feedback since a while I will close this ticket.
If you will decide to work on this feature again and if it hasn't been fixed or implemented already, feel free to re-open and solve the various conflicts.

Thanks for the interest in Nextcloud and the effort put into this! 🙇

@skjnldsv skjnldsv closed this Feb 27, 2024
@skjnldsv skjnldsv removed the 2. developing Work in progress label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants