Skip to content

test(charts): add helm-unittest suite for ingestion-authz-configmap#207

Merged
saadqbal merged 1 commit into
developfrom
auto-coverage/ingestion-authz-configmap
Jun 8, 2026
Merged

test(charts): add helm-unittest suite for ingestion-authz-configmap#207
saadqbal merged 1 commit into
developfrom
auto-coverage/ingestion-authz-configmap

Conversation

@saadqbal

@saadqbal saadqbal commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What

Adds a helm-unittest suite for the previously-untested templates/ingestion-authz-configmap.yaml.

This ConfigMap is the authorization policy that decides which ServiceAccount(s) may call POST /internal/submit-ingestion-run on jobs-manager, scoped to table-name prefixes (client-runtime#21). jobs-manager loads it at startup as the single source of truth, so its fail-safe behaviour and fallbacks are security-relevant.

Coverage delta

  • +1 template suite (ingestion-authz-configmap) — chart suites 15 → 16
  • 8 assertions/tests, all green locally (full chart: 167 tests pass)

The suite asserts:

  1. Release-scoped name (RELEASE-NAME-ingestion-authz) + namespace
  2. Standard tracebloc.labels
  3. Default wildcard policy entry (default SA, release namespace, "*")
  4. Verbatim rendering of an explicit multi-prefix entry
  5. Per-entry service_account fallback to ingestionAuthz.serviceAccountName (Move ingestor ServiceAccount into parent client chart (shared resource) #129)
  6. Per-entry omitted namespace defaulting to the release namespace
  7. Fail-safe deny-all when ingestionAuthz is absent (pre-feat(#86): ingestor Helm subchart + companion RBAC/service/authz for new ingestion endpoint #123 --reuse-values upgrade) → empty allowed:, no service_account
  8. Fail-safe deny-all when ingestionAuthz.allowed is empty

Notes

  • Tests-only; no source/template/values changes.
  • Security invariants unchanged — the suite asserts the fail-safe deny-all default rather than relaxing it.

Refs #193


Note

Low Risk
Test-only change with no runtime or policy template modifications.

Overview
Adds a helm-unittest suite for templates/ingestion-authz-configmap.yaml, which was previously untested. The chart gains 8 cases (167 total tests) that lock in ConfigMap metadata/labels, default wildcard policy rendering, explicit multi-prefix entries, service_account fallback to ingestionAuthz.serviceAccountName, omitted namespace defaulting to the release namespace, and fail-safe deny-all when ingestionAuthz is null or allowed is empty.

Tests only — no Helm template or values changes; behavior is asserted, not modified.

Reviewed by Cursor Bugbot for commit b7f0b2d. Bugbot is set up for automated code reviews on this repo. Configure here.

Covers the previously-untested templates/ingestion-authz-configmap.yaml —
the authorization policy that gates POST /internal/submit-ingestion-run on
jobs-manager (client-runtime#21). 8 tests assert: release-scoped naming,
standard labels, the default wildcard policy entry, verbatim rendering of
explicit multi-prefix entries, the per-entry service_account fallback to
ingestionAuthz.serviceAccountName (#129), per-entry namespace defaulting to
the release namespace, and the fail-safe deny-all behaviour when
ingestionAuthz (or its allowed list) is absent from a --reuse-values upgrade.

Tests-only; no source/template/values changes. Security invariants unchanged.

Refs #193

Co-Authored-By: Claude <noreply@anthropic.com>
@saadqbal saadqbal added the auto-coverage Automated test-coverage PRs label Jun 5, 2026
@saadqbal saadqbal self-assigned this Jun 5, 2026
@LukasWodka

Copy link
Copy Markdown
Contributor

👋 Heads-up — Code review queue is at 17 / 8

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

This was referenced Jun 5, 2026
@saadqbal saadqbal merged commit c3003b1 into develop Jun 8, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-coverage Automated test-coverage PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants