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

Implement service tokens #217

Open
mgaonach opened this issue Oct 5, 2022 · 2 comments
Open

Implement service tokens #217

mgaonach opened this issue Oct 5, 2022 · 2 comments

Comments

@mgaonach
Copy link
Collaborator

mgaonach commented Oct 5, 2022

We need to have the possibility to create service tokens (used for syncronisation from MXCuBE for instance). These could be the using the same JWT token system as user tokens but with a longer expiration time, defined at creation.

The only difference is that it should not contain a personId as it should not be linked to a person (see if setting it to None or some dummy value like -1 would cause problems?)

These tokens could be created with a new route POST /auth/service by a logged in user with required permission (create_service_token) who specifies the required information:

  • service name
  • permissions
  • expiration time
@mgaonach mgaonach self-assigned this Oct 5, 2022
@mgaonach mgaonach changed the title Service tokens Implement service tokens Oct 5, 2022
@stufisher
Copy link
Collaborator

We need to think about this, this has never been implemented properly in java or synchweb. We probably want a full OAuth system, with token and refresh system. Certainly shouldn't have long validity tokens.

@antolinos
Copy link
Collaborator

Before jumping in heavy developments we could organize a meeting to make the authentication/authorization mechanism clear and double check that all the use cases are on the table.
Just some questions came to my mind:

  • Do we really need a separate mechanism for the service taking into account that a service might be considered as a user with specific permissions?
  • How the downstream process (workflows, analysis...) will authenticate the requests? Re-authentication? Token propagation?
  • In the client side, how/where do the credentials/api token will be stored?
  • Is it envisagable a non-public py-ispyb instance dedicated to data ingestion (with a single service authentication mechanism deployed) and a publicly exposed instance for the UI/users?
  • Etc...

@mgaonach mgaonach removed their assignment Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants