Security and Identity Installation
Install Keycloak-operator Component
-
Create
securitynamespace andkeycloak-adminsecret:kubectl create namespace security
kubectl -n security create secret generic keycloak-admin \
--from-literal=username=admin \
--from-literal=password="$(openssl rand -base64 12)" \
--type=Opaque \
--dry-run=client -o yaml | kubectl apply -f - -
Apply
keycloak-operatorhelm chart with the command:helm upgrade --install keycloak-operator-helm keycloak-operator-helm/. -n security --create-namespace --values keycloak-operator-helm/values.yaml --wait --timeout 900s --dependency-update
Install Keycloak Component
-
Fill in values in values.yaml and apply
keycloakhelm chart with the command:helm upgrade --install keycloak keycloak-helm/. -n security --values keycloak-helm/values-azure.yaml --wait --timeout 900s --dependency-updateKeycloak Admin UI can be accessed by the following URL:
https://codemie.private.lab.com/keycloak/admin, e.g.https://codemie.example.com/keycloak/admin
Install OAuth2 Proxy Component
Authentication middleware that provides secure authentication for the AI/Run CodeMie application by integrating with Keycloak
-
Create Kubernetes namespace, e.g.
oauth2-proxywith the command:kubectl create namespace oauth2-proxy -
Create
oauth2-secretwith keycloak client data:kubectl create secret generic oauth2-proxy \
--namespace=oauth2-proxy \
--from-literal=client-id='codemie' \
--from-literal=client-secret="$(openssl rand -base64 12)" \
--from-literal=cookie-secret=$(dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64 | tr -d -- '\n' | tr -- '+/' '-_' ; echo) \
--type=OpaqueSecret example:
apiVersion: v1
kind: Secret
metadata:
name: oauth2-proxy
namespace: oauth2-proxy
data:
client-id: <base64-encoded-client-id>
client-secret: <base64-encoded-client-secret>
cookie-secret: <base64-encoded-cookie-secret>
type: Opaque -
Copy
keycloaksecret tooauth2-proxynamespace:kubectl get secret keycloak-admin -n security -o yaml | sed '/namespace:/d' | kubectl apply -n oauth2-proxy -f - -
Install
oauth2-proxyhelm chart in created namespace with the command:helm upgrade --install oauth2-proxy oauth2-proxy/. -n oauth2-proxy --values oauth2-proxy/values-azure.yaml --wait --timeout 900s --dependency-update
Next Steps
Proceed to Plugin Engine installation.