UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 7d7b3101 authored by kevin.wilder's avatar kevin.wilder Committed by Michael McLeroy
Browse files

Resolve "Keycloak new release"

parent e89e5651
No related branches found
No related tags found
1 merge request!541Resolve "Keycloak new release"
...@@ -22,9 +22,6 @@ monitoring: ...@@ -22,9 +22,6 @@ monitoring:
serviceMonitor: serviceMonitor:
enabled: {{ .Values.monitoring.enabled }} enabled: {{ .Values.monitoring.enabled }}
networkPolicies:
enabled: {{ .Values.networkPolicies.enabled }}
{{- if .Values.addons.keycloak.database.host }} {{- if .Values.addons.keycloak.database.host }}
postgresql: postgresql:
enabled: false enabled: false
...@@ -33,15 +30,17 @@ postgresql: ...@@ -33,15 +30,17 @@ postgresql:
{{- if or .Values.addons.keycloak.database.host (and .Values.addons.keycloak.ingress.cert .Values.addons.keycloak.ingress.key) }} {{- if or .Values.addons.keycloak.database.host (and .Values.addons.keycloak.ingress.cert .Values.addons.keycloak.ingress.key) }}
secrets: secrets:
{{- if and .Values.addons.keycloak.ingress.cert .Values.addons.keycloak.ingress.key }} {{- if and .Values.addons.keycloak.ingress.cert .Values.addons.keycloak.ingress.key }}
certificates: tlscert:
stringData: stringData:
tls.crt: {{ .Values.addons.keycloak.ingress.cert | quote }} tls.crt: {{ .Values.addons.keycloak.ingress.cert | quote }}
tlskey:
stringData:
tls.key: {{ .Values.addons.keycloak.ingress.key | quote }} tls.key: {{ .Values.addons.keycloak.ingress.key | quote }}
{{- end }} {{- end }}
{{- with .Values.addons.keycloak.database }} {{- with .Values.addons.keycloak.database }}
{{- if .host }} {{- if .host }}
db: env:
stringData: stringData:
DB_USER: {{ .username | quote }} DB_USER: {{ .username | quote }}
DB_PASSWORD: {{ .password | quote }} DB_PASSWORD: {{ .password | quote }}
...@@ -53,10 +52,24 @@ secrets: ...@@ -53,10 +52,24 @@ secrets:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.addons.keycloak.database.host }} {{- if and .Values.addons.keycloak.ingress.cert .Values.addons.keycloak.ingress.key }}
extraEnvFrom: | extraVolumesBigBang:
- secretRef: - name: tlscert
name: 'keycloak-db' secret:
{{- end }} secretName: keycloak-tlscert
- name: tlskey
secret:
secretName: keycloak-tlskey
extraVolumeMountsBigBang:
- name: tlscert
mountPath: /etc/x509/https/tls.crt
subPath: tls.crt
readOnly: true
- name: tlskey
mountPath: /etc/x509/https/tls.key
subPath: tls.key
readOnly: true
{{- end }} {{- end }}
{{- end }}
\ No newline at end of file
...@@ -933,9 +933,10 @@ addons: ...@@ -933,9 +933,10 @@ addons:
git: git:
repo: https://repo1.dso.mil/platform-one/big-bang/apps/security-tools/keycloak.git repo: https://repo1.dso.mil/platform-one/big-bang/apps/security-tools/keycloak.git
path: "./chart" path: "./chart"
tag: "11.0.0-bb.1" tag: "11.0.0-bb.4"
# -- Certificate/Key pair to use as the certificate for exposing Keycloak # -- Certificate/Key pair to use as the certificate for exposing Keycloak
# Setting the ingress cert here will automatically create the volume and volumemounts in the Keycloak Package chart
ingress: ingress:
key: "" key: ""
cert: "" cert: ""
......
...@@ -48,11 +48,75 @@ Due to the sensitivity of Keycloak, Big Bang does not support deploying KeyCloak ...@@ -48,11 +48,75 @@ Due to the sensitivity of Keycloak, Big Bang does not support deploying KeyCloak
The upstream [Keycloak Helm chart](https://repo1.dso.mil/platform-one/big-bang/apps/security-tools/keycloak) is customized for use in Platform One. It contains the following modifications from a standard Keycloak deployment: The upstream [Keycloak Helm chart](https://repo1.dso.mil/platform-one/big-bang/apps/security-tools/keycloak) is customized for use in Platform One. It contains the following modifications from a standard Keycloak deployment:
- DoD Certificate Authorities - Customized Platform One registration plugin
- Customized Platform One registration
- Customizable Platform One realm, with IL2, IL4, and IL5 isolation (not loaded by default, but [available in the package's git repo](https://repo1.dso.mil/platform-one/big-bang/apps/security-tools/keycloak/-/blob/main/chart/resources/dev/baby-yoda.json)) Additional customization can be added through values. For example:
- Redirects for specific keycloak endpoints to work with Platform One deployments
- A customized image, based on Iron Bank's Keycloak, that adds a plugin to support the above features ```yaml
addons:
keycloak:
# Setup TLS key pair
# An alternative to this is to create a secret namged `tlskey` and `tlscert` using Kustomize in the customer template. Then use the volume and volumemount configuration below to mount the files. In this case, the `ingress.key` and `ingress.cert` would be left blank.
ingress:
key: |-
{insert keycloak TLS key}
cert: |-
{insert keycloak TLS cert}
values:
secrets:
# The `env` secret is used to add environmental variables to the keycloak pod
env:
stringData:
# Keycloak will use the `customreg.yaml` for configuring the custom registration process.
CUSTOM_REGISTRATION_CONFIG: /opt/jboss/keycloak/customreg.yaml
# Keycloak will load a custom realm defined in `realm.json`
KEYCLOAK_IMPORT: /opt/jboss/keycloak/realm.json
# Keycloak will load a custom set of certificate authorities
X509_CA_BUNDLE: /etc/x509/https/cas.pem
# The `certauthority` secret holds the certificate authority keys.
# Using the customer template, kustomize could be used to create the secret instead of using the keycloak chart via values
certauthority:
stringData:
cas.pem: |-
{insert CAS.PEM content}
# The `customreg` secret holds the configuration for customer registration.
# Using the customer template, kustomize could be used to create the secret instead of using the keycloak chart via values
customreg:
stringData:
customreg.yaml: |-
{insert customreg.yaml content}
# The `realm` secret holds the custom realm configuration.
# Using the customer template, kustomize could be used to create the secret instead of using the keycloak chart via values
realm:
stringData:
realm.json: |-
{insert realm.json content}
# Create volumes for each secret above
extraVolumes: |-
- name: certauthority
secret:
secretName: {{ include "keycloak.fullname" . }}-certauthority
- name: customreg
secret:
secretName: {{ include "keycloak.fullname" . }}-customreg
- name: realm
secret:
secretName: {{ include "keycloak.fullname" . }}-realm
# Volume mount each volume in the appropriate location
extraVolumeMounts: |-
- name: certauthority
mountPath: /etc/x509/https/cas.pem
subPath: cas.pem
readOnly: true
- name: customreg
mountPath: /opt/jboss/keycloak/customreg.yaml
subPath: customreg.yaml
readOnly: true
- name: realm
mountPath: /opt/jboss/keycloak/realm.json
subPath: realm.json
readOnly: true
```
### Keycloak Admin password ### Keycloak Admin password
...@@ -112,8 +176,8 @@ To workaround this situation, you have to isolate the applications by IP, port, ...@@ -112,8 +176,8 @@ To workaround this situation, you have to isolate the applications by IP, port,
### GUI ### GUI
Keycloak has two main end point URLs: Keycloak has two main end point URLs:
https://keycloak.bigbang.dev for authentication. [https://keycloak.bigbang.dev](https://keycloak.bigbang.dev) for authentication.
https://keycloak.bigbang.dev/auth/admin for administration. [https://keycloak.bigbang.dev/auth/admin](https://keycloak.bigbang.dev/auth/admin) for administration.
The `bigbang.dev` domain name can be customized by setting the `hostname` in `values.yaml` The `bigbang.dev` domain name can be customized by setting the `hostname` in `values.yaml`
...@@ -190,6 +254,6 @@ addons: ...@@ -190,6 +254,6 @@ addons:
## Dependent Packages ## Dependent Packages
- PostgreSQL for in-cluster development/test database
- Istio for ingress - Istio for ingress
- (Optional) Monitoring for metrics - (Optional) Monitoring for metrics
- PostgreSQL database (development/test only)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment