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.com
Expected Behavior
gh-aw should:
- Accept
engine.auth in the workflow schema
- Map
engine.auth fields 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 sidecar
containers/api-proxy/providers/openai.js:39-59 — OIDC token provider initialization
containers/api-proxy/oidc-token-provider.js — Full OIDC ↔ Azure AD token exchange
Suggested Implementation
- Add
auth to the engine schema in pkg/parser/schemas/main_workflow_schema.json
- In the AWF config builder (
pkg/workflow/awf_config.go), map engine.auth fields to AWF_AUTH_* env vars in the generated config
- Ensure
permissions: id-token: write is validated when auth.type: github-oidc is used
Problem
Users configuring Azure OpenAI with GitHub OIDC authentication get a schema validation error at compile time:
The intended workflow frontmatter:
Expected Behavior
gh-aw should:
engine.authin the workflow schemaengine.authfields to AWF environment variables in the generated AWF configAWF 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:
engine.authAWF_AUTH_TYPEauth.type(e.g.github-oidc)AWF_AUTH_OIDC_AUDIENCEauth.audienceAWF_AUTH_AZURE_TENANT_IDauth.azure-tenant-id(optional)AWF_AUTH_AZURE_CLIENT_IDauth.azure-client-id(optional)AWF_AUTH_AZURE_SCOPEauth.azure-scope(optional, default:https://cognitiveservices.azure.com/.default)AWF_AUTH_AZURE_CLOUDauth.azure-cloud(optional)The sidecar's OpenAI provider (
containers/api-proxy/providers/openai.js) already handles the full OIDC flow:Authorization: Bearer <azure-token>on upstream requestsAWF 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 exchangeSuggested Implementation
authto the engine schema inpkg/parser/schemas/main_workflow_schema.jsonpkg/workflow/awf_config.go), mapengine.authfields toAWF_AUTH_*env vars in the generated configpermissions: id-token: writeis validated whenauth.type: github-oidcis used