Holden Jolley
Azure Solution Architect
All projectsResumeGitHubLinkedInContact
SECURITY · PRIVACY · AI

Privacy-Preserving AI Age Assurance

A production-oriented Azure landing zone for bring-your-own age-estimation models where the image is encrypted before upload, remains ciphertext through the public edge and gateway, is decrypted only inside isolated inference memory, and is never intentionally retained.

Foundation ARM What-If validatedWorkloads compile validated
Architecture at a glanceAzure preflight green
Browser
encrypts
→Private
inference
→Key Vault
+ attestation
Plaintext boundaryClient + inference memory
Replay defenseShort-lived shared state
RetentionNo verification image store
ProblemProduce an age-assurance decision while minimizing exposure and retention of the source image.
DecisionEncrypt on the client, keep edge/gateway ciphertext-only, and decrypt only inside private inference memory.
Key tradeoffTrusted key/session dependencies can reduce availability because the platform fails closed instead of weakening controls.
REQUIREMENTS & CONSTRAINTS

Verify an age signal without turning the image into a platform asset.

The architecture treats the image as highly sensitive transient input rather than application data. The reusable artifact is the secure Azure execution boundary, not a particular model: customers can supply an approved model container while the platform keeps the network, identity, key-management, privacy, and operational controls consistent.

The core constraints are strict: no public origin exposure, no photograph persistence, encryption beyond TLS, passwordless Azure service access, fail-closed security behavior, minimal external disclosure, and an explicit separation between platform controls and model governance.

Plaintext boundaryClient + inference memory only
External resultBinary approval / denial
Session stateShort-lived nonce records only
Model boundaryBring-your-own approved container
SECURITY PRINCIPLES

Reduce trust instead of extending it.

Payload encryption beyond TLSA fresh AES-256-GCM key encrypts each re-encoded image; that key is wrapped with the platform RSA public key using RSA-OAEP-256 so edge and gateway components do not need plaintext access.
Private execution boundaryFront Door reaches the gateway over Private Link, gateway-to-inference traffic remains private inside Container Apps, and data-plane dependencies use private connectivity where modeled.
Passwordless service accessManaged identity is the default Azure service authentication mechanism. Redis uses Entra authentication with access keys disabled in the production-oriented design.
Fail closedKey, session-state, model-health, and security failures deny or make verification unavailable rather than silently weakening the controls.
TRUST BOUNDARIES

Plaintext exists only where inference requires it.

Browser
encrypts image
→
Front Door
+ WAF
→
Private gateway
ciphertext only
→
Inference
decrypt + attest
Azure Front Door PremiumWAFAzure Container AppsPrivate LinkKey Vault PremiumHSM-backed RSA keysAzure Managed RedisAzure Container RegistryManaged IdentityPrivate DNSApplication InsightsLog Analytics
QUALITY ATTRIBUTES

The privacy invariant drives the rest of the design.

Privacy

No image store is provisioned. Plaintext is constrained to client memory before encryption and inference-process memory during the request lifetime.

Confidentiality

Application-layer envelope encryption keeps Front Door and the gateway outside the plaintext trust boundary, while Key Vault/HSM protects the long-lived RSA keys.

Replay resistance

Short-lived shared nonce/session records in Managed Redis provide atomic one-time semantics across horizontally scaled gateway replicas.

Availability

Replica failures can be absorbed inside Container Apps, but loss of Key Vault, trusted session state, or the regional stateful stamp deliberately reduces availability rather than weakening controls.

Operability

Application Insights and Log Analytics retain operational metadata such as model version, latency, and status while request bodies and image-derived artifacts are excluded from logging.

Governance boundary

The platform defines the secure execution contract but does not claim that a customer model is legally sufficient, unbiased, accurate at a statutory threshold, or appropriate for every jurisdiction.

DATA LIFECYCLE

Retention is minimized by architecture, not only by policy.

Plaintext image

Stored nowhere. It exists for the request lifetime only and is used for inference inside memory.

Ciphertext image

Transport-only and nonpersistent. The design does not provision a blob store, queue, or database for verification imagery.

AES session key

Fresh per request and nonpersistent. It exists only long enough to encrypt/decrypt the payload.

RSA private key

Lives in Key Vault / HSM across its managed key lifecycle and is used for unwrap/sign operations without being exported into application configuration.

Session / nonce hash

Stored in Managed Redis with a short TTL—approximately two minutes—to provide atomic one-time anti-replay semantics across horizontally scaled replicas.

Operational telemetry

Model version, latency, and status can be retained for operations; image bodies, embeddings, tensors, exact-age outputs, and session keys are intentionally excluded from application logging.

