Configuration Overview
KoreShield uses a YAML-based configuration file (config.yaml) to control security policies, provider settings, logging, and integrations. This guide provides an overview of the main configuration areas.
Configuration File Location
By default, KoreShield looks forconfig.yaml in the current working directory. You can specify a custom location using the --config flag:
Main Configuration Areas
Settings
Server, logging, monitoring, and provider configuration
Policies
Security policies, sensitivity levels, and threat actions
Rate Limiting
Distributed rate limiting with Redis integration
Production Checklist
Essential steps before deploying to production
Quick Start Configuration
Here’s a minimal production-ready configuration:Environment Variables
Sensitive credentials should be stored as environment variables, not in the configuration file:API key for authenticating requests to KoreShield
OpenAI API key for provider authentication
Anthropic API key for Claude models
DeepSeek API key for DeepSeek models
Google API key for Gemini models
Azure OpenAI API key for Azure-hosted models
Configuration Best Practices
How should I manage configuration across environments?
How should I manage configuration across environments?
Use separate
config.yaml files for each environment (development, staging, production). Store them in a secure location and use environment-specific deployment scripts to apply the correct configuration.What should I configure differently for production?
What should I configure differently for production?
Key production changes:
- Enable
json_logs: truefor structured logging - Set
container_mode: trueif running in containers - Use
sensitivity: mediumorhigh - Set
default_action: blockfor strict security - Enable Redis for distributed rate limiting
- Configure monitoring and alerting
How do I validate my configuration?
How do I validate my configuration?
KoreShield validates configuration on startup and will report errors if:
- Required fields are missing
- Invalid values are provided
- Provider URLs are malformed
Can I reload configuration without restarting?
Can I reload configuration without restarting?
Currently, KoreShield requires a restart to apply configuration changes. Plan maintenance windows for configuration updates in production environments.
See the Production Checklist for a complete guide to production deployment.
Next Steps
Configure Settings
Review Settings to configure server, logging, and providers
Set Up Policies
Define security policies in Policies
Enable Rate Limiting
Configure Redis-based rate limiting in Rate Limiting
Production Deployment
Follow the Production Checklist before going live