fix(sccm): remove fixture identity allowlists from intake - #508
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughServer intake now accepts structured synthetic identities instead of fixture-specific allowlists. Declared source IDs come from the catalog. Hierarchy profile admission uses approved payload digests. Tests and fixtures use deterministic synthetic identifiers. ChangesSCCM server intake validation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ServerIntake
participant IdentityValidators
participant Catalog
participant HierarchyProfile
participant ServerManifest
ServerIntake->>IdentityValidators: Validate synthetic identity formats
IdentityValidators-->>ServerIntake: Return validation results
ServerIntake->>Catalog: Check declared source ID
Catalog-->>ServerIntake: Return catalog membership
ServerIntake->>HierarchyProfile: Check approved payload digest
HierarchyProfile-->>ServerIntake: Return digest admission
ServerIntake->>ServerManifest: Accept or reject manifest
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs`:
- Around line 3035-3039: Restrict safe_manifest_artifact_id and the related
synthetic identity validation at
crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs:3035-3039 and
3066-3077 to fixed semantic segments containing only numeric or otherwise
nonsemantic tokens, rejecting identity-bearing values such as jane-doe and
synthetic:host:jane-doe-01; update the associated intake handling at
crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs:3192-3250
accordingly. Add rejection coverage in
crates/cmtraceopen-parser/tests/sccm_server_intake.rs:918-940. Revise the
privacy claim and supporting plan text in
docs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.md:5-8
and 89-129 to describe the narrowed guarantee.
In `@crates/cmtraceopen-parser/tests/sccm_server_intake.rs`:
- Around line 918-940: Add a companion rejection test near
server_intake_accepts_new_conforming_synthetic_identities that mutates the
relevant synthetic identity field to a hyphenated personal-name-shaped token
such as jane-doe, then assert assess_server_intake returns an error. Keep the
existing structurally synthetic acceptance case unchanged and target the
identity field validated by synthetic_slug.
In
`@docs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.md`:
- Around line 5-8: Update the plan’s grammar definition and privacy-safety claim
to require non-user semantic token segments, rather than permitting arbitrary
lowercase slugs such as jane-doe. Apply this requirement consistently throughout
the affected sections, including the design details covered by the referenced
range, and preserve rejection of identity-bearing strings before public
projection.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d4e7ad43-cbea-4201-908b-a79607e35f19
📒 Files selected for processing (5)
crates/cmtraceopen-parser/src/sccm/server/windows/catalog.rscrates/cmtraceopen-parser/src/sccm/server/windows/intake.rscrates/cmtraceopen-parser/tests/sccm_server_intake.rsdocs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.mdlibrary.md
9a30a9d to
2af3c9a
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
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 `@crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs`:
- Around line 1034-1045: Use the same site representation for the synthetic
topology handle and hierarchy-link endpoint comparisons in the intake flow
around synthetic topology admission and hierarchy direction validation.
Normalize both values consistently, or compare against the raw synthetic site
code, so matching origin or target links produce a populated
hierarchy_admission.direction instead of None. Add a regression test covering a
synthetic hierarchy artifact with a matching origin or target link.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f46d598e-b340-4ffc-bc10-1ff566ef245d
📒 Files selected for processing (90)
crates/cmtraceopen-parser/src/sccm/server/windows/catalog.rscrates/cmtraceopen-parser/src/sccm/server/windows/distribution_point.rscrates/cmtraceopen-parser/src/sccm/server/windows/hierarchy.rscrates/cmtraceopen-parser/src/sccm/server/windows/intake.rscrates/cmtraceopen-parser/src/sccm/server/windows/management_point.rscrates/cmtraceopen-parser/src/sccm/server/windows/management_point_tests.rscrates/cmtraceopen-parser/src/sccm/server/windows/site_core.rscrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/absent-dp/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/backlog-blocked/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/content-version-mismatch/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/contradiction-recovery/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/distribution-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/healthy-package/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/incomplete/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/malformed-current/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/rotation-boundary/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/serve-observed/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/transfer-deferred/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/transfer-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/transfer-retry/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/validation-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/absent-remote-source/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/backlog-retry/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/generic-site-token/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/incomplete/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/sender-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/absent-dp/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/access-denied-mp/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/capped-sup/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/capped-sup/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/collision-same-basename-configured-roots/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/collision-same-basename-configured-roots/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/complete-multi-role/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/complete-multi-role/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/configured-nondefault-path/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/configured-nondefault-path/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/multiline/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/multiline/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/rotations/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/rotations/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/skipped-iis/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/supplemental-wsus-skipped/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/unsorted-manifest/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/unsorted-manifest/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/management-point/canonical-intake-policy-scope/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/component-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/contradictory/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/healthy/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/inbox-backlog/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/incomplete/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/malformed/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/recovery/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/rotation-boundary/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/status-processing-failure/expected.jsoncrates/cmtraceopen-parser/tests/sccm_hierarchy_reducer.rscrates/cmtraceopen-parser/tests/sccm_server_distribution_point.rscrates/cmtraceopen-parser/tests/sccm_server_hierarchy_and_replication_fixture_contract.rscrates/cmtraceopen-parser/tests/sccm_server_intake.rscrates/cmtraceopen-parser/tests/sccm_server_management_point.rscrates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service.rscrates/cmtraceopen-parser/tests/sccm_server_site_core.rscrates/cmtraceopen-parser/tests/sccm_server_software_update_point.rsdocs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.mdlibrary.md
| if !synthetic_site_code(&manifest.topology.site_code) | ||
| || !synthetic_capture_host( | ||
| &manifest.topology.capture_host, | ||
| &manifest.topology.site_code, | ||
| ) | ||
| { | ||
| return Err(SccmServerIntakeError::InvalidTopology); | ||
| } | ||
| "synthetic:site:lab".to_owned() | ||
| format!( | ||
| "synthetic:site:{}", | ||
| manifest.topology.site_code.to_ascii_lowercase() | ||
| ) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
Use one site representation for topology links and topology admission.
Lines 1042-1045 store site_handle as synthetic:site:lab. Lines 1114-1115 retain hierarchy-link endpoints as LAB. The later direction check compares these values directly, so every valid synthetic hierarchy link fails direction validation.
Normalize both values before comparison, or compare links with the raw synthetic site code. Otherwise hierarchy_admission.direction remains None, and the hierarchy reducer can panic when it requires a sealed artifact direction. Add a regression test with a synthetic hierarchy artifact and a matching origin or target link.
Also applies to: 1112-1117
🤖 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 `@crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs` around lines
1034 - 1045, Use the same site representation for the synthetic topology handle
and hierarchy-link endpoint comparisons in the intake flow around synthetic
topology admission and hierarchy direction validation. Normalize both values
consistently, or compare against the raw synthetic site code, so matching origin
or target links produce a populated hierarchy_admission.direction instead of
None. Add a regression test covering a synthetic hierarchy artifact with a
matching origin or target link.
…sue-409-intake-identity-grammar
|
Final independent integration verdict: ACCEPT at exact SHA |
Summary
Verification
cargo test -p cmtraceopen-parser --test sccm_server_intakeCARGO_INCREMENTAL=0 cargo test -p cmtraceopen-parserCARGO_INCREMENTAL=0 cargo clippy -p cmtraceopen-parser --all-targets -- -D warningsrustfmt --checkandgit diff --check origin/mainCloses #409
Summary by CodeRabbit
Bug Fixes
Documentation