api: add GCP OIDC auth support in BackendSecurityPolicies#635
api: add GCP OIDC auth support in BackendSecurityPolicies#635mathetake merged 26 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
# Conflicts: # go.mod
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net> # Conflicts: # go.mod # manifests/charts/ai-gateway-crds-helm/templates/aigateway.envoyproxy.io_backendsecuritypolicies.yaml # site/docs/api/api.mdx
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
aabchoo
left a comment
There was a problem hiding this comment.
nit: please add cel validation
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
aabchoo
left a comment
There was a problem hiding this comment.
Overall looks good to me -- made a few comments
| // | ||
| // +kubebuilder:validation:Required | ||
| // +kubebuilder:validation:MinLength=1 | ||
| ProjectID string `json:"projectID"` |
There was a problem hiding this comment.
Is ProjectID specific to Federation Config? Would it make sense to bubble this field up if it's needed for all GCP auth
There was a problem hiding this comment.
not sure if other authentication methods would need project-id, so keeping it within federation config for now
| // Region is the GCP region to use for the request. | ||
| Region string `json:"region"` | ||
| // ProjectName is the GCP project name to use for the request. | ||
| ProjectName string `json:"projectName"` |
There was a problem hiding this comment.
How will region and project be used in the extproc?
There was a problem hiding this comment.
The region and project-id are required while transforming request path
https://<region>-aiplatform.googleapis.com/v1/projects/<project-id>/locations/<region>/publishers/google/models/<model-name>:generateContent
There was a problem hiding this comment.
then maybe ProjectID instead of ProjectName
There was a problem hiding this comment.
Tried using project ID in the request url, but kept getting IAM_PERMISSION_DENIED error
not sure if that is an account specific configuration issue or GCP just doesn't like project ID instead of project-name
if future project name is found to be acceptable, we can add that as another field and accept either of them as valid config
There was a problem hiding this comment.
looks like it is using the name from the examples
There was a problem hiding this comment.
if project name is currently required on the url path, then it needs to be added to the BackendSecurityPolicy as well?
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
manifests/charts/ai-gateway-crds-helm/templates/aigateway.envoyproxy.io_aigatewayroutes.yaml
Outdated
Show resolved
Hide resolved
manifests/charts/ai-gateway-crds-helm/templates/aigateway.envoyproxy.io_aiservicebackends.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
**Description** - Implement GCP integration via OIDC token rotator. This PR add support for authenticating against GCP via external OIDC tokens. It uses google's Workload Identity Federation [1] to exchange an OIDC token for GCP's access token. It also support optional service account impersonation. - Add `ProjectName` and `Region` field in BackendSecurityPolicyGCPCredentials 1: https://cloud.google.com/iam/docs/workload-identity-federation **Related Issues/PRs (if applicable)** Previous PR: #635 Related Issue: #609 --------- Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net>
Commit Message
This Commit adds required fields on BackendSecurityPolicy for GCP authentication
Related Issues/PRs (if applicable)
Related Issue: #609
Special notes for reviewers (if applicable)
This PR only make API changes. Implementation for token rotator and backendauth will follow in future PRs