Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQLite backend to example server #15

Closed
wants to merge 6 commits into from
Closed

Conversation

ruuda
Copy link
Collaborator

@ruuda ruuda commented Jun 14, 2020

(As programmed together at ZuriHac)

This adds a simple SQLite database that stores users, and attested credential data for users. This database replaces the previous TVar Users. There is a currently unused function getPublicKeyByCredentialId that can be used in the login-complete endpoint to get the public key to be used for verification.

This is really a toy example, we don't handle things like unique constraint violations. Also, some user-provided data is inserted directly into a blob column in the database. I’m not sure if there is a size limit on those in the parser, but there is probably a DoS vector there.

This is just a toy example database where we can store users and
associated credentials, as an example for the server, don't use
this in production.
This way we still have access to the display name and username.
@ruuda ruuda requested a review from arianvp June 14, 2020 21:23
@duijf duijf mentioned this pull request Jun 15, 2020
@duijf
Copy link
Collaborator

duijf commented Jun 15, 2020

This is probably going to conflict a lot with #14 because I touched a ton of stuff in there.

You shouldn't have to rebase this, as I'm the one causing trouble here. I'll rebase for you

@duijf duijf mentioned this pull request Jun 19, 2020
@arianvp arianvp closed this Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants