Repository navigation
feat: Modify webhoook to support AuthBridge demo - #76
Conversation
Signed-off-by: Mariusz Sabath <[email protected]>
There was a problem hiding this comment.
Pull request overview
This pull request adds webhook-based sidecar injection support for the AuthBridge demo, enabling automatic injection of OAuth 2.0 token exchange components into Kubernetes workloads. The webhook watches for deployments with the kagenti.io/inject: enabled label and injects necessary sidecars (proxy-init, spiffe-helper, client-registration, and envoy-proxy) to enable transparent token exchange with Keycloak.
Changes:
- Extended the webhook mutator to support optional SPIRE-based identity with a new
kagenti.io/spirelabel - Added new sidecar containers (envoy-proxy for traffic interception and proxy-init for iptables setup)
- Created deployment scripts, Keycloak setup automation, Kubernetes manifests, and comprehensive documentation for the AuthBridge webhook demo
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| kagenti-webhook/scripts/full-deploy.sh | Added AuthBridge demo configuration and automated ConfigMap deployment |
| kagenti-webhook/internal/webhook/injector/volume_builder.go | Added BuildRequiredVolumesNoSpire function for non-SPIRE deployments and envoy-config volume |
| kagenti-webhook/internal/webhook/injector/pod_mutator.go | Added SPIRE enablement logic, init container injection, and conditional volume/sidecar injection |
| kagenti-webhook/internal/webhook/injector/container_builder.go | Added BuildEnvoyProxyContainer and BuildProxyInitContainer functions with SPIRE-optional support |
| AuthBridge/setup_keycloak-webhook.py | New Python script for automated Keycloak realm, client, and scope configuration |
| AuthBridge/k8s/configmaps-webhook.yaml | New ConfigMaps for environments, authbridge-config, spiffe-helper-config, and envoy-config |
| AuthBridge/k8s/auth-target-deployment-webhook.yaml | New deployment manifest for the auth-target service (token validator) |
| AuthBridge/k8s/agent-deployment-webhook.yaml | New deployment manifest for the agent workload with webhook injection labels |
| AuthBridge/demo-webhook.md | Comprehensive documentation including setup, deployment, testing, and troubleshooting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
|
overall looks good, do you want to address the comments from copilot review? |
Signed-off-by: Mariusz Sabath <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 12 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
|
@mrsabath, some issues found by Copilot still appear as not resolved ^^^. Not sure if your recent commits address them. |
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
… into webhook-demo
Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
… into webhook-demo
Description
Fixes # (issue)
Type of Change
How Has This Been Tested?
Test Configuration:
Checklist
Screenshots (if appropriate)
Additional Notes