π Garnet Token
Jibril requires a Garnet API token to operate. This guide shows you how to obtain and configure your token.
π Getting Your Tokenβ
Step 1: Access Garnet Dashboardβ
Visit: https://dashboard.garnet.ai
Create an account if you don't have one.
Step 2: Create Project Tokenβ
- Navigate to Settings β API Tokens
- Click Create Token
- Select Permissions for the token
- Give it a descriptive name (e.g., "jibril-poc")
- Click Create
- Copy the token and keep it safe
β οΈ Security Warning
- Store your token securely (password manager, secrets vault)
- Never commit tokens to version control
- Create separate tokens per environment (dev/staging/prod)
- Rotate tokens periodically
βοΈ Configuring the Tokenβ
Choose one of three methods:
Method 1: Environment Variable (Recommended)β
Best for: Cloud deployments, CI/CD, containerized environments
export GARNET_API_TOKEN=your-token-here
Then run Jibril:
sudo -E jibril --config /etc/jibril/config.yaml
Advantages:
- Easy to rotate without modifying configuration files
- Environment-specific (different tokens for dev/staging/prod)
- Works well with secret management systems
- No risk of committing to version control
Method 2: Configuration Fileβ
Best for: Traditional server deployments, persistent configuration
# /etc/jibril/config.yaml
run-time:
api:
token: your-token-here
Advantages:
- Persistent across reboots
- Clear, documented configuration
Important: Secure the configuration file:
sudo chmod 600 /etc/jibril/config.yaml
sudo chown root:root /etc/jibril/config.yaml
Method 3: Systemd Environment Fileβ
Best for: Systemd service deployments
# Create secure environment file
sudo mkdir -p /etc/default
sudo tee /etc/default/jibril << EOF
GARNET_API_TOKEN=your-token-here
EOF
# Secure the file
sudo chmod 600 /etc/default/jibril
sudo chown root:root /etc/default/jibril
The systemd service will automatically load this file on start.
Advantages:
- Systemd-native approach
- Separated from main configuration
- Automatically loaded on service start
π First Startβ
When you start Jibril with a valid token for the first time:
- Jibril registers with Garnet API
- An agent-specific token is generated and stored in
/var/lib/jibril/agent.token - Jibril starts normally
sudo jibril --config /etc/jibril/config.yaml
Expected log output:
INFO: detected runtime environment: vanilla
INFO: agent registration complete
INFO: agent kind: vanilla
INFO: token stored at: /var/lib/jibril/agent.token
βΉοΈ Project Token vs Agent Token
- Project Token (you configure) - Used during initial registration
- Agent Token (auto-generated) - Stored in
/var/lib/jibril/agent.token, used for ongoing operations
After first start, the agent token is used automatically. The project token is only needed again if you delete the agent token file or move to a different machine.
π Optional: Garnet Dashboard Integrationβ
Once your agent is registered (which happens automatically with a valid token), you can optionally enable the Garnet printer to send security events to the centralized Garnet Dashboard.
βΉοΈ Agent Registration vs Event Dashboard
- Agent Registration (required) - Uses API token, allows Jibril to run
- Garnet Printer (optional) - Sends security events to dashboard for visualization
You can run Jibril with only local printers (stdout, file) and skip the dashboard integration.
Enabling Garnet Printerβ
To send events to the dashboard, add the garnet printer to your configuration:
# /etc/jibril/config.yaml
printers:
- stdout # Local output
- garnet # Dashboard integration (optional)
Dashboard provides:
- π Centralized event aggregation across all agents
- π Real-time event search and filtering
- π Security analytics and trend visualization
- π¨ Alert management and notifications
- π€ AI-powered threat analysis
Use cases:
- Quick environment overview without complex SIEM setup
- Centralized monitoring across multiple servers/clusters
- Rapid security incident investigation
- Alternative to integrating with Wazuh, Grafana, or other tools
π‘ Note: You can use both local printers AND the Garnet printer simultaneously for redundancy.
β Starting Without a Tokenβ
If you try to start Jibril without configuring a token, you'll see this error:
error: GARNET_API_TOKEN is required
Please create a project API token at:
https://dashboard.garnet.ai/dashboard/settings?tab=tokens
Then set it via one of these methods:
1. Environment variable:
export GARNET_API_TOKEN=your-token-here
2. Configuration file (/etc/jibril/config.yaml):
run-time:
api:
token: your-token-here
3. Systemd environment file (/etc/default/jibril):
GARNET_API_TOKEN=your-token-here
Jibril will not start without a valid token.
π Re-registrationβ
To re-register an agent (e.g., moving to a new machine, testing):
# Remove existing agent token
sudo rm /var/lib/jibril/agent.token
# Restart Jibril (will re-register using project token)
sudo systemctl restart jibril
The agents can be deleted from the dashboard, and will be re-registered automatically when Jibril starts with a valid token.
π Advanced Configurationβ
Custom API Endpointβ
For self-hosted or on-premise Garnet installations:
Via configuration file:
run-time:
api:
url: https://your-garnet-instance.com/
token: your-token-here
Via environment variables:
export GARNET_API_URL=https://your-garnet-instance.com/
export GARNET_API_TOKEN=your-token-here
Custom Agent Token Storage Pathβ
run-time:
api:
agent-token-path: /custom/path/agent.token
Verify Successful Registrationβ
Check if registration completed successfully:
# Check logs for registration success
sudo journalctl -u jibril | grep "agent registration complete"
# Verify agent token file was created
sudo ls -la /var/lib/jibril/agent.token
# Should show: -rw------- 1 root root ... agent.token
π Security Best Practicesβ
β Doβ
- β Use environment variables for token storage
- β Create separate tokens for each environment
- β Store tokens in secret management systems (Vault, AWS Secrets Manager, etc.)
- β Rotate tokens regularly (e.g., every 90 days)
- β Use descriptive names for tokens in dashboard
- β Revoke tokens immediately if compromised
- β Review token usage in Garnet Dashboard periodically
β Don'tβ
- β Commit tokens to git repositories
- β Share tokens across teams or projects
- β Use production tokens in development/test
- β Hardcode tokens in scripts or automation
- β Leave tokens in command history
- β Store tokens in unencrypted files
- β Use the same token across all environments
π Next Stepsβ
Once your token is configured, proceed with installation: