Overview
The MCP Server with LangGraph uses YAML configuration files and environment variables for flexible, declarative configuration. This reference documents all configuration files and their options..env.example
ldap_mappers.yaml
oidc_providers.yaml
role_mappings.yaml
.env.example
Complete environment variable template for configuring the MCP Server with LangGraph.Location
Usage
Configuration Sections
Service Configuration
Service Configuration
LLM Provider Configuration
LLM Provider Configuration
- google: Gemini (AI Studio or Vertex AI)
- anthropic: Claude models
- openai: GPT-4, GPT-3.5
- azure: Azure OpenAI
- bedrock: AWS Bedrock
- ollama: Local models
API Keys (Provider-Specific)
API Keys (Provider-Specific)
- Google Gemini
- Anthropic
- OpenAI
- Azure OpenAI
- AWS Bedrock
- Ollama
Keycloak Configuration
Keycloak Configuration
Session Management
Session Management
Secrets Management (Infisical)
Secrets Management (Infisical)
Observability
Observability
LangGraph Configuration
LangGraph Configuration
Security Best Practices
Generate Strong Secrets
Use Secrets Management
- Kubernetes Secrets
- External Secrets Operator
- Infisical (integrated)
- HashiCorp Vault
- AWS Secrets Manager
Environment-Specific Files
config/ldap_mappers.yaml
Defines how LDAP/Active Directory attributes map to Keycloak user attributes.Location
Used By
Structure
Attribute Mappers
Attribute Mappers
mail→emailgivenName→firstNamesn→lastNamedisplayName→displayNamedepartment→departmenttitle→titletelephoneNumber→phoneNumbermobile→mobilePhoneemployeeNumber→employeeNumbermanager→manager
Group Mapper
Group Mapper
groups_dn: Base DN for group searchgroup_name_attribute: Attribute containing group name (usuallycn)membership_attribute: Attribute listing group members (AD:member)preserve_inheritance: Maintain group hierarchymode:READ_ONLY(groups managed in LDAP only)
Sync Settings
Sync Settings
- Full sync: Complete LDAP directory scan
- Changed sync: Only changed users (requires USN changed attribute)
Role Mappings
Role Mappings
Customization
- Active Directory
- Generic LDAP
- Custom Attributes
sAMAccountName: UsernameuserPrincipalName: UPN (email-like)distinguishedName: DNmemberOf: Group memberships
Related ADRs
config/oidc_providers.yaml
Defines OpenID Connect identity provider configurations for federation.Location
Used By
Structure
Provider Configuration
Provider Configuration
- Basic settings (alias, display name, enabled)
- OIDC endpoints and credentials
- Attribute mappers (claims → user attributes)
Built-in Providers
Built-in Providers
- Google
- Microsoft
- GitHub
Custom OIDC Providers
Custom OIDC Providers
- Okta
- Auth0
- Generic Template
Attribute Mappers
Attribute Mappers
sub: Subject (unique ID)email: Email addressgiven_name: First namefamily_name: Last namepreferred_username: Usernamepicture: Profile picture URL
Global Settings
Global Settings
AUTO: Automatically link to existing Keycloak account with same emailPROMPT: Ask user to confirm account linkingDISABLED: Always create new account
IMPORT: Import on first loginFORCE: Always update from IdPLEGACY: Legacy behavior
Related ADRs
config/role_mappings.yaml
Defines how Keycloak roles, groups, and attributes map to OpenFGA tuples.Location
Purpose
Enables flexible, declarative authorization without code changes. Automatically creates OpenFGA tuples based on Keycloak user data.Structure
Simple Role Mappings
Simple Role Mappings
Group-Based Mappings
Group-Based Mappings
- User in
/acme/engineeringcreates:user:{id}, member, organization:acmeuser:{id}, member, team:engineering
Conditional Mappings
Conditional Mappings
==: Equals!=: Not equalsin: Value in list>=: Greater than or equal<=: Less than or equal
Role Hierarchies
Role Hierarchies
Application Order
Rules are applied in this order:Simple Mappings
Group Mappings
Conditional Mappings
Hierarchies
Deduplication
Examples
- User with Admin Role
- User in Engineering Group
- Finance Manager
- Role:
admin(realm role)
Related ADRs
Best Practices
Version Control
- Commit
.yamlconfig files to git - NEVER commit
.envfiles - Use
.env.exampleas template - Document custom configurations
Secrets Management
- Use Infisical or Vault for production
- Rotate secrets regularly
- Use Kubernetes Secrets for deployment
- Audit secret access
Environment Separation
- Separate configs per environment
- Different secrets per environment
- Test config changes in staging
- Use CI/CD for config deployment
Validation
- Validate YAML syntax
- Test regex patterns
- Verify OIDC endpoints
- Check LDAP connectivity