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: disable oauth2 client deletion #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

David-Wobrock
Copy link
Contributor

@David-Wobrock David-Wobrock commented Aug 7, 2024

This new feature allows to disable hydra-maester OAuth2 client deletion. It can be a pitfall that, when a Kube CRD gets deleted, the OAuth2 client gets deleted too.

OAuth2 clients can be critical for production environments to work properly, and allowing to delete one when a Kubernetes CRD gets deleted has shown to be brittle for us. The CRDs are can be (temporarily) deleted for various reasons: human error, misconfiguration, etc.)
This feature should make hydra-maester safer.

Related Issue or Design Document

No issue or design document - it's an implementation attempt of a feature that we would find useful on hydra-maester :)

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • 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 approval (please contact [email protected]) 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 the necessary documentation within the code base (if appropriate).

Further comments

@David-Wobrock David-Wobrock force-pushed the feat/disable-oauth2-client-deletion branch 3 times, most recently from fedd3c2 to 09201b6 Compare August 7, 2024 09:13
Copy link
Collaborator

@Demonsthere Demonsthere left a comment

Choose a reason for hiding this comment

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

I agree with your goal, but not the method of implementation. Imho a better solution would be to add a field to the CR deletionPolicy: Delete | Orphan with delete being the default option. Orhpan would allow for deleting the CR without client deletion.
wdyt? :)

@David-Wobrock David-Wobrock force-pushed the feat/disable-oauth2-client-deletion branch from 09201b6 to 40994e1 Compare September 27, 2024 16:22
@David-Wobrock
Copy link
Contributor Author

I agree with your goal, but not the method of implementation. Imho a better solution would be to add a field to the CR deletionPolicy: Delete | Orphan with delete being the default option. Orhpan would allow for deleting the CR without client deletion. wdyt? :)

That would work too 👍 And more fine-grained, since it can be defined on a client-per-client basis.

I'll push some edits.

@David-Wobrock David-Wobrock force-pushed the feat/disable-oauth2-client-deletion branch from 40994e1 to 3fe7600 Compare September 27, 2024 16:23
This new feature allows to disable hydra-maester OAuth2 client deletion.
It can be a pitfall that, when a Kube CRD gets deleted, the OAuth2 client gets deleted.

OAuth2 clients can be critical for production environments to work properly,
and allowing to delete one when a Kubernetes CRD gets deleted has shown to be brittle.

This feature should make hydra-maester safer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants