Implements RBAC-based write gating for Intune restore flows, UI affordances, and audit logging; adds tests and specs.
2.8 KiB
2.8 KiB
Specification Quality Checklist: Provider Access Hardening v1
Purpose: Validate specification completeness and quality before proceeding to planning
Created: 2026-02-22
Feature: spec.md
Content Quality
- No implementation details (languages, frameworks, APIs)
- Focused on user value and business needs
- Written for non-technical stakeholders
- All mandatory sections completed
Requirement Completeness
- No [NEEDS CLARIFICATION] markers remain
- Requirements are testable and unambiguous
- Success criteria are measurable
- Success criteria are technology-agnostic (no implementation details)
- All acceptance scenarios are defined
- Edge cases are identified
- Scope is clearly bounded
- Dependencies and assumptions identified
Feature Readiness
- All functional requirements have clear acceptance criteria
- User scenarios cover primary flows
- Feature meets measurable outcomes defined in Success Criteria
- No implementation details leak into specification
Notes
- Spec is ready for
/speckit.clarifyor/speckit.plan. - No [NEEDS CLARIFICATION] markers — all decisions were informed by the detailed user input and existing codebase context.
- The spec references existing codebase concepts (OperationRun, ProviderOperationStartGate, rbac_status fields) as domain terms, not implementation details.
Implementation Validation (2025-07-16)
Runtime Behavior
- Config toggle (
hardening.intune_write_gate.enabled) allows disabling the gate - Gate bypass logs a warning for operational visibility
- Gate evaluates RBAC status before any write operation
- Stale health check threshold is configurable (
freshness_threshold_hours) - Blocked operations produce audit log entries with sanitized metadata
- UI disables write actions when gate would block
- Badge component renders all RBAC status values (ok, degraded, stale, failed, error, not_configured)
Security & Audit
- No secrets/tokens stored in audit log metadata
- AuditContextSanitizer applied to all logged metadata
- Operation type and reason code recorded for blocked writes
- Tenant-scoped audit entries with actor identification
Testing Coverage
- Gate blocks for not_configured status (T006)
- Gate blocks for unhealthy statuses (T007)
- Gate blocks for stale health check (T008)
- Gate passes for ok + fresh (T009)
- Gate bypass when disabled (T010)
- Job-level enforcement — ExecuteRestoreRunJob (T013)
- Job-level enforcement — RestoreAssignmentsJob (T014)
- Zero HTTP leakage when gate blocks (T015b)
- UI disabled state for blocked actions (T019)
- RBAC card rendering in TenantResource (T020)
- Audit log creation on blocked writes (T022)
- Badge mapping for all status values (T024)