feat: use Client Credentials for managing Keycloak Clients#1341
Merged
feat: use Client Credentials for managing Keycloak Clients#1341
Conversation
slaskawi
commented
Mar 17, 2025
slaskawi
commented
Mar 17, 2025
slaskawi
commented
Mar 17, 2025
slaskawi
commented
Mar 17, 2025
slaskawi
commented
Mar 17, 2025
slaskawi
commented
Mar 17, 2025
slaskawi
commented
Mar 18, 2025
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
6737743 to
4a67238
Compare
5 tasks
This was referenced Mar 19, 2025
Co-authored-by: Chance <139784371+UnicornChance@users.noreply.github.com>
mjnagel
reviewed
Mar 20, 2025
…docs' into pepr_keycloak_client_management
mjnagel
reviewed
Mar 24, 2025
mjnagel
reviewed
Mar 24, 2025
mjnagel
reviewed
Mar 25, 2025
…registration.spec.ts Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
mjnagel
reviewed
Mar 26, 2025
Contributor
mjnagel
left a comment
There was a problem hiding this comment.
LGTM at this point - validated the code with the current auto mode (using dynamic) as well as with the identity-config changes and all works as expected. Feel free to address or resolve these final comments and I will approve.
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
…als.ts Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
mjnagel
reviewed
Mar 27, 2025
mjnagel
approved these changes
Mar 27, 2025
chance-coleman
approved these changes
Mar 27, 2025
chance-coleman
pushed a commit
that referenced
this pull request
Apr 1, 2025
🤖 I have created a release *beep* *boop* --- ## [0.39.0](v0.38.0...v0.39.0) (2025-04-01) ### ⚠ BREAKING CHANGES * dynamic generation of Istio AuthorizationPolicy resources in ambient mode based on the configuration defined in a UDSPackage. ALL requests to a pod with authservice protection MUST have a jwt from Keycloak. More fine-grained protection can be done with additional DENY policies, but there will always be a requirement for a Keycloak JWT in addition. ### Features * add alertmanager datasource to grafana ([#1374](#1374)) ([818a3a0](818a3a0)) * ambient mesh authorization policy generation (#1384) ([b47daba](b47daba)) * new webauth and mfa flows ([#1370](#1370)) ([1ac1b03](1ac1b03)) * theme customization ([#1382](#1382)) ([55ef41b](55ef41b)) * use Client Credentials for managing Keycloak Clients ([#1341](#1341)) ([4db9cc7](4db9cc7)) ### Bug Fixes * add delete credential keycloak secret value ([#1398](#1398)) ([d45b3e6](d45b3e6)) * broken selectors for internal dependencies on charts ([#1403](#1403)) ([d72b194](d72b194)) ### Miscellaneous * add additionalNetworkAllow to keycloak and loki ([#1379](#1379)) ([8200bce](8200bce)) * add docs for layer selection ([#1216](#1216)) ([c170322](c170322)) * **deps:** update grafana ([#1383](#1383)) ([122dc58](122dc58)) * **deps:** update grafana to v8.10.4 ([#1363](#1363)) ([fb163bd](fb163bd)) * **deps:** update istio to v1.25.0 ([#1335](#1335)) ([1803ea7](1803ea7)) * **deps:** update keycloak to v0.11.1 ([#1400](#1400)) ([6fdcd0c](6fdcd0c)) * **deps:** update keycloak to v26.1.4 ([#1356](#1356)) ([31152f7](31152f7)) * **deps:** update pepr to v0.46.3 ([#1365](#1365)) ([304a556](304a556)) * **deps:** update prometheus-stack ([#1362](#1362)) ([ae40b27](ae40b27)) * **deps:** update prometheus-stack ([#1380](#1380)) ([eec3337](eec3337)) * **deps:** update support dependencies to v22.13.17 ([#1401](#1401)) ([8a81eec](8a81eec)) * **deps:** update support-deps ([#1364](#1364)) ([7819bec](7819bec)) * **deps:** update support-deps ([#1376](#1376)) ([dd22589](dd22589)) * **deps:** update support-deps ([#1390](#1390)) ([f06bb70](f06bb70)) * **deps:** update support-deps ([#1392](#1392)) ([c0762a3](c0762a3)) * **deps:** update ts-jest to v29.3.0 ([#1377](#1377)) ([8b2174a](8b2174a)) * **deps:** update velero to v8.6.0 ([#1371](#1371)) ([93a44e6](93a44e6)) * remove kiali and tempo references from repo ([#1375](#1375)) ([8374de3](8374de3)) * update how to scrape metrics ([#1378](#1378)) ([e808f7d](e808f7d)) * update unicorn ztunnel image to 1.25.0 ([#1389](#1389)) ([7e446cb](7e446cb)) ### Documentation * velero csi vsphere backups ([#1385](#1385)) ([5ae33b2](5ae33b2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
noahpb
pushed a commit
that referenced
this pull request
Apr 2, 2025
🤖 I have created a release *beep* *boop* --- ## [0.39.0](v0.38.0...v0.39.0) (2025-04-01) ### ⚠ BREAKING CHANGES * dynamic generation of Istio AuthorizationPolicy resources in ambient mode based on the configuration defined in a UDSPackage. ALL requests to a pod with authservice protection MUST have a jwt from Keycloak. More fine-grained protection can be done with additional DENY policies, but there will always be a requirement for a Keycloak JWT in addition. ### Features * add alertmanager datasource to grafana ([#1374](#1374)) ([818a3a0](818a3a0)) * ambient mesh authorization policy generation (#1384) ([b47daba](b47daba)) * new webauth and mfa flows ([#1370](#1370)) ([1ac1b03](1ac1b03)) * theme customization ([#1382](#1382)) ([55ef41b](55ef41b)) * use Client Credentials for managing Keycloak Clients ([#1341](#1341)) ([4db9cc7](4db9cc7)) ### Bug Fixes * add delete credential keycloak secret value ([#1398](#1398)) ([d45b3e6](d45b3e6)) * broken selectors for internal dependencies on charts ([#1403](#1403)) ([d72b194](d72b194)) ### Miscellaneous * add additionalNetworkAllow to keycloak and loki ([#1379](#1379)) ([8200bce](8200bce)) * add docs for layer selection ([#1216](#1216)) ([c170322](c170322)) * **deps:** update grafana ([#1383](#1383)) ([122dc58](122dc58)) * **deps:** update grafana to v8.10.4 ([#1363](#1363)) ([fb163bd](fb163bd)) * **deps:** update istio to v1.25.0 ([#1335](#1335)) ([1803ea7](1803ea7)) * **deps:** update keycloak to v0.11.1 ([#1400](#1400)) ([6fdcd0c](6fdcd0c)) * **deps:** update keycloak to v26.1.4 ([#1356](#1356)) ([31152f7](31152f7)) * **deps:** update pepr to v0.46.3 ([#1365](#1365)) ([304a556](304a556)) * **deps:** update prometheus-stack ([#1362](#1362)) ([ae40b27](ae40b27)) * **deps:** update prometheus-stack ([#1380](#1380)) ([eec3337](eec3337)) * **deps:** update support dependencies to v22.13.17 ([#1401](#1401)) ([8a81eec](8a81eec)) * **deps:** update support-deps ([#1364](#1364)) ([7819bec](7819bec)) * **deps:** update support-deps ([#1376](#1376)) ([dd22589](dd22589)) * **deps:** update support-deps ([#1390](#1390)) ([f06bb70](f06bb70)) * **deps:** update support-deps ([#1392](#1392)) ([c0762a3](c0762a3)) * **deps:** update ts-jest to v29.3.0 ([#1377](#1377)) ([8b2174a](8b2174a)) * **deps:** update velero to v8.6.0 ([#1371](#1371)) ([93a44e6](93a44e6)) * remove kiali and tempo references from repo ([#1375](#1375)) ([8374de3](8374de3)) * update how to scrape metrics ([#1378](#1378)) ([e808f7d](e808f7d)) * update unicorn ztunnel image to 1.25.0 ([#1389](#1389)) ([7e446cb](7e446cb)) ### Documentation * velero csi vsphere backups ([#1385](#1385)) ([5ae33b2](5ae33b2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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>
mjnagel
pushed a commit
to BagelLab/uds-core
that referenced
this pull request
Nov 14, 2025
🤖 I have created a release *beep* *boop* --- ## [0.39.0](defenseunicorns/uds-core@v0.38.0...v0.39.0) (2025-04-01) ### ⚠ BREAKING CHANGES * dynamic generation of Istio AuthorizationPolicy resources in ambient mode based on the configuration defined in a UDSPackage. ALL requests to a pod with authservice protection MUST have a jwt from Keycloak. More fine-grained protection can be done with additional DENY policies, but there will always be a requirement for a Keycloak JWT in addition. ### Features * add alertmanager datasource to grafana ([defenseunicorns#1374](defenseunicorns#1374)) ([818a3a0](defenseunicorns@818a3a0)) * ambient mesh authorization policy generation (defenseunicorns#1384) ([b47daba](defenseunicorns@b47daba)) * new webauth and mfa flows ([defenseunicorns#1370](defenseunicorns#1370)) ([1ac1b03](defenseunicorns@1ac1b03)) * theme customization ([defenseunicorns#1382](defenseunicorns#1382)) ([55ef41b](defenseunicorns@55ef41b)) * use Client Credentials for managing Keycloak Clients ([defenseunicorns#1341](defenseunicorns#1341)) ([4db9cc7](defenseunicorns@4db9cc7)) ### Bug Fixes * add delete credential keycloak secret value ([defenseunicorns#1398](defenseunicorns#1398)) ([d45b3e6](defenseunicorns@d45b3e6)) * broken selectors for internal dependencies on charts ([defenseunicorns#1403](defenseunicorns#1403)) ([d72b194](defenseunicorns@d72b194)) ### Miscellaneous * add additionalNetworkAllow to keycloak and loki ([defenseunicorns#1379](defenseunicorns#1379)) ([8200bce](defenseunicorns@8200bce)) * add docs for layer selection ([defenseunicorns#1216](defenseunicorns#1216)) ([c170322](defenseunicorns@c170322)) * **deps:** update grafana ([defenseunicorns#1383](defenseunicorns#1383)) ([122dc58](defenseunicorns@122dc58)) * **deps:** update grafana to v8.10.4 ([defenseunicorns#1363](defenseunicorns#1363)) ([fb163bd](defenseunicorns@fb163bd)) * **deps:** update istio to v1.25.0 ([defenseunicorns#1335](defenseunicorns#1335)) ([1803ea7](defenseunicorns@1803ea7)) * **deps:** update keycloak to v0.11.1 ([defenseunicorns#1400](defenseunicorns#1400)) ([6fdcd0c](defenseunicorns@6fdcd0c)) * **deps:** update keycloak to v26.1.4 ([defenseunicorns#1356](defenseunicorns#1356)) ([31152f7](defenseunicorns@31152f7)) * **deps:** update pepr to v0.46.3 ([defenseunicorns#1365](defenseunicorns#1365)) ([304a556](defenseunicorns@304a556)) * **deps:** update prometheus-stack ([defenseunicorns#1362](defenseunicorns#1362)) ([ae40b27](defenseunicorns@ae40b27)) * **deps:** update prometheus-stack ([defenseunicorns#1380](defenseunicorns#1380)) ([eec3337](defenseunicorns@eec3337)) * **deps:** update support dependencies to v22.13.17 ([defenseunicorns#1401](defenseunicorns#1401)) ([8a81eec](defenseunicorns@8a81eec)) * **deps:** update support-deps ([defenseunicorns#1364](defenseunicorns#1364)) ([7819bec](defenseunicorns@7819bec)) * **deps:** update support-deps ([defenseunicorns#1376](defenseunicorns#1376)) ([dd22589](defenseunicorns@dd22589)) * **deps:** update support-deps ([defenseunicorns#1390](defenseunicorns#1390)) ([f06bb70](defenseunicorns@f06bb70)) * **deps:** update support-deps ([defenseunicorns#1392](defenseunicorns#1392)) ([c0762a3](defenseunicorns@c0762a3)) * **deps:** update ts-jest to v29.3.0 ([defenseunicorns#1377](defenseunicorns#1377)) ([8b2174a](defenseunicorns@8b2174a)) * **deps:** update velero to v8.6.0 ([defenseunicorns#1371](defenseunicorns#1371)) ([93a44e6](defenseunicorns@93a44e6)) * remove kiali and tempo references from repo ([defenseunicorns#1375](defenseunicorns#1375)) ([8374de3](defenseunicorns@8374de3)) * update how to scrape metrics ([defenseunicorns#1378](defenseunicorns#1378)) ([e808f7d](defenseunicorns@e808f7d)) * update unicorn ztunnel image to 1.25.0 ([defenseunicorns#1389](defenseunicorns#1389)) ([7e446cb](defenseunicorns@7e446cb)) ### Documentation * velero csi vsphere backups ([defenseunicorns#1385](defenseunicorns#1385)) ([5ae33b2](defenseunicorns@5ae33b2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_STRATEGYEnvironment Variable in the UDS Operator that can have 3 values:dynamic_client_registration- the Dynamic Client Registration modeclient_credentials- using the Client Credentials modeauto- 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
Type of change
Steps to Validate
This functionality primarily relies on the regression testing.
Checklist before merging