docs: add apiProxy.auth OIDC configuration to spec and schema#2772
docs: add apiProxy.auth OIDC configuration to spec and schema#2772
Conversation
Add §9.5 OIDC Authentication to awf-config-spec.md documenting the apiProxy.auth configuration object and its mapping to AWF_AUTH_* environment variables for GitHub OIDC → Azure AD/Entra token exchange. Add apiProxy.auth object to both docs/awf-config.schema.json and src/awf-config-schema.json with properties: type (github-oidc), oidcAudience, azureTenantId, azureClientId, azureScope, azureCloud. Add CLI mapping entries for all apiProxy.auth.* paths (config-only). Add api-proxy-sidecar.md to informative references. Relates to github/gh-aw#31099. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Adds apiProxy.auth (GitHub OIDC → Azure AD/Entra exchange) to the AWF config specification and JSON schemas so OIDC auth can be represented as structured configuration alongside existing API proxy settings.
Changes:
- Extend both config schemas with
apiProxy.auth(type + Azure OIDC exchange parameters). - Add a new normative spec section for OIDC Authentication under API proxy semantics.
- Update the CLI mapping list to include
apiProxy.auth.*paths as config-only mappings toAWF_AUTH_*environment variables.
Show a summary per file
| File | Description |
|---|---|
src/awf-config-schema.json |
Adds apiProxy.auth schema definitions (type, audience, Azure fields) and updates env precedence wording. |
docs/awf-config.schema.json |
Mirrors the schema update for published/IDE validation. |
docs/awf-config-spec.md |
Adds normative §9.5 OIDC Authentication section and config-path → env-var mapping entries; renumbers DIFC section and updates references. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 5
| | `apiProxy.auth.oidcAudience` | `AWF_AUTH_OIDC_AUDIENCE` | No | `api://AzureADTokenExchange` | | ||
| | `apiProxy.auth.azureTenantId` | `AWF_AUTH_AZURE_TENANT_ID` | No | — | | ||
| | `apiProxy.auth.azureClientId` | `AWF_AUTH_AZURE_CLIENT_ID` | No | — | | ||
| | `apiProxy.auth.azureScope` | `AWF_AUTH_AZURE_SCOPE` | No | `https://cognitiveservices.azure.com/.default` | | ||
| | `apiProxy.auth.azureCloud` | `AWF_AUTH_AZURE_CLOUD` | No | `public` | |
| - `apiProxy.auth.type` → *(config-only; maps to `AWF_AUTH_TYPE`)* | ||
| - `apiProxy.auth.oidcAudience` → *(config-only; maps to `AWF_AUTH_OIDC_AUDIENCE`)* | ||
| - `apiProxy.auth.azureTenantId` → *(config-only; maps to `AWF_AUTH_AZURE_TENANT_ID`)* | ||
| - `apiProxy.auth.azureClientId` → *(config-only; maps to `AWF_AUTH_AZURE_CLIENT_ID`)* | ||
| - `apiProxy.auth.azureScope` → *(config-only; maps to `AWF_AUTH_AZURE_SCOPE`)* | ||
| - `apiProxy.auth.azureCloud` → *(config-only; maps to `AWF_AUTH_AZURE_CLOUD`)* |
| "default": "public" | ||
| } | ||
| }, | ||
| "required": ["type"] |
| "default": "public" | ||
| } | ||
| }, | ||
| "required": ["type"] |
| "auth": { | ||
| "type": "object", | ||
| "description": "Authentication configuration for the API proxy sidecar. Enables OIDC-based credential exchange (e.g., GitHub OIDC → Azure AD/Entra for Azure OpenAI). See docs/awf-config-spec.md §9.5.", | ||
| "additionalProperties": false, | ||
| "properties": { |
|
@copilot address the review feedback |
Done. Addressed all review feedback in commit
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Extend the OIDC authentication system to support three cloud providers (Azure, AWS, GCP) via a new apiProxy.auth.provider field. Schema & spec changes: - Add 'provider' enum field (azure|aws|gcp) with azure as default - Add AWS properties: awsRoleArn, awsRegion, awsRoleSessionName - Add GCP properties: gcpWorkloadIdentityProvider, gcpServiceAccount, gcpScope - Provider-specific OIDC audience defaults documented - Expand §9.5 with subsections for each provider (9.5.1-9.5.3) - Add CLI mapping entries for all new config paths - Both schemas kept in sync (src/ and docs/) Code changes: - Extract shared GitHub OIDC minting to github-oidc.js utility - Create aws-oidc-token-provider.js (STS AssumeRoleWithWebIdentity) - Create gcp-oidc-token-provider.js (STS + optional SA impersonation) - Update openai.js adapter to select provider via AWF_AUTH_PROVIDER - Update server.js to initialize/shutdown AWS OIDC providers - Forward new AWF_AUTH_* env vars in api-proxy-service.ts Note: AWS Bedrock uses SigV4 request signing (not Bearer tokens). The credential acquisition is complete; SigV4 request signing integration with server.js proxy pipeline is a follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@copilot merge main and fix this failing ci check https://github.com/github/gh-aw-firewall/actions/runs/25584201525/job/75109431547?pr=2772 |
Done. Main is merged and the failing CI check is addressed:
CodeQL now reports 0 alerts on the branch. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔬 Smoke Test Results
PR: docs: add apiProxy.auth OIDC configuration to spec and schema Overall: FAIL — pre-step template variables (
|
🔥 Smoke Test: Copilot BYOK — PASS
Running in BYOK offline mode ( Overall: PASS — @lpcox / reviewer
|
Codex SmokePRs: docs: document effective token budget enforcement behavior; fix: align ET budget error strings with gh-aw detection patterns Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test Results✅ GitHub MCP Testing: Last 2 merged PRs retrieved Status: PASS
|
Chroot Smoke Test Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results
Overall: FAIL —
|
Summary
Adds OIDC authentication configuration to the AWF config spec and JSON schemas, enabling structured configuration of GitHub OIDC token exchange for Azure AD/Entra, AWS STS, and GCP Workload Identity deployments.
Motivation
Users configuring Azure OpenAI (or AWS Bedrock / GCP) with OIDC auth currently must pass
AWF_AUTH_*environment variables manually. This PR adds a structuredapiProxy.authconfig object so gh-aw can generate these variables from workflow frontmatter (engine.auth). See github/gh-aw#31099.Changes
docs/awf-config-spec.md:apiProxy.auth.*paths (all config-only)docs/api-proxy-sidecar.mdto informative referencesdocs/awf-config.schema.jsonandsrc/awf-config-schema.json:apiProxy.authobject with properties:type(enum:github-oidc, required)provider(enum:azure,aws,gcp; default:azure)oidcAudience(provider-specific defaults)azureTenantId,azureClientId(required for azure),azureScope,azureCloudawsRoleArn,awsRegion(required for aws),awsRoleSessionNamegcpWorkloadIdentityProvider(required for gcp),gcpServiceAccount,gcpScopeif/then/elseconditionalssrc/schema.test.ts:type, unknownprovider, extra properties, and invalidazureCloudenum valuecontainers/api-proxy/aws-oidc-token-provider.test.jsandcontainers/api-proxy/gcp-oidc-token-provider.test.js:origAssumeandorigExchangeflagged by CodeQLExample config
{ "apiProxy": { "enabled": true, "auth": { "type": "github-oidc", "provider": "azure", "azureTenantId": "<tenant-id>", "azureClientId": "<client-id>" } } }{ "apiProxy": { "enabled": true, "auth": { "type": "github-oidc", "provider": "aws", "awsRoleArn": "arn:aws:iam::123456789012:role/my-role", "awsRegion": "us-east-1" } } }