Skip to content

Authentication & Authorization

BoilStream provides enterprise-grade JWT-based authentication and fine-grained authorization to secure your data streaming operations. The system supports multiple identity providers and implements a flexible 3-level authorization hierarchy.

Overview

BoilStream's security model consists of two main components:

  • Authentication: Verifying user identity using JWT tokens from trusted providers
  • Authorization: Controlling access to resources based on user groups, scopes, and identity

Supported Identity Providers

BoilStream supports the following enterprise SSO providers:

ProviderStatusMulti-tenantCustom Claims
AWS Cognito✅ Production ReadyNoLimited
Azure AD (Entra ID)✅ Production Ready✅ YesYes
Google Cloud Platform✅ Production Ready✅ Workspace✅ Configurable
Auth0✅ Production Ready✅ Yes✅ Configurable
Okta✅ Production Ready✅ Yes✅ Configurable

3-Level Authorization Hierarchy

BoilStream implements a prioritized authorization system with three levels:

Level 1: Groups/Roles (Highest Priority)

  • Primary authorization mechanism
  • Provider-specific group mappings
  • Admin, read-only, and write groups

Level 2: Scopes/Permissions (API-level)

  • OAuth 2.0 style scopes for API access
  • Fine-grained operation control
  • Can require specific scopes for read/write/admin operations

Level 3: User Identity (User-specific)

  • Individual user access rules
  • Topic-specific permissions
  • Lowest priority, used for edge cases

Security Features

JWT Token Validation

  • Signature Verification: RSA/ECDSA signature validation using JWKS
  • Claims Validation: Issuer, audience, expiration, and custom claims
  • JWKS Caching: Automatic key rotation support with TTL-based caching

Access Control

  • Resource-based Authorization: Control access to topics, admin functions, metrics
  • Action-based Permissions: Separate read, write, publish, subscribe, admin actions
  • Topic-level Security: Fine-grained per-topic access control

Production Security

  • TLS Encryption: All FlightRPC communications encrypted in transit
  • Audit Logging: Comprehensive authentication and authorization logging
  • Graceful Degradation: System works with authentication disabled for development

When to Use Authentication

Enable Authentication When:

  • ✅ Running in production environments
  • ✅ Multi-tenant deployments
  • ✅ Compliance requirements (SOC2, GDPR, etc.)
  • ✅ Sensitive data processing
  • ✅ External client access

Skip Authentication When:

  • ⚠️ Development and testing environments
  • ⚠️ Internal, trusted network deployments
  • ⚠️ Single-user scenarios
  • ⚠️ Performance testing (reduces overhead)

Security Consideration

Always enable authentication in production environments. Running without authentication exposes all data and administrative functions to any network client.

Configuration Overview

Authentication is configured entirely through environment variables, making it ideal for containerized deployments:

bash
# Enable authentication with multiple providers
AUTH_PROVIDERS="cognito,azure-ad,gcp"

# Configure authorization rules
ADMIN_GROUPS="boilstream-admins,data-engineers"
READ_ONLY_GROUPS="analysts,viewers"
WRITE_GROUPS="producers,data-writers"

Quick Start

For a complete setup example, see our provider-specific guides:

Next Steps

  1. Choose Your Provider: Select the identity provider that matches your organization
  2. Configure Environment Variables: Set up authentication credentials and rules
  3. Test Authentication: Verify JWT tokens are properly validated
  4. Deploy with Security: Enable TLS and proper network security

Ready to secure your BoilStream deployment? Start with the Environment Variables guide to understand all configuration options.