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

Change fence integration due to an upgrade in Gen3 #2192

Closed
jecos opened this issue Dec 12, 2019 · 0 comments
Closed

Change fence integration due to an upgrade in Gen3 #2192

jecos opened this issue Dec 12, 2019 · 0 comments
Assignees

Comments

@jecos
Copy link
Member

jecos commented Dec 12, 2019

Objective

We need to adjust the fence workflow because there is some breaking changes in Gen3. Here a message from Gen3 team about this :

The change will be in step 11 of your "Connect Fence" diagram (the portal decodes the JWT token and uses the projects list to display or not some actions). The tokens will no longer contain the projects, you will need to hit Fence's /user endpoint with the token. This endpoint returns:

  • project_access: (project name -> list of permissions) dictionary, in the same format as what used to be in the tokens.
  • authz: (arborist resource name -> list of (permission, service) roles) dictionary, which is basically a dump of what is in Arborist.
  • resources: list of all the resources the user can access, regardless of the method (so it's essentially the keys of the authz dict).
    Using the project_access field would be the least amount of work since it's in the format you already use.
    But the other fields use the names that are stored in arborist, which are the ones that will be in indexd and in your user.yaml, so more consistent (it should be something like /programs/phs000 instead of phs000). I think you are only using the "read-storage" permission (for download) so the resources field should work well for your use case

In other words, instead of decoding the token, the UI need to fetch an endpoint to get the data. If we look to this documentation, we need to adjust these flow (changes in red):

Connect Fence

Fences Flow Chart-Connect fence - UPGRADE

Get token

Fences Flow Chart-Get token

Refresh token

Fences Flow Chart-Refresh Token

Also, don't forget to update the documentation in Confluence

@evans-g-crsj evans-g-crsj self-assigned this Jan 8, 2020
@jecos jecos closed this as completed Jan 16, 2020
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

No branches or pull requests

2 participants