Repository navigation
fix: mount svid-output volume in envoy-proxy container - #154
Merged
Merged
Conversation
The webhook injects AuthBridge sidecars into agent pods, but the envoy-proxy container was missing the svid-output volume mount. This prevented the go-processor from reading the SPIFFE JWT SVID file (/opt/jwt_svid.token) needed as a subject token for RFC 8693 token exchange on outbound requests. Add BuildEnvoyProxyContainerWithSpireOption() that conditionally mounts svid-output at /opt (read-only) when SPIRE is enabled. When SPIRE is disabled, the mount is omitted to avoid referencing a non-existent volume. Closes: #153 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Mariusz Sabath <[email protected]>
Member
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
anatolykoyfman
added a commit
that referenced
this pull request
Aug 26, 2026
Document the read-only pre-commit conflict diagnostic (issue #154) across the AIAC requirement specs, ahead of code. Add a dedicated sub-PRD (policy-conflict-check.md) covering the interface, diagnostic-assembly pipeline, ConflictReport/status contract, testing tiers, and acceptance criteria; thread cross-references through the PRB sub-PRD, the AIAC Agent component PRD (endpoint, use case, file structure), and the master PRD (component summary, architectural decision, agent capability). The live /apply -> 422 contradiction path is unchanged. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman
added a commit
that referenced
this pull request
Aug 26, 2026
Extract the focal-entity resolution inlined in ServicePolicyBuilder.build() into a standalone resolve_focal_entities(service_id, service_type) -> FocalEntitySet in agent/shared/focal_entities.py, callable by both the live builder and the upcoming policy-conflict diagnostic. Pure extraction, no behavior change to the live /apply path: existing builder tests pass unchanged. The HTTPException(502) (IdP unreachable) / HTTPException(404) (unknown service) boundary moves into the resolver, where the diagnostic's pre-survey HTTP boundary needs it. builder.py keeps routing service_type through its parameter (not focus.type), preserving the live /apply contract. Refs #155. Part of #154. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman
added a commit
that referenced
this pull request
Aug 26, 2026
Add agent/policy_rules_builder/diagnostic_models.py with the ConflictReport / Conflict / Unevaluated models, the EntityRef / FocalRef refs, and the FocalType / ConflictKind / ConflictStatus / UnevaluatedReason enums -- the stable structured shape the diagnostic engine, survey use-case, and route all serialize. Encodes the pinned focal{name,id,type} / role{name,id} / scope{name,id} / granting_quotes / prohibiting_quotes / quotes_verified contract.
Includes ConflictReport.derive_status / from_survey encoding the status precedence (conflicts_found > incomplete > no_conflict) for the survey use-case to apply. The live /apply models (Contradiction, AuditVerdict) are untouched -- no kind field added to shared models, per D11.
Refs #156. Part of #154.
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman
added a commit
that referenced
this pull request
Aug 26, 2026
Add agent/policy_rules_builder/diagnostic.py: a parallel diagnostic graph (START->seed->propose->precheck->audit_diagnostic->{explain|retry|END}) that reuses the live proposer/precheck/_structured_call unchanged but seeds policy_text from input (no file read), RECORDS genuine contradictions instead of raising, marks non-converging entities unevaluated, and adds a terminal explain node. The explain node classifies kind in {direct, coarse_scope} (D11), extracts verbatim granting/prohibiting quotes validated by a whitespace-normalized substring check, and does the name->id join + run-direction tagging (D12). On quote-validation failure the conflict is kept with quotes_verified=false and the auditor description as fallback.
Adds build_explain_messages to prompts.py (append-only). Exposes run_role_diagnostic / run_scope_diagnostic per-entity entry points returning DiagnosticResult(conflicts, unevaluated) for the survey use-case to fan out over. The live graph.py is byte-for-byte unedited; the live /apply -> 422 path is untouched (D14).
Refs #157. Part of #154.
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman
added a commit
that referenced
this pull request
Aug 26, 2026
Add agent/uc/policy_check/check.py::check_policy_conflicts(policy_text, service_id) -> ConflictReport: a sequential, read-only survey that runs every focal entity of the target service through the diagnostic graph to completion (the first conflict never aborts), accumulates all conflicts + unevaluated entries, and derives status via ConflictReport.from_survey with the zero-evaluated guard. service_type is derived read-only from the IdP catalog (focus.type of the service resolved by id) -- Provision is never run, so the survey never mutates IdP state. The resolver's HTTPException(502/404) pre-survey boundary is preserved on both the type lookup and resolve_focal_entities. Fan-out mirrors builder.py exactly (scope-focal over own_scopes; role-focal over flatten_role(own_role) x other_scopes for AGENT). A found conflict returns a report, never raises. Refs #158. Part of #154. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman
added a commit
that referenced
this pull request
Aug 26, 2026
Thin serialization shell over check_policy_conflicts: any completed survey returns 200 with the ConflictReport JSON body (the controller's first JSON response body). Unlike the live /apply path, a found conflict is a recorded diagnosis and never 422; the resolver's pre-survey HTTPException(502/404) propagates unchanged as a bare non-2xx with no report body, and a missing policy_text is a FastAPI validation 422. The /apply routes and the PolicyContradictionError/PolicyRulesBuilderError -> 422 handlers are untouched. Refs #159. Part of #154. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman
added a commit
that referenced
this pull request
Aug 26, 2026
) Two tiers in the new test/agent/policy_check/: - test_conflict_check_live_llm.py (-m llm, deselected by default): drives check_policy_conflicts end-to-end through the real LLM with only the catalog seam (focal_entities._config) stubbed and _structured_call left live. Planted direct + coarse-scope + clean fixtures on the scope-focal branch (Tool focus). Structural assertions only: clean => no_conflict; planted => confirmed set contains the planted (role, scope) pair, and every returned quote is a verbatim whitespace-normalized substring of policy_text (reusing the engine's _verify_quote). Skips cleanly when LLM env is unset. - test_apply_conflict_regression.py (deterministic, default suite): pins the unchanged live contract -- build_role_rules raises PolicyContradictionError on a genuine contradiction, and POST /apply/service/{id} maps it to 422 with the PCE never called. Tests only; no production code changed. Refs #160. Part of #154. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman
added a commit
that referenced
this pull request
Aug 26, 2026
Reorder the uc.* imports in controller/routes.py so offboarding < onboarding < policy_check, resolving ruff I001. The aiac/ tree is outside the repo pre-commit ruff scope (authbridge/-only), so this was not caught in CI. Import-only change; no behavior change. Addresses a review nit on #154. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman
added a commit
that referenced
this pull request
Sep 2, 2026
Address review feedback on #154 (PR #809). Correctness (was: silent drop -> clean masquerade): _explain joined the auditor's free-form Contradiction.candidate_name against this run's typed candidate set, and on a miss it 'continue'd silently. precheck filters the PROPOSER's name lists, not the auditor's candidate_name, so a confirmed contradiction against an unjoinable name was dropped with no trace -- and if it was the only one for the entity, the survey classified the entity clean and the report could reach no_conflict while a contradiction was confirmed. Now mark the focal entity Unevaluated(reason=unjoinable_candidate) so its presence forces status to incomplete (never no_conflict). New UnevaluatedReason enum member + regression test; existing enum-values test updated. Docs: declare POST /policy/check final in the sub-PRD (remove the settled /policy/check vs /policy/conflicts open item) -- the route shipped as /policy/check and PRD/component specs already say so. Docs (route): document that an empty policy_text is a well-formed request that surveys to no_conflict/incomplete (never conflicts_found), not a 422 -- AC#4 only requires a *missing* field to be non-2xx. Not changed (by design): quotes_verified=True with one empty quote side is intended per US#18 (description-derived grants carry no citation); a quoting FAILURE is what sets quotes_verified=False (US#19). The double get_services() fetch is tracked separately in rossoctl/rossoctl#2476. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Anatoly Koyfman <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
svid-outputvolume (read-only) in the envoy-proxy container when SPIRE is enabled, so the go-processor can read/opt/jwt_svid.tokenfor RFC 8693 token exchange on outbound requestsBuildEnvoyProxyContainerWithSpireOption()method following the same pattern asBuildClientRegistrationContainerWithSpireOption()Closes #153
Part of: rossoctl/rossoctl#767
Test plan
container_builder_test.go) covering SPIRE-enabled, SPIRE-disabled, default, and all-mounts scenariosgo vetcleansvid-outputmount🤖 Generated with Claude Code