Skip to content

feat: Dynamic Client Registration with SPIFFE for Keycloak #85

Closed

Description

@mrsabath

Problem Statement *

Currently AuthBridge uses admin credentials for registering the Keycloak client. We need to remove the static credentials.

Proposed Solution *

Use Dynamic Client registration with SPIFFE to register the Keycloak client.

Alternatives Considered

No response

Additional Context

No response

Priority

None

Contribution

  • I am willing to submit a pull request for this feature

Activity

  1. added
    enhancement
    on Jan 28, 2026
  2. moved this from Backlog to In progress in Rossoctl Issue Prioritizationon Feb 2, 2026
  3. mrsabath commented on Feb 16, 2026

    @mrsabath
    MemberAuthor

    To be done later

  4. mrsabath commented on Mar 2, 2026

    @mrsabath
    MemberAuthor

    @Alan-Cha will address this issue as soon as he is done with #82

  5. grs commented on Mar 19, 2026

    @grs

    @mrsabath just to clarify, this covers the removal of any injection of keycloak credentials into sidecars, correct? Where SPIFFE is not in use Kubernetes serviceaccount tokens would be used to authenticate instead. In both cases the clients would need to be created separately for every serviceaccount in use.

  6. dimakis commented on Mar 23, 2026

    @dimakis

    @Alan-Cha
    is this being progressed? it is key for us

  7. Alan-Cha commented on Mar 23, 2026

    @Alan-Cha
    Member

    @dimakis Yes, I am currently working on it.

  8. dimakis commented on Mar 24, 2026

    @dimakis

    Excellent, thanks @Alan-Cha, if you need any help/ assistance, please don't hesitate to reach out. I know @grs and @akram have been looking into this area

  9. moved this from In progress to Ready in Rossoctl Issue Prioritizationon Apr 6, 2026
  10. moved this from Ready to Backlog in Rossoctl Issue Prioritizationon Apr 6, 2026
  11. Alan-Cha commented on Apr 6, 2026

    @Alan-Cha
    Member

    This work is no longer necessary with new operator-managed client registration

    See:
    rossoctl/operator#247
    #262

    After discussion we @akram, we decided that the operator design has more advantages than DCR.

    1. The operator design is more secure. Depending on how we implement DCR, it would enable a container in the namespace to create as many clients as it wants. The operator design will limit a container to only creating a single client.
    2. The operator design is a more complete solution. DCR can resolve the issue of client registration but we need to think about the entire agent lifecycle. DCR will not handle client deregistration when the agent is deleted. The operator could handle both client registration and deregistration as well as other responsibilities.

    The operator uses admin credentials to talk to Keycloak. This is a big improvement as we no longer need to have admin credentials in admin namespaces, which was previously read by the the client registration sidecar.

    @akram and I discussed the possibility of using a hybrid method where the operator uses DCR to register the client. However, I think the benefits are limited. I'm not sure if it's worth the engineering cycles at the moment.

  12. esnible commented on Apr 27, 2026

    @esnible
    Member

    Can this be closed?

    @Alan-Cha If the operator manages OIDC client registration, and that registration fails, what is the mechanism for the operator to tell pods the registration has failed?

  13. Alan-Cha commented on May 1, 2026

    @Alan-Cha
    Member

    @esnible We can close this for now. I think we can revisit this in the future or perhaps I'll file a new issue. We successfully removed admin credentials from agent namespaces but we have admin credentials in kagenti-system so that the operator can talk to Keycloak. Perhaps the next step would be to create a client for the operator in Keycloak and have Keycloak trust the operator's SPIFFE ID, removing credentials entirely.

    There's no mechanism to tell the pods that registration has failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions