From 10414da243b87d222178981db57c25453dc28fa6 Mon Sep 17 00:00:00 2001 From: Tamar Weisskopf Date: Wed, 7 Oct 2026 13:54:29 +0300 Subject: [PATCH 1/5] Add self-hosted LLM + OIDC sample CR and add auth.oidc to full CR Add exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml for users deploying with a self-hosted LLM, self-hosted embedding, and OIDC authentication (Keycloak, Cognito, Azure Entra). Add auth.oidc section to exploitiq_v1alpha1_exploitiqstack_full.yaml so it showcases the OIDC configuration fields. Update kustomization.yaml and README.md to include the new sample. Resolves: TC-6727 Co-Authored-By: Claude Opus 4.6 --- config/samples/README.md | 33 +++++++++++++++++++ ...xploitiq_v1alpha1_exploitiqstack_full.yaml | 8 +++++ ...1_exploitiqstack_self_hosted_llm_oidc.yaml | 32 ++++++++++++++++++ config/samples/kustomization.yaml | 1 + 4 files changed, 74 insertions(+) create mode 100644 config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml diff --git a/config/samples/README.md b/config/samples/README.md index 2139acf9..16c09167 100644 --- a/config/samples/README.md +++ b/config/samples/README.md @@ -235,6 +235,39 @@ kubectl apply -f exploitiq_v1alpha1_exploitiqstack_kubernetes_oidc_cognito.yaml --- +### 6. **exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml** + +**Platform**: Kubernetes (or OpenShift) +**Use Case**: Self-hosted LLM with OIDC authentication + +**Features**: + +- Self-hosted LLM with OpenAI-compatible API +- Self-hosted embedding NIM (optional — omit `embedding` block for NVIDIA-hosted) +- OIDC authentication via Keycloak (or any OIDC provider) + +**Use this when**: + +- You have a self-hosted LLM and want OIDC authentication +- You are running on Kubernetes (not OpenShift) or OpenShift with external OIDC + +**Before applying**: + +1. Replace `spec.llm.baseURL` and `spec.llm.modelName` with your LLM endpoint and model +2. Replace `spec.auth.oidc.issuerURL` and `spec.auth.oidc.clientID` with your OIDC provider details +3. Create the OIDC client secret: + + ```bash + kubectl create secret generic oidc-client-secret \ + --from-literal=client-secret=YOUR_OIDC_CLIENT_SECRET + ``` + +```bash +kubectl apply -f exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml +``` + +--- + ## Quick Start Workflow Generate the HMAC_SECRET_KEY: diff --git a/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml b/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml index 1e7222ba..c9a5029b 100644 --- a/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml +++ b/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml @@ -21,6 +21,14 @@ spec: authSecretRef: # Set when embedding upstream requires API key auth name: exploit-iq-secret key: nvidia_api_key + auth: + oidc: + issuerURL: https://keycloak.example.com/realms/exploit-iq # Replace with your OIDC provider + clientID: exploit-iq-client # Replace with your OIDC client ID + clientSecretRef: + name: oidc-client-secret + key: client-secret + provider: keycloak # keycloak (default) or cognito engine: mainContainer: # Override the agent (engine) image. Omit to use the operator's default image. diff --git a/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml b/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml new file mode 100644 index 00000000..4eabf471 --- /dev/null +++ b/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml @@ -0,0 +1,32 @@ +apiVersion: exploitiq.openshift.io/v1alpha1 +kind: ExploitIQStack +metadata: + labels: + app.kubernetes.io/name: exploitiq-operator + name: exploitiqstack-self-hosted-llm-oidc +spec: + llm: + mode: openai # Self-hosted LLM with OpenAI-compatible API + baseURL: http://vllm.ai-namespace.svc:8000/v1 # Replace with your self-hosted LLM endpoint + modelName: meta-llama/Meta-Llama-3.1-70B-Instruct # Replace with your model name + embedding: + # Self-hosted embedding NIM. Omit this block to use the NVIDIA-hosted endpoint. + baseURL: http://nim-embed.ai-namespace.svc:8000/v1 # Replace with your embedding endpoint + modelName: nvidia/nv-embedqa-e5-v5 # Replace with the model your embedder serves + auth: + oidc: + issuerURL: https://keycloak.example.com/realms/exploit-iq # Replace with your OIDC provider + clientID: exploit-iq-client # Replace with your OIDC client ID + clientSecretRef: + name: oidc-client-secret # Create this Secret with your OIDC client secret + key: client-secret + provider: keycloak # keycloak (default) or cognito + webApp: + registryCredentialsSecretRef: + name: image-registry-credentials + # External MongoDB connection (Mode A — host + port). + # Secret must contain keys: host, username, password + database: + mode: hostPort + secretRef: + name: mongodb-credentials diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 0cdcb120..1c7f1830 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -4,4 +4,5 @@ resources: - exploitiq_v1alpha1_exploitiqstack_self_hosted_llm.yaml - exploitiq_v1alpha1_exploitiqstack_kubernetes_oidc_keycloak.yaml - exploitiq_v1alpha1_exploitiqstack_kubernetes_oidc_cognito.yaml +- exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml # +kubebuilder:scaffold:manifestskustomizesamples From 04af23c8223673b6d44aae7c3e49ac86458b30ff Mon Sep 17 00:00:00 2001 From: Tamar Weisskopf Date: Wed, 7 Oct 2026 17:14:45 +0300 Subject: [PATCH 2/5] Fix sample CR baseURL and add missing secret step to README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove /v1 path from baseURL in the self-hosted LLM + OIDC sample CR — the operator's nginx cache uses baseURL as a proxy_pass upstream in a regex location, which crashes when the URL contains a path component. Add the exploit-iq-secret creation step to README section 6, consistent with sections 2 and 3. Co-Authored-By: Claude Opus 4.6 --- config/samples/README.md | 10 +++++++++- ...q_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config/samples/README.md b/config/samples/README.md index 16c09167..19995a1c 100644 --- a/config/samples/README.md +++ b/config/samples/README.md @@ -255,9 +255,17 @@ kubectl apply -f exploitiq_v1alpha1_exploitiqstack_kubernetes_oidc_cognito.yaml 1. Replace `spec.llm.baseURL` and `spec.llm.modelName` with your LLM endpoint and model 2. Replace `spec.auth.oidc.issuerURL` and `spec.auth.oidc.clientID` with your OIDC provider details -3. Create the OIDC client secret: +3. Create the required secrets: ```bash + export HMAC_SECRET_KEY=$(openssl rand -base64 32) + + kubectl create secret generic exploit-iq-secret \ + --from-literal=ghsa_api_key=YOUR_GITHUB_TOKEN \ + --from-literal=nvidia_api_key=YOUR_NVIDIA_KEY \ + --from-literal=serpapi_api_key=YOUR_SERPAPI_KEY \ + --from-literal=hmac-secret-key="$HMAC_SECRET_KEY" + kubectl create secret generic oidc-client-secret \ --from-literal=client-secret=YOUR_OIDC_CLIENT_SECRET ``` diff --git a/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml b/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml index 4eabf471..bac302d6 100644 --- a/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml +++ b/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml @@ -7,11 +7,11 @@ metadata: spec: llm: mode: openai # Self-hosted LLM with OpenAI-compatible API - baseURL: http://vllm.ai-namespace.svc:8000/v1 # Replace with your self-hosted LLM endpoint + baseURL: http://vllm.ai-namespace.svc:8000 # Replace with your self-hosted LLM endpoint (no /v1 — the operator appends the path) modelName: meta-llama/Meta-Llama-3.1-70B-Instruct # Replace with your model name embedding: # Self-hosted embedding NIM. Omit this block to use the NVIDIA-hosted endpoint. - baseURL: http://nim-embed.ai-namespace.svc:8000/v1 # Replace with your embedding endpoint + baseURL: http://nim-embed.ai-namespace.svc:8000 # Replace with your embedding endpoint (no /v1 — the operator appends the path) modelName: nvidia/nv-embedqa-e5-v5 # Replace with the model your embedder serves auth: oidc: From 80231a17049c405b45dac242ba5f99dfaaf52c86 Mon Sep 17 00:00:00 2001 From: Tamar Weisskopf Date: Wed, 7 Oct 2026 17:59:06 +0300 Subject: [PATCH 3/5] Remove inline explanation from baseURL comments Co-Authored-By: Claude Opus 4.6 --- ...xploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml b/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml index bac302d6..082e8d42 100644 --- a/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml +++ b/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml @@ -7,11 +7,11 @@ metadata: spec: llm: mode: openai # Self-hosted LLM with OpenAI-compatible API - baseURL: http://vllm.ai-namespace.svc:8000 # Replace with your self-hosted LLM endpoint (no /v1 — the operator appends the path) + baseURL: http://vllm.ai-namespace.svc:8000 # Replace with your self-hosted LLM endpoint modelName: meta-llama/Meta-Llama-3.1-70B-Instruct # Replace with your model name embedding: # Self-hosted embedding NIM. Omit this block to use the NVIDIA-hosted endpoint. - baseURL: http://nim-embed.ai-namespace.svc:8000 # Replace with your embedding endpoint (no /v1 — the operator appends the path) + baseURL: http://nim-embed.ai-namespace.svc:8000 # Replace with your embedding endpoint modelName: nvidia/nv-embedqa-e5-v5 # Replace with the model your embedder serves auth: oidc: From 3b3d1522f51a984df8660ff13e3907f4b25ac9db Mon Sep 17 00:00:00 2001 From: Tamar Weisskopf Date: Thu, 8 Oct 2026 12:51:51 +0300 Subject: [PATCH 4/5] Address review comments on sample CRs - Remove nvidia_api_key from section 6 secret (not needed when both LLM and embedding are self-hosted) and add a note explaining when it is required. - Add commented-out cognitoDomain to the full reference CR so users know it exists and is required when provider is cognito. Co-Authored-By: Claude Opus 4.6 --- config/samples/README.md | 4 +++- config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/samples/README.md b/config/samples/README.md index 19995a1c..4a587fc0 100644 --- a/config/samples/README.md +++ b/config/samples/README.md @@ -262,7 +262,6 @@ kubectl apply -f exploitiq_v1alpha1_exploitiqstack_kubernetes_oidc_cognito.yaml kubectl create secret generic exploit-iq-secret \ --from-literal=ghsa_api_key=YOUR_GITHUB_TOKEN \ - --from-literal=nvidia_api_key=YOUR_NVIDIA_KEY \ --from-literal=serpapi_api_key=YOUR_SERPAPI_KEY \ --from-literal=hmac-secret-key="$HMAC_SECRET_KEY" @@ -270,6 +269,9 @@ kubectl apply -f exploitiq_v1alpha1_exploitiqstack_kubernetes_oidc_cognito.yaml --from-literal=client-secret=YOUR_OIDC_CLIENT_SECRET ``` + > **Note**: `nvidia_api_key` is not required when both LLM and embedding are self-hosted. + > Add it only if you remove the `embedding` block to fall back to the NVIDIA-hosted endpoint. + ```bash kubectl apply -f exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml ``` diff --git a/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml b/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml index c9a5029b..f0cda185 100644 --- a/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml +++ b/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml @@ -29,6 +29,7 @@ spec: name: oidc-client-secret key: client-secret provider: keycloak # keycloak (default) or cognito + # cognitoDomain: exploit-iq.auth.us-east-1.amazoncognito.com # Required when provider is cognito engine: mainContainer: # Override the agent (engine) image. Omit to use the operator's default image. From 8539061e03fce79ce1a73ef9b5718d965a4ac0c9 Mon Sep 17 00:00:00 2001 From: Tamar Weisskopf Date: Thu, 8 Oct 2026 14:51:35 +0300 Subject: [PATCH 5/5] Fix duplicate section 3 in README, add entra provider to comments - Remove stale duplicate section 3 (referenced non-existent custom_images2.yaml) - Add entra to OIDC provider comment in self_hosted_llm_oidc and full CRs - Add commented-out entraScope to full reference CR Co-Authored-By: Claude Opus 4.6 --- config/samples/README.md | 42 ------------------- ...xploitiq_v1alpha1_exploitiqstack_full.yaml | 3 +- ...1_exploitiqstack_self_hosted_llm_oidc.yaml | 2 +- 3 files changed, 3 insertions(+), 44 deletions(-) diff --git a/config/samples/README.md b/config/samples/README.md index 4a587fc0..38a81c73 100644 --- a/config/samples/README.md +++ b/config/samples/README.md @@ -118,48 +118,6 @@ oc create secret generic exploit-iq-secret \ --from-literal=hmac-secret-key="$HMAC_SECRET_KEY" ``` -```bash -oc apply -f exploitiq_v1alpha1_exploitiqstack_custom_images2.yaml -``` - ---- - -### 3. **exploitiq_v1alpha1_exploitiqstack_full.yaml** - -**Platform**: OpenShift or Kubernetes -**Use Case**: OpenAI-hosted (or OpenAI-compatible) LLM with NVIDIA-hosted embedding API - -**Features**: - -- OpenAI-compatible LLM with API key auth (`llm.authSecretRef`) -- NVIDIA-hosted embedding endpoint with independent API key (`embedding.authSecretRef`) -- Custom engine and webapp images - -**Use this when**: - -- Your LLM is OpenAI or another hosted OpenAI-compatible API that requires a key -- Embeddings are served by the NVIDIA-hosted embedding API (not self-hosted) -- Both services require separate API keys - -**Why `embedding.authSecretRef` is required here**: when `llm.mode` is `openai`, the -operator does not use `exploit-iq-secret.nvidia_api_key` for the nginx embedding route. -Without `embedding.authSecretRef` the cache renders `Authorization: Bearer EMPTY` for -`/nim_embed` requests, causing 401 errors from the NVIDIA embedding API. - -**Before applying**: - -1. Create `exploit-iq-secret` with both the OpenAI and NVIDIA keys: - -```bash -export HMAC_SECRET_KEY=$(openssl rand -base64 32) -oc create secret generic exploit-iq-secret \ - --from-literal=ghsa_api_key=YOUR_GITHUB_TOKEN \ - --from-literal=nvidia_api_key=YOUR_NVIDIA_API_KEY \ - --from-literal=openai_api_key=YOUR_OPENAI_API_KEY \ - --from-literal=serpapi_api_key=YOUR_SERPAPI_KEY \ - --from-literal=hmac-secret-key="$HMAC_SECRET_KEY" -``` - ```bash oc apply -f exploitiq_v1alpha1_exploitiqstack_full.yaml ``` diff --git a/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml b/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml index f0cda185..d762e313 100644 --- a/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml +++ b/config/samples/exploitiq_v1alpha1_exploitiqstack_full.yaml @@ -28,8 +28,9 @@ spec: clientSecretRef: name: oidc-client-secret key: client-secret - provider: keycloak # keycloak (default) or cognito + provider: keycloak # keycloak (default), cognito, or entra # cognitoDomain: exploit-iq.auth.us-east-1.amazoncognito.com # Required when provider is cognito + # entraScope: api:///.default # Required when provider is entra; must end with /.default engine: mainContainer: # Override the agent (engine) image. Omit to use the operator's default image. diff --git a/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml b/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml index 082e8d42..21f9257f 100644 --- a/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml +++ b/config/samples/exploitiq_v1alpha1_exploitiqstack_self_hosted_llm_oidc.yaml @@ -20,7 +20,7 @@ spec: clientSecretRef: name: oidc-client-secret # Create this Secret with your OIDC client secret key: client-secret - provider: keycloak # keycloak (default) or cognito + provider: keycloak # keycloak (default), cognito, or entra webApp: registryCredentialsSecretRef: name: image-registry-credentials