Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2986

Investigate improvement to user permissions endpoint

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Situation: There are several issues surrounding the user-permissions endpoint in Terrain.

      The user-permissions endpoint only allows a user to check permissions on files they own. If a user does not own a file (i.e. if it is a community or shared file), then we cannot use the user-permissions endpoint to determine if the file is public.

      The workaround to the user-permissions endpoint issue above was to use the search endpoint, which returns the user permissions for a file. We use the search endpoint for community/shared data, as they contain data not owned by the user.

      Unfortunately, the CyVerse data store takes a significant amount of time (up to several days) to index new files that have been added or created by a user. This means these new files do not immediately appear in the search endpoint results.

      Altogether, this creates an edge case where a community/shared file that was recently made public may not appear public in the search endpoint results, confusing users and preventing the file from loading correctly in IGB.

      Task: Investigate how to better ascertain whether a file has been made public. Public files are those that have been shared with the user "anonymous". When this occurs the file becomes available through the dav-anon url:

      https://data.cyverse.org/dav-anon/iplant/home/nowlanf/S_SARS-CoV-2_Wuhan-Hu-1_Jan_2020.fa

      An idea would be to avoid using the user-permission and search endpoints to determine if a file has been made public, and instead attempt to see if the file is available through dav-anon. If the server returns 200 the file is public, if not then it is private.

        Attachments

          Issue Links

            Activity

            nfreese Nowlan Freese created issue -
            nfreese Nowlan Freese made changes -
            Field Original Value New Value
            Epic Link IGBF-2376 [ 18533 ]
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            ann.loraine Ann Loraine made changes -
            Sprint Fall 6 2021 Oct 25 - Nov 5 [ 132 ] Fall 7 2021 Nov 8 - Nov 19 [ 133 ]
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            It sounds like the investigation has already been done. What question remains to be investigated?

            Show
            ann.loraine Ann Loraine added a comment - - edited It sounds like the investigation has already been done. What question remains to be investigated?
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            Hide
            karthik Karthik Raveendran added a comment -

            The last sentence in the description seems like a good solution to the issue:
            "An idea would be to avoid using the user-permission and search endpoints to determine if a file has been made public, and instead attempt to see if the file is available through dav-anon. If the server returns 200 the file is public, if not then it is private."

            Show
            karthik Karthik Raveendran added a comment - The last sentence in the description seems like a good solution to the issue: "An idea would be to avoid using the user-permission and search endpoints to determine if a file has been made public, and instead attempt to see if the file is available through dav-anon. If the server returns 200 the file is public, if not then it is private."
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            karthik Karthik Raveendran made changes -
            Assignee Karthik Raveendran [ karthik ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            Hide
            ann.loraine Ann Loraine added a comment -

            The above treatment investigates the issue and proposes a solution. Moving to closed.

            Show
            ann.loraine Ann Loraine added a comment - The above treatment investigates the issue and proposes a solution. Moving to closed.
            ann.loraine Ann Loraine made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            ann.loraine Ann Loraine made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            ann.loraine Ann Loraine made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            ann.loraine Ann Loraine made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            ann.loraine Ann Loraine made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            ann.loraine Ann Loraine made changes -
            Resolution Done [ 10000 ]
            Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]
            nfreese Nowlan Freese made changes -
            Link This issue relates to IGBF-3021 [ IGBF-3021 ]
            Hide
            nfreese Nowlan Freese added a comment - - edited

            I created a new ticket (IGBF-3021) as an implementation ticket.

            However, I think I have identified an issue that would make this potential solution unworkable (see IGBF-3021).

            Show
            nfreese Nowlan Freese added a comment - - edited I created a new ticket ( IGBF-3021 ) as an implementation ticket. However, I think I have identified an issue that would make this potential solution unworkable (see IGBF-3021 ).

              People

              • Assignee:
                ann.loraine Ann Loraine
                Reporter:
                nfreese Nowlan Freese
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: