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

ENH: tiled auth widget #199

Closed
wants to merge 4 commits into from
Closed

Conversation

maffettone
Copy link
Contributor

A widget that uses tiled's auth mechanism to pass a user and password for read only permissions.

Description

The widget does a couple of things:
1 . Creates a tiled Context and uses Context.authenticate to get off the ground.
2. Generates a temporary API key (default of 12 hours) that has read only scopes. @jmaruland: is there a risk of api key bloat, or does the server know to remove invalid API keys after a period of time?
3. Spawns a tiled client with that API key. This client will loose access after the timeout and a new login with be required.
4. A singleton state manager is holds onto the context, partial api_key, and tiled client object.
5. Enables logging out, so that the api key is removed, the client object deleted, and the context logout.
6. A big fat warning up top.

This should provide 2 forms of security: the ability to logout when finished, and the ability to set a timeout for the duration of your work should you forget to logout.

Motivation and Context

Data security. Folks want the operator accounts to be able to persistently run a QT GUI that can read back data from rest. This allows for one user to login for their beam time, and not have their data accessible outside of their experiment.

How Has This Been Tested?

Local env on a Mac, using the example in the PR. Screenshots provided.

Screenshot 2024-11-19 at 9 25 34 AM
Screenshot 2024-11-19 at 9 52 43 AM
Screenshot 2024-11-19 at 9 54 21 AM

@maffettone maffettone changed the title Add tiled auth widget ENH: tiled auth widget Nov 19, 2024
@maffettone maffettone marked this pull request as draft November 19, 2024 17:13
@maffettone maffettone closed this Nov 19, 2024
@whs92
Copy link
Member

whs92 commented Nov 19, 2024

@padraic-shafer are we using this with the pymca tiled integration?

@maffettone
Copy link
Contributor Author

@whs92 no, this was just something I hacked together and wanted feedback on. We'll align more strategically before pushing something that is managing Auth flow.

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.

2 participants