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

Refactor auth mechanism in sync-experiment #198

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

genematx
Copy link
Collaborator

@genematx genematx commented Oct 4, 2024

Context: Some beamlines (e.g. SMI) collect data on multiple proposals during the same run to make use of the same environment conditions between the experiments (e.g. temperature); changing these conditions often would unnecessarily require too much downtime for the instruments.
Our current sync-experiment workflow assumes that a user (or a beamline scientist) switches to a new proposal at the beginning of acquisition (possibly even before opening bsui). This would be impractical for highly dynamic or automated plans as above.

This PR Separates the authentication mechanism in the internal sync_experiment function from the updating of the redis dictionary. This would allow us to switch between multiple proposals within a profile_collection plan (using the new switch_redis_proposal(proposal_number, beamline, username, prefix) function -- SMI already have something very similar that they extensively use in their profile collection, and the idea is to just replace it). This function will still check if a user has the rights to collect data on a proposal, but wouldn't ask for their password. We will need that before running bsui or in the base step of profile collection, the user properly authenticates with sync-experiment (this is effectively an honor system, but writing the data in a correct location is is in their interests, because otherwise they won't be able to read it).

These refactoring changes will not break any existing deployments.

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 this pull request may close these issues.

1 participant