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

Non Admin User and PIN based login #221

Closed
csoni111 opened this issue Jul 30, 2019 · 1 comment · May be fixed by #358
Closed

Non Admin User and PIN based login #221

csoni111 opened this issue Jul 30, 2019 · 1 comment · May be fixed by #358
Assignees

Comments

@csoni111
Copy link
Member

csoni111 commented Jul 30, 2019

On HDA level we can have several users and can control permissions (read/write) for each one (which shares are accessible to whom). But currently, we do not have HDA user level authentication in the app. Anyone logged in with the amahi.org credentials can view/access all the shares and files in the HDA.

So need to implement Non Admin User (NAU) login and authentication in the app. This is to be done in two parts:

1. Simple pin authentication for each user (admin as well as non-admin) for each HDA.

  • This will include adding an extra step in the current browsing flow
  • On selecting an HDA from the list, the user will be taken to the next screen asking a 4-6 digit PIN from the user
  • On submitting, this entered PIN has to sent to the FS (either over remote or local mode) via POST on \auth
  • If the PIN is correct, the FS will return an auth_token which needs to be stored for further use
  • Every further call to the FS will require the auth_token to be sent in Authorization header and if not provided the request will fail with 403 Forbidden status code
  • If the PIN is incorrect, FS will respond with 401 Unauthorized status code, and appropriate error has to be shown to the user
  • Any successive attempt to open the same HDA should not ask for a PIN again and should use the same auth_token stored earlier
  • The user must be provided with a Logout from HDA option which will delete the stored auth_token after a successful POST to \logout and then if the user tries to open the HDA again the PIN login screen will be shown

2. Direct PIN-based login for a local non-admin user, without providing amahi.org credentials.

Ref. https://github.com/amahi/amahi-anywhere-specs#hda-user-authentication

@csoni111
Copy link
Member Author

One note which I forgot to mention, the Welcome To Amahi HDA has to be bypassed from this pin authentication. For this, the pin need not be taken from the user. Instead, any PIN will work in the /auth call and will give a valid authentication token.

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 a pull request may close this issue.

2 participants