Add Keycloak OIDC client configuration automation with comprehensive documentation#1
Merged
sharpninja merged 5 commits intomainfrom Mar 30, 2026
Merged
Conversation
Co-Authored-By: Tonkotsu <tonkotsu-commits@tonkotsu.ai>
…e appsettings.Development.jsonCo-Authored-By: Tonkotsu <tonkotsu-commits@tonkotsu.ai>
…n with jq and Python fallbackCo-Authored-By: Tonkotsu <tonkotsu-commits@tonkotsu.ai>
…l three client configurationsCo-Authored-By: Tonkotsu <tonkotsu-commits@tonkotsu.ai>
…scripts for syncing client secrets Co-Authored-By: Tonkotsu <tonkotsu-commits@tonkotsu.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This pull request establishes complete automation for Keycloak OIDC client configuration in McpServer, including setup scripts for three distinct authentication clients, helper utilities for secret management, and comprehensive operational documentation.
🍜 Tonkotsu did 5 tasks for this pull request.
Changes Made
1. Keycloak Setup Scripts
Created automated setup scripts that configure the complete Keycloak realm and all three OIDC clients:
PowerShell Script (
scripts/Setup-McpKeycloak.ps1):mcpserverrealm with optimized token lifespansmcp-server-api,mcp-director, andmcp-webadmin,agent-manager,viewer)Bash Script (
scripts/setup-mcp-keycloak.sh):2. Client Secret Sync Helper Scripts
Created helper utilities to retrieve and update client secrets in application configuration:
PowerShell Script (
scripts/Update-McpWebClientSecret.ps1):mcp-webclient secret from Keycloak via REST APIappsettings.Development.jsonusing native JSON parsingConvertFrom-Json/ConvertTo-JsonBash Script (
scripts/update-mcp-web-client-secret.sh):jqfor JSON manipulation3. Three-Client OIDC Architecture
mcp-server-api (Confidential Client):
mcp-director (Public Client):
mcp-web (Confidential Client):
http://localhost:*,$McpServerUrl/*http://localhost:*,$McpServerUrlAll clients include protocol mappers for:
mcp-server-api4. Comprehensive Documentation
Created complete operational documentation in
docs/Operations/:ClientArchitecture.md:
SetupScripts.md:
HelperScripts.md:
README.md:
Technical Details
Script Features
JSON Manipulation
ConvertFrom-Json/ConvertTo-Jsonjqto Python 3's json moduleSecurity Considerations
Usage Examples
Setup Keycloak (PowerShell):
Setup Keycloak (Bash):
Update Client Secret (PowerShell):
.\scripts\Update-McpWebClientSecret.ps1Update Client Secret (Bash):
Benefits