Keycloak Package Chart Maintenance📜
This guide covers updating, testing and maintaining the Big Bang Keycloak package.
Overview📜
Big Bang’s Keycloak implementation:
- Wraps the upstream codecentric keycloakx chart
- Bundles bitnami postgres as a dependency
- Includes the custom p1-auth-plugin for DoD-specific auth requirements
Update Process📜
-
Research: Review Keycloak release notes for breaking changes
-
Update Dependencies:
helm dependency update ./chart
-
Update Chart Files:
- Chart.yaml: Update version numbers and annotations
name: keycloak version: XX.X.X-bb.X appVersion: XX.X.X dependencies: - name: postgresql version: 16.6.7 repository: oci://registry-1.docker.io/bitnamicharts condition: postgresql.enabled - name: gluon version: "X.X.X" # Update annotations section accordingly
- CHANGELOG.md: Document changes
-
README.md: Update using gluon library script
-
Plugin Management:
- Build/publish the p1-auth-plugin (use test label initially)
- After testing, create an official release tag
-
Publish to IronBank following these instructions
-
Testing: Test both clean install and upgrade scenarios
-
BigBang MR: Update with new plugin init-container tag
Testing Environment Setup📜
Prerequisites📜
# Set credentials (can be added to ~/.bashrc)
export REGISTRY_USERNAME='<your_username>'
export REGISTRY_PASSWORD='<your_password>'
# Path to BigBang repo (no trailing slash)
export BIGBANG_REPO_DIR=~/repos/bigbang
Cluster Setup📜
-
Create dev cluster:
"${BIGBANG_REPO_DIR}"/docs/assets/scripts/developer/k3d-dev.sh -a
-
Configure kubectl:
export KUBECONFIG=~/.kube/<your_kubeconfig_file>
-
Deploy Flux:
"${BIGBANG_REPO_DIR}"/scripts/install_flux.sh -u "${REGISTRY_USERNAME}" -p "${REGISTRY_PASSWORD}"
Deploy BigBang📜
helm upgrade -i bigbang ${BIGBANG_REPO_DIR}/chart \
-n bigbang \
--create-namespace \
--set registryCredentials.username=${REGISTRY_USERNAME} \
--set registryCredentials.password=${REGISTRY_PASSWORD} \
-f https://repo1.dso.mil/big-bang/bigbang/-/raw/master/tests/test-values.yaml \
-f https://repo1.dso.mil/big-bang/bigbang/-/raw/master/chart/ingress-certs.yaml \
-f docs/dev-overrides/enable-sso.yaml
This deploys Keycloak, Authservice, Istio stack, and several applications with SSO enabled.
Configuration📜
Override File Options📜
-
Branch/Tag Testing:
addons: keycloak: git: tag: null branch: "renovate/ironbank" # Example branch
-
Plugin Image:
Alternatively, you can modifyaddons: keycloak: values: upstream: extraInitContainers: |- - name: plugin image: registry1.dso.mil/ironbank/big-bang/p1-keycloak-plugin:3.5.7
enable-sso.yaml
to specify the plugin you’re testing. -
SSO SAML Metadata:
sso: saml: # curl -fsSL https://keycloak.dev.bigbang.mil/auth/realms/baby-yoda/protocol/saml/descriptor for this metadata: ""
Test Cases📜
-
Admin Console: https://keycloak.dev.bigbang.mil/auth/admin/ (admin/password)
-
User Management:
- Create test users (CAC and non-CAC)
- For non-CAC: use incognito window or disconnect CAC reader
- Set email as verified via admin console
-
Note: A
cypress
user is created automatically in test deployments -
SSO Integration:
- Test with Grafana (https://grafana.dev.bigbang.mil)
- Test with Mattermost (https://chat.dev.bigbang.mil)
-
Test with Sonarqube (https://sonarqube.dev.bigbang.mil)
-
Custom Forms:
- Account: https://keycloak.dev.bigbang.mil/auth/realms/baby-yoda/account/
- Password: https://keycloak.dev.bigbang.mil/auth/realms/baby-yoda/account/password
- TOTP: https://keycloak.dev.bigbang.mil/auth/realms/baby-yoda/account/totp
-
Registration: https://keycloak.dev.bigbang.mil/register
-
Integration Testing: Follow Big Bang testing guide