Simple identity provider for hosting your own Single Sign-On solution or avoiding the need to write yet another user login & management system for your next project. Supports OpenID Connect (OAuth 2.0) and intended to be easy and lightweight to host.
Go to file
Olivier 'reivilibre acb148d144
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/tag/ci Pipeline was successful
v0.0.1
Signed-off-by: Olivier 'reivilibre <olivier@librepush.net>
2024-07-07 23:11:32 +01:00
.sqlx Implement /userinfo 2024-01-21 23:05:44 +00:00
.woodpecker Add Woodpecker CI configuration 2024-07-07 13:45:50 +01:00
docs Add test scaffolding 2024-07-06 14:31:06 +01:00
flake-devenv Add machinery for seeding RNG for tests and start testing the auth flow 2024-07-06 21:04:01 +01:00
migrations CSRF -> XSRF (I use the XSRF abbreviation more myself) 2024-01-20 22:03:33 +00:00
nixos_tests Add a Nix flake with NixOS module and test 2024-06-25 17:14:19 +01:00
scripts-dev Add a dev script for trying oauth2c against the service 2024-04-21 17:12:13 +01:00
src Test conflicting /token redemptions, bringing us up to 66% coverage 2024-07-07 12:59:48 +01:00
static Add a Nix flake with NixOS module and test 2024-06-25 17:14:19 +01:00
templates Add a Nix flake with NixOS module and test 2024-06-25 17:14:19 +01:00
translations Add a Nix flake with NixOS module and test 2024-06-25 17:14:19 +01:00
.envrc Move devenv flake to subpath of repository 2024-06-25 22:07:18 +01:00
.gitignore Switch to devenv so developers can easily spin up a Postgres 2023-11-10 18:59:10 +00:00
book.toml Add a basic docs book 2023-12-06 00:09:28 +00:00
build.rs Get to the point where token exchange is possible with the dummy account 2023-11-25 23:23:17 +00:00
Cargo.lock Add machinery for seeding RNG for tests and start testing the auth flow 2024-07-06 21:04:01 +01:00
Cargo.toml v0.0.1 2024-07-07 23:11:32 +01:00
CHANGELOG.md v0.0.1 2024-07-07 23:11:32 +01:00
config.toml Allow specifying OIDC Client Secrets in external config file 2024-04-21 16:42:13 +01:00
flake.lock Update flakes 2024-06-26 19:31:24 +01:00
flake.nix Update flakes 2024-06-26 19:31:24 +01:00
LICENCE Update README and LICENCE 2024-06-25 17:14:19 +01:00
nixos_module.nix Add convenient CLI wrapper to NixOS module 2024-06-25 17:14:19 +01:00
README.md Update README and LICENCE 2024-06-25 17:14:19 +01:00
secrets.toml Allow specifying OIDC Client Secrets in external config file 2024-04-21 16:42:13 +01:00

idCoop

idCoop is a small, lightweight identity provider / user login system. idCoop acts as an OpenID Connect (OAuth 2.0/2.1) provider. You can use it as a Single Sign On (SSO) solution for your home server or to avoid having to roll your own login system for your own service.

idCoop is still experimental and underdeveloped. If you use it, it's at your own risk :-).

Features

  • Support for OAuth 2.1 draft 9 (OAuth 2.1 is essentially a restatement of OAuth 2.0 best practices)
  • OpenID Connect
  • Username and password login (passwords hashed with Argon2)
  • Light requirements: less than 32 MB RAM usage

Future Features

  • E-mail registration
  • E-mail password resets
  • Two-Factor Authentication
  • Registration token/link system for invite-only services
  • Administration interface

Documentation

Documentation is in the docs directory and (TODO) will be available to view on the web.

Please see the documentation for installation instructions.

Licence and Contributing

Copyright © Olivier 'reivilibre' 2024

idCoop is licensed under the AGPL v3 at this time. See the LICENCE file. Unless otherwise stated, all files in this source repository are under this licence.

idCoop is currently a bit early-stage for contributions and I am still unsure about the final licence. However, if desired, please contact me via the e-mail address found in the git commit metadata. Thanks.

Acquiring development tools using the Nix flake

We have a Nix flake available containing all the required tools; either use direnv and direnv allow this repository or use nix develop --impure ./flake-devenv as needed.

Database

You'll need a Postgres database to run idCoop as well as when changing SQL queries in the code.

If using the Nix flake, you can use devenv up to start up a Postgres database (which you can then connect to automatically with the psql command line and the empty-looking postgres: URI for SQLx).

We use SQLx as the database driver and we use its compile-time query checking, but it is worth bearing in mind we support SQLx's 'offline mode'. (We want CI and other people to be able to compile the project without needing a database for query analysis.) What this means is that if you add or change a SQL query, you need to ask SQLx to update the stored query analyses by running cargo sqlx prepare --database-url postgres: and then you need to include the changes in the .sqlx/ directory in your commit.

Generating an RSA key

# Generate keypair part
openssl genrsa -out keypair.pem 2048
# Extract public part
openssl rsa -in keypair.pem -pubout -out publickey.crt