Skip to content

scoville/zagreus-identity-provider

Repository files navigation

Zagreus - The identity provider service that wants to break free

Prerequisites

  1. You'll need Docker, Node, and Rust installed

  2. Install SQLx:

cargo install sqlx-cli

Installation

  1. Set up a local postgres database for the idp service and run the Hydra instance (necessary each time the docker containers are shut down):
docker-compose up zagreus-postgres hydra
  1. You'll need to setup your database. Zagreus uses SQLx to handle database management, migrations, and queries.
sqlx database create
sqlx migrate run
  1. Build the app using Cargo (should be installed with Rust):
cargo build --release

Building in release mode might take some time, relax and grab some coffee 😁 Dev mode with cargo check is much, much faster.

  1. If needed, add the built executable to your system's $PATH. Easiest way would be to symlink the built binary to one folder that is already in your path, e.g. /usr/local/bin/
echo $PATH

sudo ln -s /[full-path-to-the-project-folder]/zagreus-identity-provider/target/debug/zagreus /usr/local/bin/
  1. Go to the client project and run the zagreus commands to initiate the idp database with a client and run the server.

  2. Follow the client's instructions or create your own client (see here for more)

From that step it's up to the client to elaborate its own building process, but here are some things to know.

  • The zagreus command is meant to be used as a standalone binary installed on a system or via Docker. It relies on environment variables that have to be present in a .env file at the root of the client project. This way the zagreus binary can load the required configuration and run properly.
  • In order to initialize your client you can run the following command (needed once):
zagreus init --client-name [my-client-name]
  • Zagreus can be started using this command:
zagreus run

Or by prepending RUST_LOG=info to the command above to display the logs in the terminal.

Documentation

Documentation can be found here.

About

The identity provider service that wants to break free

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published