Skip to content

🌱 Add agent-oauth-secret job to enable client registration with helm chart - #396

Merged
mrsabath merged 48 commits into
rossoctl:mainfrom
pdettori:keycloak-setup
Nov 18, 2025
Merged

mrsabath merged 48 commits into
rossoctl:mainfrom
pdettori:keycloak-setup

Conversation

@pdettori

@pdettori pdettori commented Nov 14, 2025 •

Copy link
Copy Markdown
Member

Summary

This PR adds a new agent-oauth-secret job to enable automated client registration with Keycloak when deploying Kagenti via Helm charts. The implementation provides a Python-based tool that sets up Keycloak realms, users, and OAuth clients, then distributes the client secrets across multiple agent namespaces.

Key changes:

New Python tool (agent_oauth_secret.py) for automated Keycloak client registration with support for both environment variable and Kubernetes secret-based authentication
Helm chart template (agent-oauth-secret-job.yaml) with RBAC configuration for cross-namespace secret management
Updated Ansible installer tasks to clean up the new job resources before redeployment

Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[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

This PR adds a new agent-oauth-secret job to enable automated client registration with Keycloak when deploying Kagenti via Helm charts. The implementation provides a Python-based tool that sets up Keycloak realms, users, and OAuth clients, then distributes the client secrets across multiple agent namespaces.

Key changes:

  • New Python tool (agent_oauth_secret.py) for automated Keycloak client registration with support for both environment variable and Kubernetes secret-based authentication
  • Helm chart template (agent-oauth-secret-job.yaml) with RBAC configuration for cross-namespace secret management
  • Updated Ansible installer tasks to clean up the new job resources before redeployment

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
kagenti/auth/agent-oauth-secret/agent_oauth_secret.py New Python script implementing Keycloak setup with retry logic, credential management, and secret distribution across namespaces
kagenti/auth/agent-oauth-secret/requirements.txt Python dependencies for the agent OAuth secret tool
kagenti/auth/agent-oauth-secret/README.md Comprehensive documentation covering configuration options, usage examples, and troubleshooting
kagenti/auth/agent-oauth-secret/Dockerfile Container image definition for running the OAuth secret tool as a Kubernetes Job
charts/kagenti/templates/agent-oauth-secret-job.yaml Helm template for the Job including ServiceAccount, ClusterRole, and RoleBindings for cross-namespace access
charts/kagenti/templates/ui-oauth-secret-job.yaml Added TTL configuration for automatic job cleanup
charts/kagenti/values.yaml New configuration section for agent OAuth secret settings and Keycloak integration
deployments/ansible/roles/kagenti_installer/tasks/main.yml Added cleanup task for agent-oauth-secret-job before redeployment
charts/kagenti/Chart.yaml Updated platform operator chart dependency version
charts/kagenti/Chart.lock Updated lock file for new chart dependency version
Makefile New target for building and loading the agent-oauth-secret image into kind cluster
.github/workflows/build.yaml Added agent-oauth-secret to CI build workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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 11 out of 12 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 charts/kagenti/values.yaml Resolved
Comment thread Makefile Resolved

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 14 out of 16 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pdettori and others added 6 commits November 17, 2025 15:05

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 19 out of 21 changed files in this pull request and generated 17 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pdettori and others added 9 commits November 18, 2025 09:41
Signed-off-by: Paolo Dettori <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>

Co-authored-by: Copilot <[email protected]>

@mrsabath mrsabath 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.

Thank you @pdettori for this great security improvement
LGTM

@mrsabath
mrsabath merged commit 5426b34 into rossoctl:main Nov 18, 2025
@pdettori
pdettori deleted the keycloak-setup branch April 23, 2026 19:50
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.

3 participants