UID2-6717: Add /ops/operator_key_check endpoint for pre-startup validation#383
Closed
UID2-6717: Add /ops/operator_key_check endpoint for pre-startup validation#383
Conversation
Add explicit gnutls upgrade in Dockerfile to address HIGH severity vulnerability CVE-2026-1584 in gnutls 3.8.11-r0 (fixed in 3.8.12-r0) in the alpine base image. The vulnerability allows Remote Denial of Service via crafted ClientHello with invalid PSK. Jira: UID2-6655 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…alidation Adds a lightweight GET /ops/operator_key_check endpoint to uid2-core that validates an operator's Bearer token (Role.OPERATOR) without requiring a full attestation payload. This supports the operator's pre-startup key validation check, enabling fast-fail with a clear error message when core_api_token is misconfigured rather than discovering the failure 12 hours into attestation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /ops/operator_key_checktouid2-core— a lightweight endpoint that authenticates the operator Bearer token (requiresRole.OPERATOR) without needing a full attestation payloadCoreVerticlealongside/ops/healthcheck, without the attestation middlewareuid2-operator(IABTechLab/uid2-operator) that calls this endpoint before starting the enclave, enabling fast-fail on misconfigured operator keysJira: UID2-6717
Why
Currently, an invalid
core_api_tokenis only discovered during the first attestation call — which happens asynchronously after the enclave has started. The operator then waits up to 12 hours before shutting down, with no actionable error message. This change provides a dedicated, low-cost endpoint that the operator can call synchronously at startup to validate its key before proceeding.Deployment note: Deploy
uid2-core(this PR) before the companionuid2-operatorPR. The operator handles a 404 from this endpoint gracefully (logs a warning, continues) for backward compatibility during rolling deploys.Test plan
CoreVerticleTest#operatorKeyCheckReturns200ForValidOperatorKey— valid OPERATOR key → 200CoreVerticleTest#operatorKeyCheckReturns401ForUnknownKey— unknown/missing key → 401CoreVerticleTestsuite passes (100 tests, 0 failures)🤖 Generated with Claude Code