Skip to main content

STRIDE Threat Model

PropertyValue
ControlsSID-OPS-08
ASVSV1.1 (Secure Software Development Lifecycle Requirements), V1.11 (Business Logic Architecture)
ISO 27001A.8.25 (Secure development lifecycle), A.8.27 (Secure system architecture and engineering principles)

Purpose

This document provides a formal STRIDE threat model for the SIROS ID platform, covering the components vc (credential issuer/verifier), go-trust (trust evaluation PDP), go-spocp (policy engine), wallet-common (shared library), wallet-frontend (browser wallet UI), and go-wallet-backend (wallet backend). It addresses the finding that security architecture documentation exists but no structured threat model using a recognised methodology (STRIDE, attack trees) was maintained.

This document should be reviewed and updated for every significant design change or sprint planning cycle per ASVS V1.1.6.


System Overview

The SIROS ID platform is a European Digital Identity Wallet (EUDIW) implementation. The following components interact to deliver credential issuance, verification, trust evaluation, and wallet management.

Trust Boundaries

BoundaryCrossingAuthentication
Internet → DMZBrowser / external wallet → reverse proxyTLS only
DMZ → ApplicationReverse proxy → wallet backend / vc platformTLS (operator-managed)
Application → DataWallet backend → MongoDB; vc → PostgreSQLOptional mTLS
Application → TrustWallet backend → go-trust (AuthZEN)None (network-level only)
Application → Externalgo-trust → TSL / DID / OIDFTLS 1.2+ + SSRF protection
Biometric → Upstreamfacetec-api → FaceTec ServermTLS
Inter-service gRPCvc componentsmTLS (cert fingerprint + DN)

STRIDE Analysis

The tables below enumerate threats per component and trust-boundary crossing. Each entry includes the STRIDE category, a threat description, current mitigations, residual risk, and recommended actions.

Legend

RatingMeaning
LowMitigated; residual risk acceptable
MediumPartially mitigated; additional controls recommended
HighNot adequately mitigated; remediation required

1. Wallet Frontend (wallet-frontend)

1.1 Authentication / Session

IDSTRIDEThreatMitigationsResidual RiskAction
WF-S-1SpoofingAttacker replays a stolen JWT to impersonate a userShort expiry (exp); JTI blacklist (in-memory); refresh token rotationLowEnsure JTI blacklist survives restart or use distributed blacklist
WF-S-2SpoofingPhishing page mimics wallet UI to capture WebAuthn challengeWebAuthn origin binding (RP ID = registered domain)LowEnforce strict RP ID; avoid wildcard subdomains
WF-I-1Info DisclosureSession token extracted from sessionStorage via XSSCSP (script-src 'self'); HttpOnly cookies not used (sessionStorage by design) — any XSS bypasses this boundaryMediumPriority: next sprint — harden CSP to eliminate inline script; migrate token to HttpOnly + SameSite=Strict cookie to remove JS-accessible session token
WF-I-2Info DisclosureCredential private keys exported from IndexedDB via XSSKeys stored JWE-encrypted; decryption requires PRF-backed main keyLowMaintain CSP hardening
WF-T-1TamperingAttacker modifies WalletStateContainer stored on the backendETag optimistic locking (412 on conflict); JWE-encrypted container; event-chain parentHash integrityLow
WF-R-1RepudiationUser denies signing a Verifiable PresentationVP-JWT carries user DID and key reference; the signed VP itself provides cryptographic non-repudiation at the relying partyLowServer-side logging of VP signing events is intentionally excluded — it would reveal which services the user presents credentials to, violating EUDI unlinkability and minimal disclosure principles; the signed VP-JWT is sufficient for non-repudiation
WF-D-1DoSFlood WebSocket engine to exhaust server connectionsSeparate port 8082; JWT required on first message; connection rate-limited by reverse proxyLowConfigure reverse proxy connection limits
WF-E-1ElevationAttacker uses another tenant's JWT to access user datatenant_id extracted from JWT claim (authoritative); disabled tenants rejected 403Low

1.2 Key Material

