Version: SG FLX
Configuration Tools
Search Guard provides multiple tools for managing configuration. Choose the tool that best fits your workflow and environment.
Available Tools
sgctl (Command-Line Interface)
The primary tool for managing Search Guard configuration from the command line. Perfect for automation, CI/CD pipelines, and server management.
- Basic Usage - Core sgctl commands and concepts
- Common Examples - Real-world configuration examples
- Making Changes - How to apply configuration changes
- System Administration - Advanced system operations
When to use sgctl:
- Automating configuration deployment
- Managing configuration in CI/CD pipelines
- Scripting configuration changes
- Working on servers without GUI access
Configuration GUI (Kibana)
A web-based interface for managing Search Guard configuration through Kibana. Ideal for interactive configuration and visual management.
- Configuration GUI - Web-based configuration management
When to use the GUI:
- Interactive configuration editing
- Visual role and permission management
- Quick configuration changes
- Teams preferring graphical interfaces
REST API
Programmatic access to Search Guard configuration for custom integrations and applications.
- Access Control - API authentication and permissions
- Usage and Return Values - General API usage patterns
- Internal Users API - Manage internal users
- Roles API - Manage roles and permissions
- Role Mappings API - Manage user-to-role mappings
- Action Groups API - Manage action groups
- Tenants API - Manage Multi-Tenancy
- Blocks API - Manage index blocks
- License API - Check and update licenses
- Cache API - Manage authentication/authorization cache
- Bulk Requests - Batch API operations
- Reserved and Hidden Resources - System resources
When to use the REST API:
- Custom application integrations
- External user management systems
- Automated provisioning systems
- Advanced scripting requirements
Choosing the Right Tool
| Requirement | sgctl | GUI | REST API |
|---|---|---|---|
| Command-line automation | ✅ | ❌ | ✅ |
| Visual interface | ❌ | ✅ | ❌ |
| CI/CD integration | ✅ | ❌ | ✅ |
| Custom applications | ❌ | ❌ | ✅ |
| Quick manual changes | ✅ | ✅ | ❌ |
| Bulk operations | ✅ | ⚠️ | ✅ |
| Fine-grained control | ✅ | ⚠️ | ✅ |
Common Workflows
Initial Setup (sgctl)
copy
# Download configuration
sgctl get-config -o my-config/
# Edit configuration files
# ... make changes ...
# Upload configuration
sgctl update-config my-config/
Quick Change (GUI)
- Navigate to Search Guard in Kibana
- Select the configuration type (Users, Roles, etc.)
- Make changes in the web interface
- Save changes (applied immediately)
Automated Provisioning (REST API)
copy
# Create user via API
curl -XPUT https://localhost:9200/_searchguard/api/internalusers/newuser \
-H 'Content-Type: application/json' \
-d '{"password":"password123"}'
Next Steps
- Start with sgctl Basic Usage to learn command-line configuration
- Or explore the Configuration GUI for web-based management
- For programmatic access, review the REST API documentation