Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tab/loki
SSO & RBAC service for Smart-ID and Mobile-ID
https://github.com/tab/loki
authentication go golang mobile-id rbac smart-id sso sso-authentication
Last synced: about 20 hours ago
JSON representation
SSO & RBAC service for Smart-ID and Mobile-ID
- Host: GitHub
- URL: https://github.com/tab/loki
- Owner: tab
- License: mit
- Created: 2024-11-27T16:11:28.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-02-06T22:30:30.000Z (4 days ago)
- Last Synced: 2025-02-06T23:27:23.650Z (4 days ago)
- Topics: authentication, go, golang, mobile-id, rbac, smart-id, sso, sso-authentication
- Language: Go
- Homepage: https://tab.github.io/loki
- Size: 532 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Loki
SSO (Single Sign-On) service that provides user authentication functionality using `Smart-ID` and `Mobile-ID`.
It integrates with SK ID Solutions APIs and manages user roles, permissions, and scopes.Designed to be easily integrated into microservices architectures and provides logging and telemetry for monitoring.
## Key Features
- Create and update user accounts, with role and scope assignments
- Generate and validate JWT tokens
- Authenticate users via `Smart-ID` and `Mobile-ID` through SK ID Solutions provider APIs
- Comprehensive logging and telemetry support (OpenTelemetry) for easier monitoring and tracing.
- Easily integrate into a microservices architecture## Setup and Configuration
**Environment Variables**:
Use `.env` files (e.g., `.env.development`) or provide environment variables for:
- `SECRET_KEY` for JWT signing
- `DATABASE_DSN` for PostgreSQL
- `REDIS_URI` for Redis
- `SMART_ID_API_URL`, `MOBILE_ID_API_URL` and corresponding relying on party credentials**Database Migrations**:
Run the following command to apply database migrations:
```sh
GO_ENV=development make db:drop db:create db:migrate
```**Run the Services**:
```sh
docker-compose build
docker-compose up
```**Check health status**:
```sh
curl -X GET http://localhost:8080/health
```## Documentation
[Documentation](https://tab.github.io/loki)
## API Documentation
Swagger file is available at [api/swagger.yaml](https://github.com/tab/loki/blob/master/api/swagger.yaml)
## Architecture
The application follows a layered architecture and clean code principles:
- **cmd/loki**: Application entry point
- **internal/app**: Core application logic, including services, controllers, repositories, and DTOs
- **internal/config**: Configuration loading and setup, server startup, middleware, router initialization, and telemetry configuration
- **pkg**: Reusable utilities such as JWT token handling and logging## License
Distributed under the MIT License. See `LICENSE` for more information.
## Acknowledgements
- [SK ID Solutions](https://www.skidsolutions.eu/) for providing the Smart-ID and Mobile-ID APIs