Overview

Whiskey

Whiskey is the new Identity Provider (IdP) for AGEPoly. Development efforts started in 2022 and full transition is planned in 2025. Main features are:

  • Customizable identity schemas
  • Support for OIDC/oAuth2 clients through Ory Hydra
  • Advanced claim mapping for ID and access tokens
  • Self-registration using EPFL identities
  • Login by password or passkeys
  • Synchronization of EPFL identities through LDAP
  • Advanced GBAC/RBAC using groups and roles to fit AGEPoly's complex and evolving requirements

Architecture

  • PostgreSQL database, dbmate for migrations
  • gRPC API
  • Rust backend
    • Tonic as gRPC server
    • Clorinde for codegen of database queries from raw SQL
  • Vue3 frontend
    • Tailwindcss for utility classes
    • FLowbite for simple Tailwind templates
    • Official protoc codegen for Typescript types from proto files

Development setup

Database setup

Basic PostgreSQL instance with a user with all rights to a database

Whiskey configuration file settings.yml

Example:

mailer:
   from: 'AGEPoly - Whiskey <whiskey@agepoly.ch>'
   smtp_relay: smtp.gmail.com
   smtp_user: whiskey@agepoly.ch
   smtp_pass: <gmail password>
   
database:
   config: 'user=username password=password host=hostname dbname=whiskey sslmode=disable connect_timeout=5'

Clorinde codegen

Clorinde creates a dedicated crate ./clorinde with the generated code and dependencies.

cargo install clorinde # Installs at ~/.cargo/bin/clorinde

export DATABASE_URL="postgres://username:password@username/whiskey?sslmode=disable"
clorinde live --serialize true -q db/queries