一键导入
aigw-auth
Configure BackendSecurityPolicy for AI provider authentication — API key, AWS, Azure, GCP credentials
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure BackendSecurityPolicy for AI provider authentication — API key, AWS, Azure, GCP credentials
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Configure client-facing traffic policies -- timeouts, connection limits, TLS settings, HTTP behavior
Production-grade Envoy Gateway setup with comprehensive security, observability, high availability, and operational best practices
Integrate Envoy Gateway with Istio ambient mesh or Cilium for unified ingress and service mesh
Envoy Gateway version information, compatibility matrix, and upgrade readiness checks
Envoy AI Gateway contribution orchestrator — interviews you about your contribution and guides you through the correct workflow using contributor skills
Envoy Gateway contribution orchestrator — interviews you about your contribution and guides you through the correct workflow using contributor skills
| name | aigw-auth |
| description | Configure BackendSecurityPolicy for AI provider authentication — API key, AWS, Azure, GCP credentials |
| arguments | [{"name":"PolicyType","description":"Type: APIKey, AnthropicAPIKey, AzureAPIKey, AzureCredentials, AWSCredentials, GCPCredentials","required":true},{"name":"AIServiceBackendName","description":"Name of the AIServiceBackend to attach the policy to","required":true}] |
Configure authentication for AI backends using BackendSecurityPolicy. This policy attaches to AIServiceBackend or InferencePool and injects credentials when the gateway forwards requests to the provider. Only one BackendSecurityPolicy can target a given AIServiceBackend or InferencePool; multiple policies cause reconciliation failure.
BackendSecurityPolicy uses targetRefs to attach to AIServiceBackend:
apiVersion: aigateway.envoyproxy.io/v1alpha1
kind: BackendSecurityPolicy
metadata:
name: ${AIServiceBackendName}-apikey # TODO: Descriptive name
namespace: default # TODO: Match AIServiceBackend namespace
spec:
targetRefs:
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: ${AIServiceBackendName}
type: ${PolicyType} # TODO: APIKey, AnthropicAPIKey, AzureAPIKey, etc.
# ... provider-specific config below
For OpenAI and other providers that use Authorization: Bearer <key>:
spec:
targetRefs:
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: my-openai-backend
type: APIKey
apiKey:
secretRef:
name: openai-api-key-secret
namespace: default
Create the secret (key must be apiKey):
apiVersion: v1
kind: Secret
metadata:
name: openai-api-key-secret
namespace: default
type: Opaque
stringData:
apiKey: "sk-..." # TODO: Replace with your API key
Uses x-api-key header:
spec:
targetRefs:
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: my-anthropic-backend
type: AnthropicAPIKey
anthropicAPIKey:
secretRef:
name: anthropic-api-key-secret
namespace: default
Secret key: apiKey
Uses api-key header:
spec:
targetRefs:
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: my-azure-openai-backend
type: AzureAPIKey
azureAPIKey:
secretRef:
name: azure-openai-api-key-secret
namespace: default
Secret key: apiKey
For AWS Bedrock. Supports default credential chain (IRSA, Pod Identity, env vars), credentials file, or OIDC:
Default credential chain (recommended for EKS):
spec:
targetRefs:
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: my-bedrock-backend
type: AWSCredentials
awsCredentials:
region: us-east-1
Credentials file (secret key: credentials):
awsCredentials:
region: us-east-1
credentialsFile:
secretRef:
name: aws-credentials-secret
namespace: default
profile: default
OIDC (e.g., for non-EKS):
awsCredentials:
region: us-east-1
oidcExchangeToken:
oidc:
issuer: https://oidc.example.com
# ... OIDC config
awsRoleArn: arn:aws:iam::123456789012:role/MyBedrockRole
For Azure OpenAI with client secret or OIDC:
spec:
targetRefs:
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: my-azure-openai-backend
type: AzureCredentials
azureCredentials:
clientID: "your-client-id"
tenantID: "your-tenant-id"
clientSecretRef:
name: azure-client-secret
namespace: default
Secret key: client-secret
For GCP Vertex AI. Requires project name and region. Supports credentials file or workload identity federation:
Credentials file (secret key: service_account.json):
spec:
targetRefs:
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: my-vertex-backend
type: GCPCredentials
gcpCredentials:
projectName: my-gcp-project
region: us-central1
credentialsFile:
secretRef:
name: gcp-sa-secret
namespace: default
Workload Identity Federation (for OIDC-based auth):
gcpCredentials:
projectName: my-gcp-project
region: us-central1
workloadIdentityFederationConfig:
projectID: my-gcp-project
workloadIdentityPoolName: my-pool
workloadIdentityProviderName: my-provider
oidcExchangeToken:
oidc:
issuer: https://oidc.example.com
# ...
serviceAccountImpersonation:
serviceAccountName: my-sa@my-project.iam.gserviceaccount.com
One BackendSecurityPolicy can target multiple AIServiceBackends (or InferencePools). Each target can have at most one policy:
spec:
targetRefs:
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: openai-backend-1
- group: aigateway.envoyproxy.io
kind: AIServiceBackend
name: openai-backend-2
type: APIKey
apiKey:
secretRef:
name: shared-openai-key
namespace: default
For InferencePool backends (Gateway API Inference Extension):
spec:
targetRefs:
- group: inference.networking.k8s.io
kind: InferencePool
name: my-inference-pool
type: APIKey
apiKey:
secretRef:
name: inference-pool-secret
namespace: default