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

Dynamic OIDC clients feature #1181

Merged
merged 93 commits into from
Sep 23, 2022
Merged

Dynamic OIDC clients feature #1181

merged 93 commits into from
Sep 23, 2022

Conversation

cfryanr
Copy link
Member

@cfryanr cfryanr commented Jun 2, 2022

This is intended to be a long-lived feature branch for the maintainers to share while they work towards implementing the proposal from #1126.

Release note:

TODO: Need to write a release note before this is shipped.

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #1181 (66b1df2) into main (b564454) will decrease coverage by 2.68%.
The diff coverage is 100.00%.

❗ Current head 66b1df2 differs from pull request most recent head 208a566. Consider uploading reports for the commit 208a566 to get more accurate results

@@            Coverage Diff             @@
##             main    #1181      +/-   ##
==========================================
- Coverage   79.71%   77.03%   -2.69%     
==========================================
  Files         144      165      +21     
  Lines       10522    11449     +927     
==========================================
+ Hits         8388     8820     +432     
- Misses       1853     2342     +489     
- Partials      281      287       +6     
Impacted Files Coverage Δ
cmd/pinniped/cmd/kubeconfig.go 83.90% <100.00%> (+0.05%) ⬆️
cmd/pinniped/cmd/login_oidc.go 91.94% <100.00%> (ø)
internal/oidc/clientregistry/clientregistry.go 98.09% <0.00%> (-1.91%) ⬇️
internal/concierge/server/server.go 25.00% <0.00%> (-0.40%) ⬇️
internal/oidc/oidc.go 0.00% <0.00%> (ø)
internal/oidc/nullstorage.go 0.00% <0.00%> (ø)
internal/oidc/kube_storage.go 0.00% <0.00%> (ø)
internal/oidc/token_exchange.go 0.00% <0.00%> (ø)
internal/groupsuffix/groupdata.go 0.00% <0.00%> (ø)
internal/config/supervisor/types.go 100.00% <0.00%> (ø)
... and 41 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

margocrawf and others added 27 commits June 3, 2022 16:22
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Our previous plan was to reserve only *.oauth.pinniped.dev but we
changed our minds during PR review.
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Move oidcclient into config.supervisor.pinniped.dev
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Disallow certain requested audience strings in token exchange
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Needed to update the new v1.25 generated code to include the new APIs
that were added in the dynamic_clients branch.
cfryanr and others added 20 commits September 21, 2022 15:15
This commit is a WIP commit because it doesn't include many tests
for the new feature.

Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
- Change update-codegen.sh script to also generated openapi code for the
  aggregated API types
- Update both aggregated API servers' configuration to make them serve
  the openapi docs for the aggregated APIs
- Add new integration test which runs `kubectl explain` for all Pinniped
  API resources, and all fields and subfields of those resources
- Update some the comments on the API structs
- Change some names of the tmpl files to make the filename better match
  the struct names
…lientSecretStorage

Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Sets the Name, Namespace, CreationTimestamp fields in the object meta
of the return value.

Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
When oidcclientsecretstorage.Set() wants to update the contents of the
storage Secret, it also wants to keep the original ownerRef of the
storage Secret, so it needs the middleware to rewrite the API group
of the ownerRef again during the update (just like it had initially done
during the create of the Secret).
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Implement OIDCClientSecretRequest API for managing dynamic client secrets
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
@cfryanr cfryanr changed the title WIP: Dynamic OIDC clients feature Dynamic OIDC clients feature Sep 23, 2022
@cfryanr cfryanr marked this pull request as ready for review September 23, 2022 20:58
Copy link
Member

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

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

LGTM

@cfryanr cfryanr merged commit eb62f04 into main Sep 23, 2022
@benjaminapetersen benjaminapetersen deleted the dynamic_clients branch September 27, 2022 20:12
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.

5 participants