How It Works
Every auth method follows the same three-step pattern:AWS — Instance Identity Document
The Instance Identity Document (IID) is a JSON document that AWS generates for every EC2 instance. It is signed by AWS using a region-specific RSA-2048 key and available from the instance metadata service (IMDSv2) without any credentials. Document:Flow
What the runner sends
- The raw IID JSON document from IMDSv2
- The PKCS7 signature from IMDSv2
- The runner ID
What Nuon verifies
- Parses the IID and validates required fields (region, accountId)
- Verifies the PKCS7 signature using the embedded AWS regional certificate for the region in the document
- Looks up the runner by the provided runner ID
- Validates that the account ID in the document matches the AWS account ID recorded in the install’s stack outputs
GCP — Identity Token
GCP instances can fetch a signed identity JWT from the Compute Engine metadata service. The token is audience-scoped and signed by Google’s JWKS. The runner also fetches an OAuth2 access token and constructs a presigned Compute API request so Nuon can independently read instance metadata.Flow
What the runner sends
- The identity JWT from the metadata service
- A presigned Compute API request (method, URL, Bearer token). The runner builds the request but does not execute it.
What Nuon verifies
- Validates the JWT signature using Google’s JWKS
- Extracts claims: project ID, instance ID, zone, service account
- Independently executes the Compute API request to read instance metadata
- Cross-validates the instance ID from the JWT against the Compute API response
- Reads the runner ID from the instance’s custom metadata key
- Validates the project ID and service account email against the install’s stack outputs
Azure — Managed Identity
Azure VMs with a user-assigned managed identity can fetch a JWT from the Azure Instance Metadata Service. The token contains the identity’s tenant, subscription, and resource information and is signed by Microsoft’s JWKS endpoint for the tenant.Flow
What the runner sends
- The managed identity JWT from the Azure IMDS
What Nuon verifies
- Reads the tenant ID from the JWT without verifying it (needed to find the right JWKS endpoint)
- Fetches the JWKS for that tenant
- Validates the JWT signature and claims
- Extracts the runner ID from the managed identity resource ID in the token
- Validates the tenant ID and subscription ID against the install’s stack outputs
Token Issuance
All three methods produce the same result: a token scoped to the runner, used for all subsequent API calls. Tokens are not stored by the runner between restarts. The runner re-authenticates on every startup.Security Properties
- No stored credentials. Identity is derived from the runtime environment at startup.
- Server-side verification. Nuon independently calls the cloud provider (Google JWKS, Azure JWKS) or verifies the credential locally (AWS PKCS7 signature with embedded regional cert). It does not trust the runner’s self-reported identity.
- Install-scoped validation. Every method validates the credential’s cloud identity against the specific install’s stack outputs. A runner in the wrong account, project, or tenant cannot authenticate, even with a valid credential.