Hi Team, we are facing policies syncing issue in d...
# troubleshoot
b
Hi Team, we are facing policies syncing issue in datahub v0.10.0.6 version. we have recently upgraded from v0.9.2 to v0.10.0.6 and old policies are working and are in sync but new policies created are not getting synced. We have given privilege for all users to View Dataset Usage and View Dataset Profile but still users are unable to view dataset details they are getting code 500 error in the UI. Any kind of help is Appreciated
Screenshot 2023-03-29 at 7.22.58 AM.png
h
@gray-shoe-75895 do you know this issue?
g
You shouldn’t be getting 500 errors - could you post the logs from the frontend container?
b
gms_error.log
@gray-shoe-75895 Above is the error log in GMS POD when we got that 500 error in the UI.
We have enabled METADATA_SERVICE_AUTH_ENABLED to true and REST_API_AUTHORIZATION_ENABLED to true in our GMS. So View Dataset Usage and View Dataset Profile privileges are needed for the user to view the dataset. But policy I created with those privileges are not getting sync with datahub and still user is getting 500 error in UI.
@orange-night-91387 can you help us in this Issue?
o
policy I created with those privileges are not getting sync with datahub
Are you getting an error on policy creation or something here? Without the right permissions with REST_API_AUTHORIZATION_ENABLED you will continue to be blocked so the policy portion is what needs to be fixed.
b
@orange-night-91387 You are right . When I had created my custom policy with View Dataset Usage and View Dataset Profile privileges included for all users. It got successfully created without any error but when we try to access any dataset, Rest API call
<http://localhost:8080/usageStats>
is throwing 401 error. As you can check from the GMS logs. If I assign myself a reader role default provided by datahub which has 3 privileges
view entity page,View Dataset Usage and View Dataset Profile
and try to access any dataset I was able to open without any error. My understanding is We are experiencing this issue only when I use View Dataset Usage and View Dataset Profile privileges in my custom policy its not getting sync with datahub.
o
Interesting, are you able to examine the custom policy in the database and see the updated privileges?
b
Yes @orange-night-91387 I am able to locate the custom policy in the database and was able to see the updated privileges too and status was also active.
Copy code
| urn:li:dataHubPolicy:79a97b11-f96a-4a82-ae69-e46b3709d392 | dataHubPolicyInfo |       0 | {"lastUpdatedTimestamp":1680496662877,"actors":{"groups":[],"resourceOwners":false,"allUsers":true,"allGroups":false,"users":[]},"privileges":["VIEW_DATASET_USAGE","VIEW_DATASET_PROFILE"],"displayName":"all users dataset policy","resources":{"filter":{"criteria":[]},"allResources":false},"description":"","state":"ACTIVE","type":"METADATA"}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | {"registryVersion":"0.0.0.0-dev","runId":"no-run-id-provided","registryName":"unknownRegistry","lastObserved":1680496662879} | 2023-04-03 04:37:42.877000 | urn:li:corpuser:datahub | NULL       |
@orange-night-91387 This issue turned out to be a blocker for us. could you help us to overcome this issue?
@orange-night-91387 Any update on the issue?
@orange-night-91387 is this issue resolved in the latest version?
we are currently on v0.10.0.6 and are still facing the issue
a
There was a fix around this in the latest version: https://github.com/datahub-project/datahub/pull/8234 it's possible this was your issue.