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

[FEATURE] OIDC Dynamic Client Registration #3073

Merged
merged 6 commits into from
Feb 22, 2021

Conversation

abelgardep
Copy link
Contributor

@abelgardep abelgardep commented Feb 1, 2021

@abelgardep abelgardep self-assigned this Feb 1, 2021
@abelgardep abelgardep linked an issue Feb 1, 2021 that may be closed by this pull request
12 tasks
@abelgardep abelgardep force-pushed the feature/oauth_custom_implementation branch from f62f354 to 1a12f43 Compare February 1, 2021 15:58
Base automatically changed from feature/oauth_custom_implementation to master February 2, 2021 08:33
@abelgardep abelgardep force-pushed the feature/oidc_dynamic_client_registration branch from 23f8307 to d7c92d5 Compare February 2, 2021 08:38
@abelgardep abelgardep marked this pull request as ready for review February 4, 2021 16:35
@abelgardep abelgardep force-pushed the feature/oidc_dynamic_client_registration branch from 4e18b78 to f0c77b0 Compare February 9, 2021 08:57
@abelgardep abelgardep force-pushed the feature/oidc_dynamic_client_registration branch from f0c77b0 to 12d336a Compare February 10, 2021 13:05
@jesmrec
Copy link
Collaborator

jesmrec commented Feb 18, 2021

(1) [WONT FIX HERE]

  1. Set a server with OIDC + oC10 and DCR
  2. Enter the URL and credentials

Current:

Credentials are accepted but finally, the process finishes with no success. Checking the request flow, i realised that the register endpoint is not requested, so the final token request is done with the default client_id instead of the dynamic one.

Expected:

Authentication correct

Google Pixel 2, Android11
Emulator Nexus 5X Android8
commit 12d336a6

NOTE: server to test: https://oc-10-6-0.oidc-2-0-0rc1-20210128.jw-qa.owncloud.works

@abelgardep
Copy link
Contributor Author

abelgardep commented Feb 18, 2021

About (1)

I have checked the problem and this is what's happening. Taking into account that you are using some kind of proxy.

  1. Once you introduce this URL: oc-10-6-0.oidc-2-0-0rc1-20210128.jw-qa.owncloud.works/ you are asked to accept the untrusted certificate. Then you accept and you can move forward.
  2. Then we perform a discovery request, and we receive this registration endpoint: https://konnect.oidc-2-0-0rc1-20210128.jw-qa.owncloud.works/konnect/v1/register
  3. We try to ask the registration endpoint, but it is not trusted, so a certificate exception is triggered, and the client is not registered.
  4. Since client registration failed, we use the hardcoded client id, and we perform the token request to https://konnect.oidc-2-0-0rc1-20210128.jw-qa.owncloud.works/signin/v1/identifier/_/authorize but it fails again because the certificate is not trusted.

So, conclusion:
Checking it with trusted certificates, it won't fail and you are able to log in properly.
If you trust the initial server, and the other endpoints in the discovery request are in the same trusted server (for example ocis.owncloud.works), then you are able to log in.

Important: Reproducible in master when trying to exchange tokens

@jesmrec
Copy link
Collaborator

jesmrec commented Feb 18, 2021

thanks for the explanation @abelgardep. That means that (1) is not a problem of DCR itself, and also not a problem in this branch, so it will be addressed and prioritized in a separate issue.

@jesmrec
Copy link
Collaborator

jesmrec commented Feb 22, 2021

About this issue, several regards.

Taking these issues in account, we can move this forward

@abelgardep abelgardep force-pushed the feature/oidc_dynamic_client_registration branch from 12d336a to b2f1eda Compare February 22, 2021 15:39
@abelgardep abelgardep merged commit e5d8bac into master Feb 22, 2021
@abelgardep abelgardep deleted the feature/oidc_dynamic_client_registration branch February 22, 2021 16:19
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.

[FEATURE REQUEST] OIDC Dynamic Client Registration support
3 participants