Skip to main content
Version: Next

Authentication Service Integration

This guide covers basic authentication service configuration for Merobox, including enabling the auth service and basic configuration options.

Basic Auth Service Configuration

Merobox provides basic authentication service support with Traefik proxy:

Enable Auth Service

Enable authentication service when starting nodes:

# Start nodes with auth service
merobox run --count 2 --auth-service

# Use custom auth service image
merobox run --count 2 --auth-service --auth-image ghcr.io/calimero-network/mero-auth:latest

Workflow Configuration

Enable auth service in workflow files:

# workflow.yml
auth_service: true
auth_image: ghcr.io/calimero-network/mero-auth:edge

nodes:
chain_id: testnet-1
count: 2
image: ghcr.io/calimero-network/merod:edge
prefix: calimero-node

Environment Variables

Configure auth service using environment variables:

# Auth service is configured through CLI flags
# merobox run --auth-service --auth-image ghcr.io/calimero-network/mero-auth:edge

Auth Service Features

When auth service is enabled, Merobox provides:

Node Access

  • Authenticated Access: Nodes are accessible via http://node1.127.0.0.1.nip.io
  • Admin Dashboard: Available at http://node1.127.0.0.1.nip.io/admin-dashboard
  • API Authentication: All API endpoints require authentication

Traefik Integration

The auth service uses Traefik proxy for:

  • Automatic HTTPS: SSL termination and certificate management
  • Load Balancing: Distribute requests across multiple nodes
  • Authentication: Handle authentication for all requests

Managing Auth Service

Start Auth Service

# Start nodes with auth service
merobox run --count 2 --auth-service

# Stop auth service
merobox stop --auth-service

# Stop all nodes and auth service
merobox stop --all

Check Auth Service Status

# List running services
merobox list

# Check health status
merobox health --verbose

Troubleshooting

Common Issues

Check auth service logs and status:

# Check auth service logs
docker logs calimero-auth-service

# Check Traefik logs
docker logs calimero-traefik

# Verify auth service is running
docker ps | grep auth

Debug Mode

Enable debug logging for troubleshooting:

# Enable debug logging
export LOG_LEVEL=DEBUG

# Run with verbose output
merobox run --count 2 --auth-service --verbose

Best Practices

Security

  1. Use HTTPS: Always use HTTPS in production environments
  2. Secure Images: Use specific image tags instead of latest
  3. Environment Variables: Store sensitive configuration in environment variables
  4. Regular Updates: Keep auth service images updated

Performance

  1. Resource Limits: Set appropriate memory and CPU limits
  2. Monitoring: Monitor auth service performance
  3. Scaling: Consider multiple nodes for high availability

Next Steps

Now that you understand basic authentication service integration:

Was this page helpful?
Need some help? Check Support page