Repository navigation
Closed
Description
Problem
Users configuring Azure OpenAI with GitHub OIDC authentication get a schema validation error at compile time:
error: Unknown property: auth. Did you mean 'path'? It belongs under 'cache' or 'imports'
The intended workflow frontmatter:
permissions:
id-token: write
engine:
env:
COPILOT_PROVIDER_BASE_URL: https://my-resource.openai.azure.com
COPILOT_PROVIDER_TYPE: azure
COPILOT_MODEL: gpt-4.1
auth:
type: github-oidc
audience: https://cognitiveservices.azure.comExpected Behavior
gh-aw should:
- Accept
engine.authin the workflow schema - Map
engine.authfields to AWF environment variables in the generated AWF config - Pass the auth configuration through to the API proxy sidecar
AWF Already Supports This
The AWF firewall (github/gh-aw-firewall) has full OIDC support. The API proxy sidecar reads the following environment variables and uses them to exchange GitHub OIDC tokens for Azure AD/Entra tokens:
| AWF env var | Maps from engine.auth |
|---|---|
AWF_AUTH_TYPE |
auth.type (e.g. github-oidc) |
AWF_AUTH_OIDC_AUDIENCE |
auth.audience |
AWF_AUTH_AZURE_TENANT_ID |
auth.azure-tenant-id (optional) |
AWF_AUTH_AZURE_CLIENT_ID |
auth.azure-client-id (optional) |
AWF_AUTH_AZURE_SCOPE |
auth.azure-scope (optional, default: https://cognitiveservices.azure.com/.default) |
AWF_AUTH_AZURE_CLOUD |
auth.azure-cloud (optional) |
The sidecar's OpenAI provider (containers/api-proxy/providers/openai.js) already handles the full OIDC flow:
- Exchanges GitHub OIDC token for Azure AD token via federated credential
- Injects
Authorization: Bearer <azure-token>on upstream requests - Handles token refresh automatically
AWF source references
src/services/api-proxy-service.ts:115-126— OIDC env vars forwarded to sidecarcontainers/api-proxy/providers/openai.js:39-59— OIDC token provider initializationcontainers/api-proxy/oidc-token-provider.js— Full OIDC ↔ Azure AD token exchange
Suggested Implementation
- Add
authto the engine schema inpkg/parser/schemas/main_workflow_schema.json - In the AWF config builder (
pkg/workflow/awf_config.go), mapengine.authfields toAWF_AUTH_*env vars in the generated config - Ensure
permissions: id-token: writeis validated whenauth.type: github-oidcis used
Reacted by Copilot
Activity
lpcox commentedon May 8, 2026
Workaround: Use
engine.envto pass OIDC auth configUntil
engine.authis supported in the schema, you can pass the AWF auth environment variables directly viaengine.env:Full mapping from proposed
engine.auth→AWF_AUTH_*env varsengine.authfieldtype: github-oidcAWF_AUTH_TYPE=github-oidcaudienceAWF_AUTH_OIDC_AUDIENCEapi://AzureADTokenExchangeazure-tenant-idAWF_AUTH_AZURE_TENANT_IDazure-client-idAWF_AUTH_AZURE_CLIENT_IDazure-scopeAWF_AUTH_AZURE_SCOPEhttps://cognitiveservices.azure.com/.defaultazure-cloudAWF_AUTH_AZURE_CLOUDpublic*
azure-tenant-idandazure-client-idare required for Azure AD federated credential exchange but optional if using managed identity.How it works
Authorization: Bearer <token>on upstream requests to your Azure OpenAI endpointImportant
permissions: id-token: writeis required — the Actions runner needs this to mint OIDC tokensACTIONS_ID_TOKEN_REQUEST_URLandACTIONS_ID_TOKEN_REQUEST_TOKEN(auto-injected by the runner whenid-token: writeis granted; AWF forwards them whenAWF_AUTH_TYPE=github-oidc)See AWF API proxy sidecar OIDC docs for full details.
docs: add apiProxy.auth OIDC configuration to spec and schema (#2772)