-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix Squonk access control #937
Comments
After discussion with @tdudgeon and @rsanchezgarc: Project dialog is the mechanism for creating projects in squonk.
Squonk-side:
Epic14 ideas:
|
General project navigation issues to solve:
Landing page:
|
The first thing to decide on is the policy for which Squonk project is to be used by an individual user in Fragalysis. There are a number of options:
Probably 2 or 5 make the most sense, but all have some merit and we can probably handle multiple options if needed. The complications are:
Sorry this is all quite detailed, but the devil really is in the detail! |
I think that, al least for the first iteration, option 4 should be enough. It is more in line with what Frank posted above. Obviously, options 5 and 6 look more interesting, but also more complicated, so I prefer to start simple and check how it works |
Mapping between Fragalysis and Squonk Also:
|
Out of scope for this ticket/release
In scope for this ticket, needing final design (@tdudgeon @alanbchristie @boriskovar-m2ms)
|
wrt the comment on Oct 21 ... there will be a separate Unit for each Visit, so each Proposal-Visit reference results in an independent Squonk Unit |
@boriskovar-m2ms reckons not a lot of F/E work. |
We need an additional database constraint fix: What we clarified: In the F/E landing page, column header should be "visit", and make it a deployment variable, so that different deployments (i.e. not Diamond) can reconfigure this as required, to correspond to whatever authentication mechanism they have. In F/E, ideally, hover over "Project" (sessionproject:id) should ideally pop up that cute dropdown in #1010 . If feasible, please scope out. Else launch a modal or something quicker. In the diagram above,
|
Target has assigned projects. Project has list of users. I have to display tuple of target - project (proposal-visit string) in the target list. Do I display them all or only those tuples where logged in user is part of the project? What to do when user is not logged in? In the document (https://docs.google.com/document/d/1lFpN29dK1luz80lwSGi0Rnj1Rqula2_CTRuyWDUBu14) it's mentioned that open proposals have no users and only closed proposals have list of users associated with them => this means that we are going to ignore open proposals? |
Yes, show only target-target_access_string tuples for for the user is authorised. For current targets: provide a list of targets (and dates if available) - stick in this ticket - and we (Frank, Daren) will flush out the target_access_string from ISpyB. |
@Waztom to point @alanbchristie to the bit of the code that creates the projects, so that it can be adjusted to force the code to be added. It's the old loader, and should be fixed there. |
@boriskovar-m2ms reports that ISpyB is returning random subset of proposal/visits - not obvious what. @Waztom to link @alanbchristie up with Karl Levik to troubleshoot. @boriskovar-m2ms to generate a series of request/results in short succession, to pass on to Karl. |
BE is losing the Celery processes that FE is opening. Fact-finding... |
Remaining bugs:
@alanbchristie to confirm if this is a Big Job. |
About Project Membership ... Once a user is given access to a Project can they be removed? If they can then any generated URL, if kept by the user, can potentially be used in the future to access the project (member or not). The only workable solution in such a case is for Squonk to call into Fragalysis in order to check the user's membership of the associated project. And it will need to do this for every API call. This is not practical. <- This has now been deferred to ALC3 issue 1038. |
@phraenquex @alanbchristie First option:URL will be generated by frontend and this URL will be used to access job page in squonk2. URL will look like https://fragalysis.diamond.ac.uk/viewer/react/job/12 where number at the end is the ID of the job in fragalysis (or is it an id of the job_request?). Second option:User will log in into the fragalysis and there will be a button which will show a dialog where user will be able to insert a url to squonk job page (something like https://data-manager-ui.xchem-dev.diamond.ac.uk/data-manager-ui/results/instance/instance-8d9eabf6-18ec-4550-837d-3ae8e246e56f?project=project-2a5a5c58-23c7-4f38-a32a-1b46b6f319e9). Front end will call api endpoint squonk2-job-accessible which will take two parameters where first one is the userid and second one is the url provided by the user. This endpoint will return {accessible: true/false, error: ''} and execute all necessary steps to provide access to actual squonk job. User will be notified about the result and if they were granted access they can use the squonk url to access given job. |
Thanks @boriskovar-m2ms - I don't like option 2 much, because it makes the squonk URL the key entity. |
Option 1 is my preferred route. The Job is the thing that we want to allow other users to access. The B/E will need sufficient information in the request to determine the Squonk Project (where the data files and Job were executed). The Fragalysis Job ID is the simplest piece of information. A new endpoint, presented with the Job identity ( The Squonk URL, currently and still manufactured by the F/E, can then be used to see the Job, and its events (log).
|
@phraenquex OK this is actually option 3 which is the easiest one of the bunch. Basically I will add button 'Request access' to job popup and to each row of the job table which logged in user can press and will be notified about the result. If access is granted then they can press 'Open in Squonk' and they should successfully access the job page in squonk. |
Looks right - but just make both those two actions happen under the single button "Open in squonk". Boris asserts "it sounds easy", famous last words. |
This has been merged and made available in staging. @phraenquex is is correct to assume that all open projects will be attached to |
@alanbchristie that looks wrong. Make it LB18145-1. (@Waztom squawk if you think that's not right either.) |
On deployment, the Once deployed, in a shell in the stack
And...
And then inspect the output to see how you can prepend the 'lb' sequence. Some project titles may already have an 'lb' prefix
Now mark the public projects (there is only one). Here we find and change the
Production projects BEFORE
Production projects AFTER
|
(Pre-populate with sensible defaults
Remove 20 character limit for "Description" field.)
Likely also include speccing out scenarios for squonk access control
The text was updated successfully, but these errors were encountered: