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

feat: OpenID Connect Dynamic Client Registration and OAuth2 Dynamic Client Registration Protocol #2909

Merged
merged 47 commits into from
Jan 4, 2022

Conversation

aeneasr
Copy link
Member

@aeneasr aeneasr commented Dec 29, 2021

This feature adds first-class support for two IETF RFCs and one OpenID Spec:

To enable this feature, which is disabled by default, set

oidc:
  dynamic_client_registration:
    enabled: true

in your Ory Hydra configuration. Once enabled, endpoints POST, GET, PUT, and DELETE for /connect/register will be available at the public port!

Closes #2568
Closes #2549


@fjvierap thank you for the great PR! I have made some adjustments. In particular:

  1. I reused the Client Auth method from fosite so we do not need to write our own
  2. I update the specification use to have a bit clearer naming

This PR still needs work:

  1. My fosite client auth changes are not yet done
  2. We need to add more tests
  3. We need to add documentation on how to use this feature

Would you still be willing to help even though I needed so long to get this PR merged? :) If not I will try to complete it over the next few days / weeks.

Closes #2568

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security. vulnerability, I
    confirm that I got green light (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

fjvierap and others added 30 commits June 14, 2021 17:59
# Conflicts:
#	internal/httpclient/client/admin/admin_client.go
#	internal/httpclient/models/generic_error.go
#	spec/api.json
#	test/e2e/circle-ci.bash
@aeneasr aeneasr self-assigned this Dec 29, 2021
@aeneasr aeneasr added this to the v1.11 milestone Dec 29, 2021
@aeneasr aeneasr changed the title feat: openid connect dynamic client registration feat: OpenID Connect Dynamic Client Registration Jan 2, 2022
@aeneasr aeneasr added the feat New feature or request. label Jan 2, 2022
This feature adds first-class support for OpenID Connect Dynamic Client Registration. To enable this feature, which is disabled by default, set

```yaml
oidc:
  dynamic_client_registration:
    enabled: true
```

in your Ory Hydra configuration. Once enabled, endpoints `POST`, `GET`, `PUT`, and `DELETE` for `/openid/register` will be available at the public port!

Closes ory#2568
Closes ory#2549
BREAKING CHANGE: Endpoint `PUT /clients` now returns a 404 error when the OAuth2 Client to be updated does not exist. It return 401 previously.
@aeneasr aeneasr changed the title feat: OpenID Connect Dynamic Client Registration feat: OpenID Connect Dynamic Client Registration and OAuth2 Dynamic Client Registration Protocol Jan 3, 2022
aeneasr added 10 commits January 3, 2022 15:49
BREAKING CHANGES: This change requires you to run SQL migrations!
@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #2909 (489985f) into master (72837a1) will increase coverage by 0.30%.
The diff coverage is 78.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2909      +/-   ##
==========================================
+ Coverage   77.95%   78.26%   +0.30%     
==========================================
  Files         110      110              
  Lines        7636     7731      +95     
==========================================
+ Hits         5953     6051      +98     
+ Misses       1266     1265       -1     
+ Partials      417      415       -2     
Impacted Files Coverage Δ
client/client.go 81.25% <ø> (ø)
driver/registry_base.go 90.77% <33.33%> (-0.68%) ⬇️
client/handler.go 79.18% <77.87%> (+16.68%) ⬆️
client/validator.go 72.38% <100.00%> (+3.69%) ⬆️
driver/config/provider.go 89.40% <100.00%> (+0.09%) ⬆️
persistence/sql/persister_oauth2.go 80.85% <0.00%> (-0.86%) ⬇️
persistence/sql/persister_client.go 88.00% <0.00%> (+8.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72837a1...489985f. Read the comment docs.

@aeneasr aeneasr merged commit 6a18f62 into ory:master Jan 4, 2022
@aeneasr
Copy link
Member Author

aeneasr commented Jan 4, 2022

@fjvierap thank you for your hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate client management API from the API used for dynamic client registration and configuration.
2 participants