feat(plugin-access-manager): add auth-backend initDataFile + ALLOW_INSECURE_TLS - #1718
feat(plugin-access-manager): add auth-backend initDataFile + ALLOW_INSECURE_TLS#1718guimoreirar wants to merge 1 commit into
Conversation
…SECURE_TLS Segregated from develop as its own PR to main (chart change only; Chart.yaml version left to the release pipeline; docs/CHANGELOG handled separately).
📝 WalkthroughWalkthroughThe auth backend Helm templates add configurable insecure TLS and extra environment variables to the backend ConfigMap, while migration containers receive equivalent ChangesAuth backend configuration
✨ Finishing Touches✨ Simplify code
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)charts/plugin-access-manager/templates/auth-backend/configmap.yamlTraceback (most recent call last): charts/plugin-access-manager/templates/auth-backend/migrations.yamlTraceback (most recent call last): Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@charts/plugin-access-manager/templates/auth-backend/configmap.yaml`:
- Around line 23-27: Update the ALLOW_INSECURE_TLS template expression in the
auth backend ConfigMap so an explicitly configured boolean false is preserved
instead of being replaced by the true default. Use hasKey to apply the default
only when auth.backend.allowInsecureTLS is omitted, while continuing to quote
the rendered value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: efd74c1f-a5c6-4143-9fd9-d1c9b548cb59
📒 Files selected for processing (2)
charts/plugin-access-manager/templates/auth-backend/configmap.yamlcharts/plugin-access-manager/templates/auth-backend/migrations.yaml
| # Allows the backend's outbox Postgres client to connect without a valid | ||
| # certificate. Same default and rationale as auth.configmap.ALLOW_INSECURE_TLS | ||
| # and identity.configmap.ALLOW_INSECURE_TLS. Casdoor ignores this key; only | ||
| # caradhras' outbox client reads it, and it fails closed without it. | ||
| ALLOW_INSECURE_TLS: {{ .Values.auth.backend.allowInsecureTLS | default "true" | quote }} |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
rendered="$(helm template review charts/plugin-access-manager \
--set auth.backend.allowInsecureTLS=false)"
grep -q 'ALLOW_INSECURE_TLS: "false"' <<<"$rendered"Repository: LerianStudio/helm
Length of output: 197
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '\n== target template ==\n'
cat -n charts/plugin-access-manager/templates/auth-backend/configmap.yaml | sed -n '1,120p'
printf '\n== values occurrences ==\n'
rg -n "allowInsecureTLS|ALLOW_INSECURE_TLS" charts/plugin-access-manager -S
printf '\n== values file snippets ==\n'
for f in \
charts/plugin-access-manager/values.yaml \
charts/plugin-access-manager/values*.yaml \
charts/plugin-access-manager/templates/auth-backend/*.yaml \
charts/plugin-access-manager/templates/auth-backend/**/*.yaml
do
[ -f "$f" ] && { printf '\n-- %s --\n' "$f"; cat -n "$f" | sed -n '1,220p'; }
doneRepository: LerianStudio/helm
Length of output: 40071
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
sed -n '1,120p' charts/plugin-access-manager/templates/auth-backend/configmap.yaml
printf '\n---\n'
rg -n "allowInsecureTLS|ALLOW_INSECURE_TLS" charts/plugin-access-manager -S
printf '\n--- values.yaml ---\n'
sed -n '1,220p' charts/plugin-access-manager/values.yamlRepository: LerianStudio/helm
Length of output: 11359
charts/plugin-access-manager/templates/auth-backend/configmap.yaml:27 — Preserve false for the TLS toggle. default treats an explicit boolean false as empty, so this renders "true" and blocks disabling insecure TLS via a boolean override. Use hasKey to distinguish an omitted value from false, or make this setting a string.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@charts/plugin-access-manager/templates/auth-backend/configmap.yaml` around
lines 23 - 27, Update the ALLOW_INSECURE_TLS template expression in the auth
backend ConfigMap so an explicitly configured boolean false is preserved instead
of being replaced by the true default. Use hasKey to apply the default only when
auth.backend.allowInsecureTLS is omitted, while continuing to quote the rendered
value.
feat(plugin-access-manager): add auth-backend initDataFile + ALLOW_INSECURE_TLS
Segregated from develop as its own PR to main (chart change only; Chart.yaml
version left to the release pipeline; docs/CHANGELOG handled separately).