Skip to content

feat: Modify webhoook to support AuthBridge demo - #76

Merged
mrsabath merged 16 commits into
rossoctl:mainfrom
mrsabath:webhook-demo
Jan 26, 2026
Merged

mrsabath merged 16 commits into
rossoctl:mainfrom
mrsabath:webhook-demo

Conversation

@mrsabath

Copy link
Copy Markdown
Member

Description

Fixes # (issue)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test addition or update
  • CI/CD update

How Has This Been Tested?

  • Test A
  • Test B

Test Configuration:

  • Kubernetes version:
  • Toolhive webhook version:
  • OS:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if appropriate)

Additional Notes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/spire label
  • 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.

Comment thread AuthBridge/setup_keycloak-webhook.py Resolved
Comment thread AuthBridge/k8s/configmaps-webhook.yaml Resolved
Comment thread AuthBridge/k8s/configmaps-webhook.yaml Resolved
Comment thread AuthBridge/setup_keycloak-webhook.py Resolved
mrsabath and others added 5 commits January 24, 2026 14:27
@pdettori

Copy link
Copy Markdown
Member

overall looks good, do you want to address the comments from copilot review?

Signed-off-by: Mariusz Sabath <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread kagenti-webhook/scripts/full-deploy.sh Resolved
Comment thread AuthBridge/setup_keycloak-webhook.py Resolved
Comment thread AuthBridge/k8s/configmaps-webhook.yaml Resolved
Comment thread AuthBridge/k8s/configmaps-webhook.yaml Resolved
Comment thread AuthBridge/demo-webhook.md Resolved
Comment thread AuthBridge/demo-webhook.md Resolved
Comment thread kagenti-webhook/scripts/full-deploy.sh Resolved
mrsabath and others added 2 commits January 25, 2026 20:14
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]>
@cwiklik

cwiklik commented Jan 26, 2026

Copy link
Copy Markdown
Collaborator

@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]>
@mrsabath
mrsabath marked this pull request as ready for review January 26, 2026 21:36

@pdettori pdettori left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@mrsabath
mrsabath merged commit b6cd96e into rossoctl:main Jan 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants