jehrhardt / supapasskeys-rust-poc Goto Github PK
View Code? Open in Web Editor NEWA multi-tenant Passkeys server for Postgres and Supabase
License: GNU Affero General Public License v3.0
A multi-tenant Passkeys server for Postgres and Supabase
License: GNU Affero General Public License v3.0
The goal of Supapasskeys has been to provide the best Passkey solution for Supabase. This will still be the goal in the future.
But this focus comes at the risk of binding the project completely to Supabase. That would be very sad as there are other Postgres hosting providers and also people self-hosting Postgres. It would make so much more sense for an open source project to be useable everywhere.
The new strategy is to go for 2 projects:
Both will be independent projects on Github to ensure each one of them is clearly focused on its purpose.
The Supapasskeys API will be rewritten in Rust. Supapasskeys uses already webauthn-rs and using Rust for the whole app has the following benefits:
The current code base will the foundation of Supabase extension. Therefore it will continue to be written in Elixir and use Phoenix LiveView. But we can completely focus on Supabase as the target platform.
After the code split the Passkeys API must be implemented in pure Rust.
This about basic the basic Passkey registration and authentication APIs. Multi-tenancy and Passkey management are not in the scope.
API authentication will also be implemented separately.
We will use axum to implement the registration and authentication endpoints:
POST /passkeys/registrations
: Create a new registration→ 201
+ create credentials optionsPOST /passkeys/authentications
: Create a new authentication → 201
+ credentials request optionsPATCH /passkeys/registrations/:registration_id
: Update the registration with attestation response → 204
PATCH /passkeys/authentications/:authentication_id
: Update the authentication with assertion response → 204
Server side relying party will be implemented using webauthn-rs.
For now the relying party will be configured by the following environment variables:
RELYING_PARTY_NAME
RELYING_PARTY_ORIGIN
The variables will eventually be removed, when multi-tenancy is implemented later.
Supapasskeys will depend on basic Postgres 15. We will use SeaORM for database mapping and migration. Database migrations will be written in SQL, not in the SeaORM DSL.
The main branch needs to build a Docker image for amd64
and arm64
and publish it to Github packages. During CI a Docker build must be executed for amd64
only to verify the build.
All required documentation goes into README.md
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.