Authentication Setup
Centralized guide for LogFlux authentication configuration
LogFlux clients use Personal Access Tokens (PATs) for secure authentication with the LogFlux platform.
Get Your Personal Access Token
1. Access LogFlux Dashboard
- Go to https://dashboard.logflux.io
- Log in to your account
2. Create Personal Access Token
- Navigate to Settings → API Keys
- Click Create New Personal Access Token
- Enter a descriptive name for your token
- Select appropriate permissions (typically “Read Logs” and “Write Logs”)
- Click Generate Token
- Important: Copy the token immediately - it starts with
lf_pat_
and won’t be shown again
Environment Variables (Recommended)
1
2
3
4
5
|
# Set your PAT token
export LOGFLUX_PAT="lf_pat_your_token_here"
# Verify the token is set
echo $LOGFLUX_PAT
|
Command Line Authentication
1
2
3
4
5
6
7
8
|
# Login with your PAT (CLI clients)
logflux-inspector auth login --token lf_pat_your_token_here
# Verify authentication
logflux-inspector auth status
# View current user
logflux-inspector auth whoami
|
Set Up Encryption Keys
LogFlux clients require your RSA private key for decrypting logs locally.
Generate Key Pair (First Time Setup)
If you don’t have RSA keys yet:
1
2
3
4
5
6
7
8
9
10
11
|
# Create LogFlux directory
mkdir -p ~/.logflux
# Generate RSA key pair (4096-bit recommended)
openssl genrsa -out ~/.logflux/private_key.pem 4096
# Generate public key
openssl rsa -in ~/.logflux/private_key.pem -pubout -out ~/.logflux/public_key.pem
# Set secure permissions
chmod 600 ~/.logflux/private_key.pem
|
Environment Variable Method
1
2
|
# Set private key path
export LOGFLUX_PRIVATE_KEY_FILE="~/.logflux/private_key.pem"
|
Client Configuration Method
1
2
3
4
5
|
# For CLI clients
logflux-inspector config set-key --private-key-file ~/.logflux/private_key.pem
# Verify key configuration
logflux-inspector config get encryption.private_key_file
|
GUI Configuration
- Open LogFlux Inspector GUI
- Go to Settings → Encryption
- Click Browse and select your private key file
- Or paste the private key content directly
- Click Test Key to verify
- Click Save
Verify Setup
Test Authentication
1
2
3
4
|
# Test connection and authentication
logflux-inspector auth status --verbose
# Should show: "✓ Authenticated as [your-email]"
|
Test Decryption
1
2
3
4
|
# Test that you can decrypt logs
logflux-inspector logs --limit 1
# Should show decrypted log content, not encrypted data
|
Troubleshooting
Authentication Issues
1
2
3
4
5
6
7
8
9
|
# Check token format
echo $LOGFLUX_PAT | grep "^lf_pat_"
# Re-authenticate if needed
logflux-inspector auth logout
logflux-inspector auth login --token $LOGFLUX_PAT
# Check network connectivity
curl -H "Authorization: Bearer $LOGFLUX_PAT" https://api.logflux.io/v1/auth/verify
|
Key Issues
1
2
3
4
5
6
7
8
|
# Verify private key file exists and has correct permissions
ls -la ~/.logflux/private_key.pem
# Test key format
openssl rsa -in ~/.logflux/private_key.pem -check
# Check file permissions (should be 600)
chmod 600 ~/.logflux/private_key.pem
|
Network Issues
1
2
3
4
5
6
|
# Test with proxy if behind corporate firewall
export HTTPS_PROXY=http://proxy.company.com:8080
logflux-inspector auth status
# Test DNS resolution
nslookup api.logflux.io
|
Security Best Practices
- Token Storage: Use environment variables or secure credential managers
- Key Protection: Set proper file permissions (600) on private keys
- Regular Rotation: Rotate PATs and encryption keys periodically
- Backup Keys: Securely backup your private keys
- Access Control: Limit who has access to tokens and keys
- Network Security: Use VPNs for sensitive environments
Next Steps
After completing authentication setup:
- Install and configure LogFlux Agent for log collection
- Start using LogFlux Inspector CLI or GUI for log analysis
- Explore integrations to connect your log sources