IDSTRIDEThreatMitigationsResidual RiskAction
WF-I-3Info DisclosureWebAuthn PRF output intercepted during unlockPRF output never transmitted; used in-memory for HKDF derivation onlyLow
WF-T-2TamperingAttacker injects a rogue ECDH public key to re-wrap the main keyMain key re-encryption uses ECDH ephemeral keypair generated in browser; server stores opaque blob onlyLow
WF-E-2ElevationAttacker forces schema downgrade (v2 → v1) to bypass ECDH wrappingFormat upgrade is client-driven; backend stores whatever the client submitsMediumValidate minimum container schema version server-side

2. Wallet Backend (go-wallet-backend)

2.1 User-Facing API (Port 8080)

IDSTRIDEThreatMitigationsResidual RiskAction
WB-S-1SpoofingAttacker forges JWT to gain API accessHMAC-SHA256 signature verified on every request; iss/aud validatedLowRotate JWT signing secret on schedule
WB-S-2SpoofingAttacker submits fabricated WebAuthn assertion for registration/loginChallenge validated single-use (5-min TTL); attestation verified; AAGUID blacklistLow
WB-T-1TamperingMITM modifies API request between reverse proxy and backendTLS configured (cert_file/key_file); reverse proxy enforces TLS to public clientsLowEnforce TLS on reverse-proxy → backend leg in production
WB-I-1Info DisclosureAdmin token logged at DEBUG level and shipped to log aggregatorAdmin token debug logging already suppressed (go-wallet-backend#89)LowVerify fix is deployed in all production builds
WB-I-2Info DisclosureMongoDB user records accessible without encryption at restMongoDB connection supports optional mTLS; at-rest encryption is operator responsibilityMediumDocument operator requirement to enable MongoDB encryption at rest
WB-R-1RepudiationOperator denies tenant CRUD actions performed via admin APIAdmin API on separate port with bearer token; no action-level audit logMediumEmit structured audit log for all admin API mutations
WB-D-1DoSBrute-force WebAuthn login to trigger lockout for legitimate usersSliding window rate limit: 10 attempts/60 s, 300 s lockout; failed attempts cost 2 tokensLow
WB-D-2DoSVCTM registry query flood (port 8097)Per-tenant rate limit + shared anonymous pool (configurable RPM)LowEnsure anonymous pool limit is set conservatively in production
WB-E-1ElevationCross-tenant data access by manipulating X-Tenant-ID headerJWT tenant_id is authoritative; header ignored when JWT presentLow

2.2 Admin API (Port 8081)

IDSTRIDEThreatMitigationsResidual RiskAction
WB-S-3SpoofingAttacker guesses or brute-forces admin bearer token256-bit random token; constant-time comparisonLowEnforce explicit token via env/file for production (do not use auto-generated)
WB-E-2ElevationNetwork-reachable admin port grants full tenant/user CRUDAdmin API token authentication + operator-enforced exposure controls (Service/Ingress scope + NetworkPolicy)MediumDocument and validate Kubernetes policy baseline for port 8081 as a deployment requirement
WB-D-3DoSAdmin API flooded to lock out legitimate administrationOperator network segmentation reduces exposure; no dedicated rate limit on admin portLowAdd deployment-level rate limiting/WAF policy for admin endpoint where exposed

2.3 AuthZEN Interface (go-trust)

IDSTRIDEThreatMitigationsResidual RiskAction
WB-S-4SpoofingAttacker runs a rogue AuthZEN endpoint and redirects wallet backendgo-trust URL is operator-configured; not user-controlledLowValidate go-trust URL in deployment checklist
WB-E-3ElevationAttacker calls go-trust /evaluation endpoint directly, bypassing SPOCP firewallSPOCP firewall is fail-closed in production (GIN_MODE=release); /evaluation only evaluates publicly available trust information (TSL membership, OIDF trust anchors) — no user-specific or privileged data is returnedLowNetwork-restrict go-trust to application zone as defence-in-depth; no application-layer authentication required given the public nature of the trust information

3. vc Platform (Credential Issuer / Verifier)

3.1 API Gateway and Issuance

IDSTRIDEThreatMitigationsResidual RiskAction
VC-S-1SpoofingExternal wallet presents forged OID4VCI authorization codeAuthorization code bound to PKCE challenge; single-use code validationLow
VC-S-2SpoofingAttacker spoofs facetec-api to inject biometric approvalfacetec-api → apigw uses mTLS + bearer token; both requiredLow
VC-T-1TamperingTamper with credential claims between issuer and registryInternal HTTP (issuer → registry) lacks TLS in some configs; gRPC mTLS availableMediumEnforce mTLS on issuer → registry HTTP paths; prefer gRPC mTLS only
VC-I-1Info DisclosurePID or biometric data exposed in vc issuer logsCredential claims passed in-process; log level controlsMediumAudit log output of issuer and registry for PII; enforce structured logging with field redaction
VC-R-1RepudiationHolder denies receiving a credentialIssuance recorded in registry with holder DID and timestampLow
VC-D-1DoSOID4VCI token endpoint floodedToken endpoint rate-limited (20/min per IP) in verifier; apigw limits not documentedMediumImplement per-IP rate limiting on all apigw public endpoints
VC-E-1ElevationSPOCP policy bypass on pid_auth credential typepid_auth requires presenting valid PID credential; SPOCP S-expression policy enforces paths/methodsLow

3.2 HSM / Key Management

IDSTRIDEThreatMitigationsResidual RiskAction
VC-I-2Info DisclosurePKCS#11 HSM PIN exposed in YAML configDocumented risk; operators advised to use secrets managerMediumProvide vault/env-var integration for HSM PIN per GEN-7.5-02
VC-I-3Info DisclosureSoftware fallback issuer key (PEM file) readablePlaintext at rest; documented riskHighProhibit software fallback keys in production; require HSM mode per GEN-7.5-02
VC-T-2TamperingAttacker replaces software PEM key fileFilesystem permissions onlyHighUse HSM mode; if software key required, use sealed-secret or vault-injected file

4. Trust Evaluation (go-trust)

IDSTRIDEThreatMitigationsResidual RiskAction
TR-S-1SpoofingDNS hijacking returns attacker-controlled trust list URLSafeHTTPClient DNS rebinding protection; HTTPS requiredLow
TR-S-2SpoofingBGP hijacking routes ETSI TSL traffic to attackerSafeHTTPClient enforces TLS 1.2+ with hardened cipher suites; X.509 chain validationLowConsider certificate pinning for known TSL endpoints
TR-T-1TamperingAttacker injects malicious entries into fetched trust listJWS signature verification on LoTE; X.509 chain validation on x5cLow
TR-I-1Info Disclosure/evaluation endpoint called externally to learn trust topologyThe endpoint evaluates only publicly available trust information (ETSI TSL membership, OpenID Federation trust anchors, DID documents); no user identity, subject data, or non-public policy is exposedLowNetwork-restrict to application zone as defence-in-depth; authentication is not required given the intentionally public nature of the data
TR-D-1DoSFlood /evaluation endpoint to deny trust decisionsPer-IP token bucket rate limiting (configurable RPS + burst)Low
TR-D-2DoSExternal trust service unavailable causes trust resolution failurego-trust caches resolved trust listsLowVerify cache TTL is appropriate for TSL refresh schedules
TR-E-1ElevationAttacker enumerates trust anchor membership via unauthenticated /evaluationTrust anchor membership is derived from public ETSI TSLs and OIDF federation metadata; enumeration reveals no non-public informationLowNetwork-restrict to application zone as defence-in-depth

5. Policy Engine (go-spocp)

IDSTRIDEThreatMitigationsResidual RiskAction
SP-T-1TamperingAttacker modifies startup-loaded configuration artifacts on diskConfiguration artifacts loaded at startup; file access controlled by OSMediumSign or checksum startup-loaded configuration files; detect changes at startup
SP-E-1ElevationMalformed S-expression input causes policy bypassSPOCP parser is fail-closed; invalid expressions deniedLowFuzz-test S-expression parser for parser differentials
SP-R-1RepudiationOperator denies configuration changesNo audit log for configuration file changesMediumLog configuration hash at startup; integrate configuration changes with SDLC change management

6. Biometric Identity Verification (facetec-api)

IDSTRIDEThreatMitigationsResidual RiskAction
FT-S-1SpoofingAttacker replays biometric session token to re-use completed liveness checkSession tokens are single-use; FaceTec server validatesLow
FT-I-1Info DisclosureBiometric image data (selfie) persisted beyond processingFaceTec SDK responsible for storage; facetec-api is stateless for image dataMediumConfirm FaceTec data retention policy; document data processing agreement
FT-I-2Info DisclosureBiometric data in PostgreSQL accessible without encryption at restAt-rest encryption is operator responsibilityMediumRequire PostgreSQL encryption at rest as deployment prerequisite
FT-D-1DoSBiometric endpoint flooded to exhaust FaceTec capacityPer-IP rate limit + concurrency semaphore (MaxConcurrentBiometric); 503 when full; 10 MB body capLow
FT-D-2DoS10 MB selfie upload consumes bandwidthHard 10 MB cap enforcedLow

Cross-Cutting Threats

IDSTRIDEThreatComponentsMitigationsResidual RiskAction
CC-I-1Info DisclosureHMAC JWT secrets exposed via misconfigured config/envwallet-backend, facetec-apiOperator responsibility; documented riskMediumProvide vault/secrets manager integration guidance
CC-R-1RepudiationNo platform-wide audit trail for security-relevant eventsAllComponent-level logs exist; no centralised SIEMMedium(centralised logging)
CC-D-1DoSKubernetes pod restarts clear in-memory JTI blacklistwallet-backendShort token expiry limits windowMediumUse Redis-backed or distributed JTI blacklist for production HA
CC-T-1TamperingSupply-chain attack via compromised dependencyAllDependabot, Grype, CodeQL, govulncheckLow
CC-S-1SpoofingAttacker impersonates internal service (no service mesh)AllmTLS where configured; network zone controlsMediumEvaluate service mesh (e.g. Istio) for mutual authentication of all inter-service calls

Threat Summary and Prioritisation

PriorityThreat IDsRationale
HighVC-I-3, VC-T-2Software PEM issuer keys are plaintext at rest; active remediation required
Medium — Remediate Next SprintWF-I-1Session token in sessionStorage accessible to XSS; harden CSP; evaluate HttpOnly + SameSite=Strict cookie migration
Medium — Remediate Next SprintWB-R-1, WB-E-2Missing admin API audit log; admin port network exposure
Medium — Remediate Next QuarterWF-E-2, VC-T-1, VC-D-1, VC-I-1, VC-I-2, SP-T-1, SP-R-1Schema version enforcement; issuer→registry TLS; API rate limiting; log PII; policy file integrity/audit
Medium — Operator GuidanceWB-I-2, FT-I-2, CC-I-1, CC-D-1MongoDB/PostgreSQL at-rest encryption; JWT secrets management; HA JTI blacklist
LowAll othersAdequately mitigated by existing controls

Assumptions and Scope Limitations

  1. Reverse proxy / ingress is operator-managed and assumed to enforce TLS termination. Threats at the ingress layer are out of scope.
  2. Database at-rest encryption is operator responsibility. The platform does not perform application-layer encryption of database fields (except the wallet privateData blob).
  3. Hardware Security Modules (HSM) are assumed in production for vc issuer keys per GEN-7.5-02. Software PEM fallback is documented as a high residual risk.
  4. go-spocp is embedded in go-wallet-backend; it does not expose a network interface and is not independently addressable.
  5. wallet-common is a shared library consumed by wallet-frontend and go-wallet-backend; threats are captured under those components.
  6. This model covers the current release of each component. Design changes must trigger a threat model review per ASVS V1.1.6.

Review Schedule

TriggerAction
Every sprint planningReview open threat items; add new threats for planned features
New component or integrationUpdate system diagram and STRIDE tables
Security incidentRoot-cause analysis mapped to STRIDE category; add or update threat entry
AnnualFull threat model refresh against ASVS V1.1 checklist