mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 17:16:00 +03:00
[GH-ISSUE #1060] Feature Request: Support non-admin users with more granular permissions #663
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#663
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gitwittidbit on GitHub (Dec 8, 2022).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1060
Hi,
first of all, thank you for this cool project!
I was able to easily install it using docker-compose. And I could also register as admin and do some test archivals.
But I am failing to set up a user to use for actual archival jobs. What I mean is, I set up the user on the GUI, log out as admin, try to log in as the user but get an error message telling me that the user or password are incorrect (and that both could be case sensitive).
Well, I double and triple checked the name and the password - still nothing.
I reset the password using the CLI - still nothing.
I tried making the user "staff" - still nothing.
I tried making the user "superuser" - still nothing.
I wanted to try and add the user to some group - but I can't find any group and can't create any.
So can anybody tell me why my user can't log in?
And what does "staff" mean? Or, to turn it around: What would be the use for a user that is not staff and, hence, cannot log in. What could such user do? And how do I create groups?
Thanks!
@pirate commented on GitHub (Dec 9, 2022):
The PUBLIC_* config options determine what users need to be logged in to do. Right now the only meaningful distinction is anonymous user (not logged in at all) vs staff superuser logged in. We may add more granular permissions and support for groups permissions in the future, but for now just make sure your new user is both staff and superuser, otherwise they're effectively anonymous/have no privileges.
If setting your new user to staff+superuser doesn't fix it, show me a screenshot of the users page in the admin , and the output of
archivebox versionand I'll see if there's anything out of the ordinary.@p6002 commented on GitHub (Feb 18, 2023):
Did you find a way to create user?
@thestupidestthing commented on GitHub (Feb 28, 2024):
I just ran into this problem as well.
Looking back at the admin user I created through
docker run...andarchivebox manage createsuperuserin the WebUI, it looks like the Password field stores and displays the password hash (in the form pbkdf2-sha256$216000$$Z21uKIfK67gw2VSDfXSks02qrcb3shexylxoLNuEgrM=), and so entering a fresh password into the field for a newly created user will never successfully compare with the same password entered during login because that gets hashed and no longer matches the password. I tried hashing 'test' as a password (above) but evidently it's saltedso that still doesn't workwith any salt.Also, it seems kind of dangerous to have the hashed password stored in an editable field like it is, since there's no utility to editing it and accidentally editing it (thinking it's being reset) will lock the admin out.
EDIT: Okay, I used https://www.dcode.fr/pbkdf2-hash to create hashes of my test passwords and it's apparently salted with anything - so: Hashing Algo = SHA-256, Salt = <some string as salt>, # of iterations = 216000 and Output format = Django PBKDF2_ >> profit.
@pirate commented on GitHub (Feb 28, 2024):
If you click
Accountin the upper right it takes you to the password editing page:/admin/password_change/. No need to ever manually pbkdf2 your password, that would be wild to expect users to do haha 😅The one utility of having it editable is that an admin can help migrate users between archivebox instances by copy pasting their hashed passwords without ever having to know the cleartext password. This is a thing our government/corporate users do sometimes when they have multiple archivebox instances and need to clone user accounts between them.