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

Ability to sign in to Datasette as a root account #784

Closed
simonw opened this issue May 31, 2020 · 5 comments
Closed

Ability to sign in to Datasette as a root account #784

simonw opened this issue May 31, 2020 · 5 comments

Comments

@simonw
Copy link
Owner

simonw commented May 31, 2020

I'm going to draw the line here: default Datasette supports authentication but only for a single user account ("admin"). Plugins can then add support for multiple user accounts, social auth, SSO etc.

Originally posted by @simonw in #699 (comment)

@simonw simonw added this to the Datasette 1.0 milestone May 31, 2020
@simonw simonw changed the title Tools for configuring a default admin account and password Tools for configuring a default root account and password May 31, 2020
@simonw
Copy link
Owner Author

simonw commented May 31, 2020

I'm calling this the root account now, for reasons discussed in these two comments: #699 (comment)

@simonw
Copy link
Owner Author

simonw commented May 31, 2020

For the first version of this I'm not going to use passwords at all. I'll implement this:

$ datasette fixtures.db --root

The --root option will cause Datasette to output a URL with a one-time-use token in it which, when clicked, will authenticate the user as the root account (by setting a signed cookie).

Signed cookie means Datasette needs a secrets recipe. I'll open a new issue for that.

@simonw simonw changed the title Tools for configuring a default root account and password Ability to sign in to Datasette as a root account Jun 1, 2020
@simonw
Copy link
Owner Author

simonw commented Jun 1, 2020

The URL for this will be:

/-/auth-token?token=xxx

The token will be generated by Datasette on startup and will only be valid for a single request, at which point it will be used to set a signed ds_actor cookie and then redirect to the homepage.

@simonw
Copy link
Owner Author

simonw commented Jun 1, 2020

I'm considering this done. I'm going to leave it to plugins to implement a web-based sign-in flow for accounts (at least for the moment).

@simonw simonw closed this as completed Jun 1, 2020
@simonw simonw modified the milestones: Datasette 1.0, Datasette 0.44 Jun 6, 2020
simonw added a commit that referenced this issue Jun 12, 2020
@simonw
Copy link
Owner Author

simonw commented Jul 6, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant