Setup Single Sign-On of DefectDojo with Opstella
This content is not available in your language yet.
Prerequisites
Section titled “Prerequisites”To Setup Single Sign-On with Opstella, you need
- 📦Opstella Keycloak
- Your dedicated Keycloak Realm.
foobar-opstella; Please change accordingly - Public Signing Key.
- Your dedicated Keycloak Realm.
- 🔑OpenID Connect Credentials: Client ID, Client Secret.
- Gather Client ID, Client Secret - from Procuring Keycloak Credentials
DefectDojo Single Sign-On Integration
Section titled “DefectDojo Single Sign-On Integration”Connect to Kubernetes Cluster
Section titled “Connect to Kubernetes Cluster”-
Connect to
🟢 ManagementKubernetes Cluster ; i.e w/ Kubeconfig FileSet Kubeconfig File
Terminal window export KUBECONFIG="$HOME/opstella-installation/kubeconfigs/management_cluster.yaml"
Prepare DefectDojo Single Sign-On Configuration
Section titled “Prepare DefectDojo Single Sign-On Configuration”-
Specify OIDC Authentication Information
Using Opstella Keycloak Information
-
Opstella Keycloak Domain:
${KEYCLOAK_DOMAIN},${KEYCLOAK_REALM}are assumed to be exported as defined in the Shell Variables guide. -
Opstella Keycloak Public Signing Key
export KEYCLOAK_SIGNING_PUBKEY="CHANGEME" -
Client ID:
defectdojoexport DEFECTDOJO_OIDC_CLIENT_ID="defectdojo" -
Client secret:
CHANGEMEexport DEFECTDOJO_OIDC_CLIENT_SECRET="CHANGEME"
-
-
Create OIDC Authentication Information as Kubernetes Secret
Create Kubernetes Secret named
defectdojo-oidc-configurationsTerminal window kubectl apply --namespace devsecops-system -f - <<EOFapiVersion: v1kind: Secrettype: Opaquemetadata:name: defectdojo-oidc-configurationsstringData:client-id: ${DEFECTDOJO_OIDC_CLIENT_ID}client-secret: ${DEFECTDOJO_OIDC_CLIENT_SECRET}authorization-endpoint: https://${KEYCLOAK_DOMAIN}/realms/${KEYCLOAK_REALM}/protocol/openid-connect/authaccess-token-endpoint: https://${KEYCLOAK_DOMAIN}/realms/${KEYCLOAK_REALM}/protocol/openid-connect/tokensigning-public-key: ${KEYCLOAK_SIGNING_PUBKEY}EOF💡 Should return
secret/defectdojo-oidc-credentials createdmessage.
Reconfigure Installed DefectDojo Helm Values
Section titled “Reconfigure Installed DefectDojo Helm Values”-
Create Additional Helm Values that configures Single-Sign On
Terminal window cat <<EOF > $HOME/opstella-installation/helm-values/defectdojo-oidc-helm-values.yaml---## OPSTELLA_CUSTOMIZE/Application: Extra Configurations:## - OIDC with KeycloakextraConfigs:DD_SECURE_SSL_REDIRECT: 'True'DD_SOCIAL_AUTH_KEYCLOAK_OAUTH2_ENABLED: 'True'DD_SOCIAL_AUTH_KEYCLOAK_LOGIN_BUTTON_TEXT: "Sign in with Opstella"## OPSTELLA_CUSTOMIZE/Kubernetes/Application: Extra Environment Variables:## - OIDC with Keycloak: Related Values for SetupextraEnv:- name: DD_SOCIAL_AUTH_KEYCLOAK_PUBLIC_KEYvalueFrom:secretKeyRef:name: defectdojo-oidc-configurationskey: signing-public-key- name: DD_SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URLvalueFrom:secretKeyRef:name: defectdojo-oidc-configurationskey: authorization-endpoint- name: DD_SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URLvalueFrom:secretKeyRef:name: defectdojo-oidc-configurationskey: access-token-endpoint- name: DD_SOCIAL_AUTH_KEYCLOAK_KEYvalueFrom:secretKeyRef:name: defectdojo-oidc-configurationskey: client-id- name: DD_SOCIAL_AUTH_KEYCLOAK_SECRETvalueFrom:secretKeyRef:name: defectdojo-oidc-configurationskey: client-secretEOF -
Apply Additional Configurations with Helm
Terminal window helm upgrade defectdojo defectdojo/defectdojo \--namespace devsecops-system --version 1.6.179 \--reuse-values \-f $HOME/opstella-installation/helm-values/defectdojo-oidc-helm-values.yaml
Finished?
Use the below navigation to proceed