ANTI-REPLAY STATE

Ephemeral state solves one problem without creating a user database.

Horizontal gateway replicas need shared atomic state to ensure that one-time sessions and nonces cannot be replayed across instances. Azure Managed Redis is used with TLS, Private Link, Entra authentication, access keys disabled, and TTL-only session/nonce records.

The tradeoff is explicit: Redis availability becomes part of verification availability. The baseline fails closed if that shared anti-replay state cannot be trusted.

State contentsOpaque session / nonce only
RetentionShort TTL
AuthenticationEntra ID
Failure behaviorFail closed
FAILURE TOPOLOGY

Availability never outranks the security boundary.

Key Vault
unavailable
→
Cannot unwrap key
or sign result
→
Verification
fails closed
→
No weakened
fallback
Redis
unavailable
→
One-time session
cannot be trusted
→
New verification
fails closed
→
Stateless mode
not assumed
Regional stateful
stamp unavailable
→
Baseline service
unavailable
→
Second region needs
coordinated state
→
Keys + sessions +
models + trust
FAILURE BEHAVIOR

Security and availability failures have deliberate outcomes.

Gateway replica failure

Container Apps routes new requests to a healthy replica in the production parameter set.

Inference replica failure

Internal Container Apps routing allows a new request to reach a healthy inference replica; model readiness remains part of the decision path.

Key Vault unavailable

The service cannot unwrap the payload key or produce the required cryptographic result, so verification fails closed.

Redis unavailable

New one-time verification sessions fail closed unless an explicitly approved stateless mode is designed later.

Model unhealthy

The readiness probe fails and verification is denied or unavailable rather than routing blindly to an unhealthy model.

Regional outage

The current baseline is single-region for the stateful inference stamp. A second region requires a deliberate key, session-state, model-version, and attestation strategy rather than a copy/paste deployment.

MULTI-REGION EXTENSION

Why failover is more than another Container Apps environment.

01Cryptographic determinism

A second stamp needs an intentional regional Key Vault/public-key strategy so clients know which key version and trust path apply during failover.

02Session semantics

One-time anti-replay state must remain deterministic across regions. A geo strategy cannot allow the same challenge to become valid twice.

03Model + attestation trust

Both regions must use synchronized approved model versions and an explicit trust model for signed decisions before Front Door origin failover can be treated as complete.

KEY DECISIONS

The privacy posture comes from what the platform refuses to own.

Application-layer encryption beyond TLS

TLS protects transport links, but payload encryption keeps Front Door and the gateway outside the plaintext trust boundary. The consequence is that client code becomes part of the cryptographic protocol and needs interoperability/version testing.

No image storage service

The safest baseline retention policy is architectural omission: there is no image database, blob container, or queue intended to persist verification imagery.

Short-lived anti-replay state only

Managed Redis holds opaque session/nonce state with short TTLs rather than creating a durable identity or image database.

Bring-your-own model boundary

The platform defines the execution contract and isolation boundary without claiming that an arbitrary model is fair, legally compliant, non-exfiltrating, or suitable for a jurisdiction.

EVIDENCE LEVELS

Strong controls are documented separately from runtime proof.

Design evidence

Trust boundaries, crypto contracts, privacy rules, NFRs, ADRs, failure behavior, deployment design, and known limitations are source-controlled.

Compiler evidence

Foundation/workload Bicep and dev, test, and production parameter files compile cleanly.

Azure control-plane evidence

The dev foundation completes live ARM What-If through GitHub OIDC. Managed Redis remains modeled but is omitted from dev cloud preflight because live B0/B1 capacity was unavailable.

Runtime evidence

Not claimed yet. No production model, privacy runtime tests, failover exercises, or end-to-end deployment evidence exist until the workloads are actually deployed.

Cloud validated
The dev foundation passes live Azure control-plane preflight through secretless OIDC.

Foundation and workload Bicep lint/build cleanly and all dev, test, and production parameter files compile. The live dev foundation What-If resolves 24 planned resources; two managed-identity-dependent RBAC assignments remain intentionally unsupported by What-If until deployment-time principal IDs exist. The dev preflight omits Managed Redis because live B0/B1 capacity was unavailable for this subscription, while Redis remains part of the production architecture and compiler-validated profiles. No resources were deployed.

Current boundary: this is an architecture, contract, and Infrastructure-as-Code package. No production age-estimation model is bundled, the architecture performs age assurance rather than identity matching, and legal compliance, fairness, liveness strategy, and customer-model behavior require separate product/model governance. Runtime privacy, failover, and recovery claims still need deployed testing.