Skip to content

Limit submissions to users who are members of Globus Group#104

Merged
BenGalewsky merged 6 commits intoprodfrom
dev
Jan 24, 2024
Merged

Limit submissions to users who are members of Globus Group#104
BenGalewsky merged 6 commits intoprodfrom
dev

Conversation

@BenGalewsky
Copy link
Copy Markdown
Contributor

Problem

Only authorized users should be able to submit datasets.

Approach

In the authorizer lambda

  1. Extract the submitting user's groups access token
  2. Use this token to get the list of user's groups
  3. From this response extract a dictionary of Group IDs along with their name and description (name and description really only used for debugging)
  4. Pass this to the submit lambda via a new property in the context dictionary

Then in the submit lambda

  1. Pick up the id for the required group from the lambda's environment var
  2. See if that group id is found in the dictionary passed in from the authorizer

The terraform code was modified to set the REQUIRED_GROUP_MEMBERSHIP environment vars for the lambdas

Comment thread aws/auth.py
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pardon the whitespace changes. Pycharm added a feature to "helpfully" reformat your file when you open it....

@BenGalewsky BenGalewsky requested a review from blaiszik January 23, 2024 15:56
@BenGalewsky BenGalewsky merged commit d896ada into prod Jan 24, 2024
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