GDPR Plugin - Project Metadata update
Hi Team,
We have the GDPR plugin installed in our dataiku instance.
We also have a custom project creation macro in place which users use to create their projects.
https://doc.dataiku.com/dss/latest/plugins/reference/project-creation-macros.html
We were trying to see if it was feasible to update the projects GDPR metadata fields during project creation itself.
example :
admin_client = utils.get_admin_dss_client("creation1", user_auth_info) project_ad = admin_client.get_project(project_key) metadata = project_ad.get_metadata() metadata['customFields']['gdpr_forbid_dataset_sharing'] = True
The challenge is that we have given permissions to only users who are part of the administrators group to be able to edit gdpr metadata.
And when we try to use the admin privilege api key derived during project creation to update the metadata it gives a "gdpr policies forbid you to edit metadata" error.
If anyone has tried something similar or has any suggestions on how to resolve this then please do guide.
Best Answer
-
Aymeric Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 15 Partner
Hi !
I am sure you already found a solution, but in case somebody else would try to achieve the same thing, you can indeed take advantage of the temporary admin privileges.admin_client = utils.get_admin_dss_client("creation1", user_auth_info) # get a gdpr admin identity rgpd_admin = admin_client.get_user("gdpr_admin") rgpd_admin_client = rgpd_admin.get_client_as() # back to your script project_ad = rgpd_admin_client .get_project(project_key) metadata = project_ad.get_metadata() metadata['customFields']['gdpr_forbid_dataset_sharing'] = True
There it is !
Best regards,
Moaï
Answers
-
Aymeric Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 15 Partner