Hello Databricks Community!
I am trying to figure out the best way to get the data from databricks via REST API (or Python SDK but not preferable) but to do not lose information about users permissions during authentication.
The use case is that server needs to get data (tables content and volumes) from databricks and return it in a json format to the user. Authentication should be done in a way that I can keep the same permissions as given user has.
Here are the ways which I currently found:
- using personal access token (PAT) - it requires user to copy it (and then paste in server configuration) after logging in to the data bricks which I would like to avoid to be completely independent from DBX UI.
- using service principal - the idea which I have is to create SP for each of the users that it has the same set of permissions. Therefore I can create client_secret which might be used with Python SDK.
Questions:
- are there any better way to do this authentication and to keep user permissions?
- do you recommend using Python SDK? It is right now in Beta.
- is there a way to use service principal client_id and client_secret and authenticate through the REST API? (if I do not want to use Python SDK)
Thank you a lot in advance for help!