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

  1. Go to https://dashboard.logflux.io
  2. Log in to your account

2. Create Personal Access Token

  1. Navigate to SettingsAPI Keys
  2. Click Create New Personal Access Token
  3. Enter a descriptive name for your token
  4. Select appropriate permissions (typically “Read Logs” and “Write Logs”)
  5. Click Generate Token
  6. Important: Copy the token immediately - it starts with lf_pat_ and won’t be shown again

Configure Authentication

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

Configure Private Key

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

  1. Open LogFlux Inspector GUI
  2. Go to SettingsEncryption
  3. Click Browse and select your private key file
  4. Or paste the private key content directly
  5. Click Test Key to verify
  6. 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

  1. Token Storage: Use environment variables or secure credential managers
  2. Key Protection: Set proper file permissions (600) on private keys
  3. Regular Rotation: Rotate PATs and encryption keys periodically
  4. Backup Keys: Securely backup your private keys
  5. Access Control: Limit who has access to tokens and keys
  6. 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