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

Test coverage #9

Open
JohnMcLear opened this issue Sep 16, 2020 · 1 comment
Open

Test coverage #9

JohnMcLear opened this issue Sep 16, 2020 · 1 comment

Comments

@JohnMcLear
Copy link
Member

Here I am going to outline what the test coverage will be,.

  1. Install ep_hash_auth
  2. Set some user details by creating a hash file (should include admin and user)
  3. Using request try to auth against /admin with them set (test for failure and success)

Rinse and repeat test with hash coming from within settings.json (and not from the file system)

The new users blob will look like this:

"users": {
  "admin": {"is_admin": true, "hash": "$2a$10$WQ/wvL2pzJlIgCP719JnLOr0zpsYpWWjT3yQdVq37XlfbV6DJaHCy" },
  "user": {"is_admin": false, "hash": "$2a$10$TQrVqy4eRpG7Kde7Sfl8..eycP3Bc/K.2vlDFY1u9C0Stl24.8V3G" }
}

admin has the password of password and user as password2

The file system will be a bit more involved with a settings blob of

  "ep_hash_auth": {
    "hash_typ": "sha512",
    "hash_dig": "hex",
    "hash_dir": "/var/etherpad/users",
    "hash_ext": "/.hash",
    "hash_adm": false,
    "displayname_ext": "/.displayname"
  },

then we will have to create the folder structure and create

/var/etherpad/users/admin/.hash

and

/var/etherpad/users/user/.hash
/var/etherpad/users/admin/.hash

with each .hash file containing the hash of each user.

@JohnMcLear
Copy link
Member Author

JohnMcLear commented Sep 16, 2020

I wrote an example test that works that can be used for reference :)

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

No branches or pull requests

1 participant