Skip to content

Implement Guardian identity + device trust foundations with fail-closed security fallbacks - #6

Closed
AcingTime420 with Copilot wants to merge 3 commits into
feature/genesis-irp-v1.3.1-import-cleanfrom
copilot/implement-identity-and-device-trust
Closed

Implement Guardian identity + device trust foundations with fail-closed security fallbacks#6
AcingTime420 with Copilot wants to merge 3 commits into
feature/genesis-irp-v1.3.1-import-cleanfrom
copilot/implement-identity-and-device-trust

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the P1 foundation gaps called out in the Genesis IRP review by adding concrete Identity and Device Trust service layers and wiring them into Guardian startup. Also adds P2 fail-closed behavior for auth/vault failure paths so security-critical failures degrade safely.

  • Identity Service (IdentityService.kt)

    • Adds core models: User, UserRole, Credential, AuthSession
    • Implements provisioning, credential create/rotate/revoke, and session validate/revoke
    • Uses PBKDF2-based credential hashing and vault-backed credential reference storage
    • Includes production hardening TODOs (MFA/biometric enrollment, immutable audit trails, hardware key wrapping)
  • Device Trust Engine (DeviceTrustEngine.kt)

    • Adds trust signal model (malwareRisk, anomalyScore, networkRisk, attestationPassed)
    • Implements weighted trust scoring and thresholded decisions
    • Introduces TrustDecision + enforcement actions (FULL_ACCESS, RESTRICTED_MODE, MINIMAL_IU, DENY_ACCESS)
    • Adds attestation integration stub with explicit TODOs for Play Integrity/SafetyNet + GDPR telemetry boundaries
  • Guardian fail-closed integration (GuardianService.kt)

    • Boots and wires Identity + Device Trust services into Guardian lifecycle
    • Publishes security events on critical failures via SecurityRepository.publishEvent(...)
    • Enforces fail-closed admin behavior when auth is unavailable or vault state is unsafe
    • Blocks protected flows when trust policy denies access
  • Policy + build wiring

    • Extends system/security/guardian/policy/policies.json with trust thresholds and minimal-IU enforcement policy
    • Updates Guardian Make build inputs to compile new identity/ and trust/ Kotlin sources
val trustDecision = deviceTrustEngine.evaluateTrust(
    deviceId = DEFAULT_DEVICE_ID,
    signal = TrustSignal(
        malwareRisk = if (malwareDetected) 90 else 10,
        anomalyScore = if (anomalyDetected) 80 else 15,
        networkRisk = if (networkThreatDetected) 75 else 10,
        attestationPassed = attestationPassed
    )
)

Type

  • feat
  • fix
  • docs
  • ci
  • security
  • chore

Validation

  • dotnet build / dotnet test locally or CI green
  • OpenAPI updated if HTTP surface changed
  • No secrets in diff
  • Migrations synced across irp / infrastructure / installer init (if SQL changed)

Risk

  • Low
  • Medium
  • High — describe rollback

Checklist

  • Linked issue (if any)
  • Docs updated

Copilot AI and others added 2 commits August 7, 2026 23:54
Co-authored-by: AcingTime420 <271400013+AcingTime420@users.noreply.github.com>
Co-authored-by: AcingTime420 <271400013+AcingTime420@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement P1 architectural recommendations for Identity and Device Trust Implement Guardian identity + device trust foundations with fail-closed security fallbacks Aug 8, 2026
Copilot AI requested a review from AcingTime420 August 8, 2026 00:01

Copy link
Copy Markdown
Owner

Superseded by #40, which reconstructs the unique identity/device-trust changes on the current validated master branch, resolves the obsolete-branch conflicts, and runs the full modern CI/security/SBOM gate set.

AcingTime420 added a commit that referenced this pull request Aug 11, 2026
Reconstructs the unique PR #6 Guardian identity/trust work on current master with resolved integration conflicts. Repository integrity, security audits, SBOM generation, Kotlin build, backend/frontend validation, and Docker checks passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants