Skip to content

feat: pepr Keycloak Client management#358

Merged
chance-coleman merged 21 commits intomainfrom
pepr_keycloak_client_management
Mar 27, 2025
Merged

feat: pepr Keycloak Client management#358
chance-coleman merged 21 commits intomainfrom
pepr_keycloak_client_management

Conversation

@slaskawi
Copy link
Copy Markdown
Contributor

@slaskawi slaskawi commented Mar 4, 2025

Description

This Pull Request is the counterpart of defenseunicorns/uds-core#1341 and introduces necessary plugins and Realm Configuration for using Client Credentials Grant by the UDS Operator to manage Keycloak Clients

The documentation for this feature will be delivered separately

Related Issue

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Comment thread .github/workflows/test.yaml
Comment thread src/realm.json Outdated
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@slaskawi slaskawi force-pushed the pepr_keycloak_client_management branch from e575b20 to 957ebe8 Compare March 18, 2025 11:31
Comment thread tasks.yaml Outdated
slaskawi and others added 3 commits March 22, 2025 08:37
…in/clientpolicy/executor/UDSClientPolicyPermissionsExecutorFactory.java

Co-authored-by: Chance <139784371+UnicornChance@users.noreply.github.com>
chance-coleman
chance-coleman previously approved these changes Mar 26, 2025
Copy link
Copy Markdown
Collaborator

@mjnagel mjnagel left a comment

Choose a reason for hiding this comment

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

LGTM overall - small comments, but the functionality seems to work as expected in testing.

Comment thread tasks.yaml
Comment thread docs/dev/authentication-flow-toggle-maps.md Outdated
Comment thread docs/reference/UDS Core/IdAM/upgrading-versions.md Outdated
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
mjnagel
mjnagel previously approved these changes Mar 27, 2025
slaskawi added a commit to defenseunicorns/uds-core that referenced this pull request Mar 27, 2025
## Description

This Pull Request introduces an alternative mode for managing Keycloak
Clients by the UDS Operator.

The UDS Operator now discovers if Keycloak has been properly configure
(and if it supports the configuration delivered by
defenseunicorns/uds-identity-config#358) and
switches to Client Credentials if it does. In other case, the UDS
Operator will keep using the Dynamic Client Registration feature.

The behavior might be overridden by using the
`PEPR_KEYCLOAK_CLIENT_STRATEGY` Environment Variable in the UDS Operator
that can have 3 values:

* `dynamic_client_registration` - the Dynamic Client Registration mode
* `client_credentials` - using the Client Credentials mode
* `auto` - the Operator probes if a token obtained by the Client
Credentials Grant looks good and picks proper mode according to the
results of the check.

The documentation for this feature will be delivered here:
#1367

## Related Issue

* Fixes #1330
* Relates to #1296
* [Technical
Design](https://www.notion.so/Managing-Keycloak-Clients-from-Pepr-1a5e512f24fc80c4bc35d13b9d7a1367)

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Steps to Validate

This functionality primarily relies on the regression testing. 

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor
Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)
followed

---------

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
Co-authored-by: Chance <139784371+UnicornChance@users.noreply.github.com>
Co-authored-by: Noah <40781376+noahpb@users.noreply.github.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
chance-coleman
chance-coleman previously approved these changes Mar 27, 2025
@chance-coleman chance-coleman dismissed stale reviews from mjnagel and themself via 8ad2ad7 March 27, 2025 20:24
@chance-coleman chance-coleman marked this pull request as ready for review March 27, 2025 20:42
@chance-coleman chance-coleman requested a review from a team as a code owner March 27, 2025 20:42
@chance-coleman chance-coleman merged commit 70cdb8a into main Mar 27, 2025
11 checks passed
mjnagel added a commit to BagelLab/uds-core that referenced this pull request Nov 14, 2025
…icorns#1341)

## Description

This Pull Request introduces an alternative mode for managing Keycloak
Clients by the UDS Operator.

The UDS Operator now discovers if Keycloak has been properly configure
(and if it supports the configuration delivered by
defenseunicorns/uds-identity-config#358) and
switches to Client Credentials if it does. In other case, the UDS
Operator will keep using the Dynamic Client Registration feature.

The behavior might be overridden by using the
`PEPR_KEYCLOAK_CLIENT_STRATEGY` Environment Variable in the UDS Operator
that can have 3 values:

* `dynamic_client_registration` - the Dynamic Client Registration mode
* `client_credentials` - using the Client Credentials mode
* `auto` - the Operator probes if a token obtained by the Client
Credentials Grant looks good and picks proper mode according to the
results of the check.

The documentation for this feature will be delivered here:
defenseunicorns#1367

## Related Issue

* Fixes defenseunicorns#1330
* Relates to defenseunicorns#1296
* [Technical
Design](https://www.notion.so/Managing-Keycloak-Clients-from-Pepr-1a5e512f24fc80c4bc35d13b9d7a1367)

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Steps to Validate

This functionality primarily relies on the regression testing. 

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor
Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)
followed

---------

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
Co-authored-by: Chance <139784371+UnicornChance@users.noreply.github.com>
Co-authored-by: Noah <40781376+noahpb@users.noreply.github.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
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.

Design a Pepr Client Policy Create Cloud Native Client Authenticator

3 participants