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

Map user/resource privileges to S3 JSON policies and save to CUAHSI MinIO #83

Open
sblack-usu opened this issue Feb 22, 2024 · 0 comments

Comments

@sblack-usu
Copy link
Collaborator

sblack-usu commented Feb 22, 2024

The CUAHSI Subsetter application has a router that maps the resourceaccess documents to json policies along with the ability to save the policies on a S3 server, here. Copy this router to the catalogapi and wire it up to events that get the JSON policies saved to MinIO for the user. Below is a proposal to use Mongo changestream but it could instead be accomplished with an alternate solution.

Listen to the Mongo changestrem for userprivileges collection and map each document that has entries in the minio property to S3 JSON policies and save them to console.minio.cuahsi.io. The catalog uses changestreams already and an example of usage can be found at https://github.com/I-GUIDE/catalogapi/blob/develop/triggers/update_catalog.py#L32

The Minio client needs to be installed and configured with the image. Installation of the client is found here https://github.com/CUAHSI/domain-subsetter/blob/subsetter_argo/app/api/Dockerfile#L10

An minio client alias needs to be setup for the cuahsi server. This is done on the fastapi startup event, https://github.com/CUAHSI/domain-subsetter/blob/subsetter_argo/app/api/subsetter/main.py#L103

#JIRA=CAM-54

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

1 participant