This repository provides a custom authentication and authorization solution for Temporal, integrating with a custom OIDC provider for user authentication and role-based access control.
This is using Tilt for local development and using Docker Desktop for the Kubernetes cluster.
- OIDC Authentication
- Role-based access control for Temporal namespaces
- Environment-based configuration
- Local development setup with Kubernetes
- Automatic secret management
- Docker Desktop with Kubernetes enabled
- Tilt for local development
- Helm for Kubernetes deployments
- Go 1.23 or later
- Clone the repository:
git clone https://github.com/your-repo/temporal-auth-server.git
cd temporal-auth-server
- Copy the environment template and fill in your values:
Authentication is configured through environment variables and Kubernetes secrets:
TEMPORAL_AUTH_ISSUER_URL
: OIDC issuer URLTEMPORAL_AUTH_CLIENT_ID
: OAuth client IDTEMPORAL_AUTH_CLIENT_SECRET
: OAuth client secret
Access control is managed through group mappings:
admin
: Full system accessbitovi
: Access to bitovi-related namespacesfinance
: Access to finance-related namespaces
The development environment is managed through Tilt and uses:
- Local Kubernetes cluster
- PostgreSQL for persistence
- Automatic code reloading
- Environment variable management
- Port forwarding for easy access
The Temporal Web UI is available at: http://localhost:8080
The Temporal API is available at: localhost:7233
├── server/ # Custom Temporal server implementation
│ └── config/ # Server configuration
├── k8s/ # Kubernetes configuration
│ └── dev/ # Development environment configuration
- Update the code in
server/
- Tilt will automatically rebuild and deploy changes
- Check the Tilt UI for build and deployment status
Common issues and solutions:
-
Authentication Failures
- Check the
.env
file contains correct credentials - Verify the OIDC provider is accessible
- Check the logs for token validation errors
- Check the
-
Build Failures
- Ensure Docker is running
- Check Go module dependencies
- Verify Kubernetes context is correct
-
Deployment Issues
- Check Tilt logs for deployment errors
- Verify Kubernetes secrets are created
- Check pod logs for runtime errors
-
Creating a new namespace
- Run
tctl --ns bitovi-project n re
- Run
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request