Repository navigation
feat(audit): audit credential disclosure reads - #4745
ericcurtin wants to merge 3 commits into
Conversation
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
|
@krishicks @johntmyers PTAL, and |
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
|
Merged main and fixed the conflicts. @krishicks @johntmyers PTAL, and |
|
@TaylorMutch @SDAChess PTAL when you get a chance, and |
|
@krishicks @purp PTAL when you get a chance, and |
|
@drew @TaylorMutch PTAL when you get a chance, and |
|
@krishicks @sjenning PTAL when you get a chance, and |
TaylorMutch
left a comment
There was a problem hiding this comment.
The disclosure audit helper, secret-canary tests, and documentation cover much of #3017. Before this PR closes the issue, please include the remaining disclosure coverage and attribution below, with regression tests.
-
Cover provider-environment disclosure through
ConnectSupervisor. At this PR's head, the stream already delivers provider environments through bootstrap and subsequent configuration updates (config_delivery/session.rs, includingbootstrap_update_inner). Instrumenting onlyGetSandboxProviderEnvironmentleaves supervisors receiving credentials over the stream outside the new disclosure audit trail. Please audit those deliveries and define the disclosure-attempt boundary and success/failure/cancellation semantics for the stream. Tests should cover bootstrap and subsequent updates, relevant failed/cancelled delivery paths, actor/resource/outcome/correlation fields, and secret canaries. Avoid treating a stream connection alone as proof that each credential-bearing update was delivered. -
Retain safe target attribution on denied credential-export attempts. In
provider_credentials.rs,require_operatorand request validation can return before workspace/provider/key identifiers are attached toDisclosureAudit. Those records identify the caller and outcome but cannot identify the requested provider, even when the target identifiers themselves are valid. Please retain independently validated, safe resource identifiers on these paths without logging raw malformed input. Add tests for a denied request with valid selectors and an invalid request with mixed valid identifiers and secret-bearing malformed input, asserting useful target attribution and no secret leakage.
Both changes support the issue's core goal: identifying who accessed or attempted to access which credentials. Please address them here if practical. If streaming coverage requires substantial architectural work, an explicitly scoped, linked follow-up is reasonable, but #3017 should remain open until that coverage lands. The denied-attempt attribution should be completed in this PR.
The [openshell.gateway.audit] toggle is not part of this change request. Excluding the retired GetInferenceBundle is also consistent with the issue's scope clarification.
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
|
@TaylorMutch item 2 is done: denied and invalid exports now keep each independently valid workspace, provider, and key, with tests for both cases and no leakage. Item 1 (ConnectSupervisor) needs per-update audit state across the async ack path in config_delivery (bootstrap, live, pending, session close), which is too large for this PR, so I changed the PR to "Part of #3017" and propose a follow-up for it. Could you /ok to test 4e56287? Thank you! |
Summary
Emit an OCSF event for each attempt to read provider credentials through
GetSandboxProviderEnvironmentandGetProviderCredentials.GetInferenceBundleis gone (#3172), so it is out of scope.Related Issue
Part of #3017 (ConnectSupervisor stream coverage is a follow-up).
Changes
DisclosureAuditrecords actor, resource identifiers, outcome, and request ID. It never records values or status text.cancelled.correlation_uidtoConfigStateChangeBuilder; reuseRequestOrigin::from_request.[openshell.gateway.audit]toggle yet; it does not exist onmain.Testing
cargo fmt,cargo clippy --all-targets, andcargo testforopenshell-serverandopenshell-ocsfpass. Canary secret tests cover both RPCs.Checklist