Engineering guide · Security
CAPTCHA Challenge Providers
Atlas implements tenant-scoped hCaptcha, reCAPTCHA v2, and reCAPTCHA v3 verification for primary authentication and other explicitly enumerated authentication contexts. The provider API is compatible in purpose with Okta’s CAPTCHA API, while Atlas adds inactive-first lifecycle, independent activation, exact request binding, one-time use across replicas, and secret-reference-only custody.
CAPTCHA is an external challenge provider, not a bot classifier. It is configured and activated independently from Adaptive Bot Protection. A tenant may use either authority or both. Atlas never silently converts a bot likelihood into a CAPTCHA request and never treats a CAPTCHA provider score as the independent adaptive classifier.
When both controls are active, Atlas applies them in this order:
trusted peer resolution
-> Network Zone blocklist
-> threat-intelligence decision
-> bounded source and username rate limits
-> adaptive bot likelihood and Atlas remediation
-> exact CAPTCHA policy and provider-backed challenge
-> credential verification
-> session and continuous-risk policy
Provider API
| Operation | Purpose |
|---|---|
|
List providers or create an inactive provider. |
|
Read or replace an inactive provider. |
|
Check provider readiness and activate at fresh AAL3 through an actor other than the configurator. |
|
Deactivate with fresh AAL2. |
Provider types are hcaptcha, recaptcha_v2, and recaptcha_v3.
secretRef must be an approved vault://, kms://, pkcs11://, or
secret:// reference. Plaintext secret fields and URI query or fragment
components are rejected. The production Vault convention reads the value
field at the referenced path. The current gateway deployment adapter resolves
only vault://; another approved scheme remains inactive because readiness
fails until its deployment-specific resolver is installed.
The provider verifier uses fixed HTTPS endpoints, TLS verification, no redirects, no environment proxy, bounded timeouts and response bodies, strict content types, and configured hostname checks. reCAPTCHA v3 also requires the expected action and minimum score.
Policy API
| Operation | Purpose |
|---|---|
|
List policies or create an inactive policy. |
|
Read or replace an inactive policy. |
|
Activate at fresh AAL3 through an independent actor after its provider is active. |
|
Deactivate with fresh AAL2. |
|
Read append-only, hash-chained provider, policy, issue, claim, and result evidence. |
Policies enumerate exact contexts, audiences, and actions; wildcards are
unsupported. Contexts are primary_authentication, password_recovery,
account_unlock, registration, enrollment, and step_up. Challenge TTL is
30 to 300 seconds.
Every mutation requires an Idempotency-Key. Updating or transitioning an
existing resource also requires its current numeric If-Match version.
Provider and policy activation requires security.bot-defense.activate, fresh
AAL3, and separation of duties.
Authentication Contract
For a protected authentication request without proof, Atlas returns a
botDefenseChallenge plus requiresBotVerification: true. The challenge is
signed by an Ed25519 key held in Vault Transit in production. Its claims bind:
-
tenant, policy ID and version, and provider ID and version;
-
authentication context, HTTPS audience host, and HTTP action;
-
an opaque-device subject digest rather than the submitted username;
-
challenge ID, issue time, expiry, and issuance-evidence hash.
The client resubmits botDefenseChallenge and botDefenseResponse. Those
field names are retained for backward compatibility with the original Atlas
challenge contract; they refer only to external CAPTCHA verification. Atlas
verifies the signature and every binding, calls the configured provider, then
atomically claims the challenge in PostgreSQL. Reuse fails across processes and
after restart. Raw challenge tokens, provider responses, IP addresses, and
usernames are not persisted in bot-defense evidence.
Production startup fails if PostgreSQL or the Vault Transit challenge signer is unavailable. Development may use an in-memory store and ephemeral Ed25519 key; that path is deliberately rejected outside development.
Test And Docker Evidence
Atlas service covers exact policy evaluation, secret-reference validation, separation of duties, lifecycle, signed binding, expiry, cross-tenant isolation, replay, and evidence.
API gateway proves provider-response, hostname, action, score, and hardened HTTP behavior. API gateway proves authentication challenge, valid proof, replay denial, device binding, and tenant binding.
Atlas service proves provider and policy durability, signed challenge binding, atomic one-time consumption across service replicas, restart behavior, and evidence using PostgreSQL. API gateway uses the real Docker Vault Transit service to prove a challenge signed by one reconstructed gateway client verifies through another without exporting signing material and that tampering is rejected. The memory-aware Docker runner may defer execution when the validation host does not have its configured 3 GiB available.