Skip to main content
phr1
Silver ⭐️
May 23, 2024
Solved

Listing directories to which user has access

Hello,

Is there a way to list all HDFS directories a (human, not Impala, ...) user has access to, using the Ranger API?

Many thanks.

pvishnu
pvishnuAnswer
Gold ⭐️
May 23, 2024

@phr1 You can identify to which resource paths the user was granted access to via Ranger HDFS policies using the following REST API,
# curl -k -u <user> https://<ranger-admin-fqdn>:<port>/service/plugins/policies/service/name/<name>?user=<user>

Refer "GET /plugins/policies/service/name/{name}" in the following documentation ServiceREST API

2 replies

pvishnu
Gold ⭐️
pvishnuAnswer
Gold ⭐️
May 23, 2024

@phr1 You can identify to which resource paths the user was granted access to via Ranger HDFS policies using the following REST API,
# curl -k -u <user> https://<ranger-admin-fqdn>:<port>/service/plugins/policies/service/name/<name>?user=<user>

Refer "GET /plugins/policies/service/name/{name}" in the following documentation ServiceREST API

Translate
phr1
phr1Author
Silver ⭐️
May 23, 2024

Many thanks pvishnu

Translate