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

Check that DBFS doesn't contain anything which is non-standard #96

Open
TheRealJimShady opened this issue Apr 12, 2024 · 4 comments
Open

Comments

@TheRealJimShady
Copy link

Unless I'm mistaken, it would be possible for a privileged user to expand the accessibility of a table managed under UC by writing it to an arbitrary location in DBFS. This could be achieved in the following way;
spark.table("mycatalog.myschema.mydata").write.format("delta").save("dbfs:/users/jonsmith/mydata")
Would it be possible to expand on the DBFS checks to include a comparison between the structure as it is discovered with;

@ramdaskmdb
Copy link
Contributor

We could scan the entire dbfs:/ folder structure and store the number of objects detected per run. This would work well for a cleanish dbfs folder structure. However, if dbfs is used extensively during experimentation for storing objects, checkpoints, uploaded files, hive metastore managed tables, etc, the scanner could take a very long time depending on the number of objects. We could probably limit the scan to n objects. if > n objects then cap it and dont scan further. Increase in number of objects between runs could be flagged.

@TheRealJimShady
Copy link
Author

Thanks for your response, I can see two approaches to implementing this

  1. An exhaustive traversal of DBFS Root storage to build a complete map of the discovered structure which can be compared with that of the approved DBFS structure.
  2. A fail-fast approach which recursively takes each path in DBFS and looks for an equivalent in the approved structure, if it doesn't exist the check exits and reports that there are extraneous paths in DBFS.

It would be possible to implement these as different modes which the user could choose from.
Thoughts?

@ramdaskmdb
Copy link
Contributor

ramdaskmdb commented Apr 22, 2024 via email

@madcole
Copy link

madcole commented May 1, 2024

hi @ramdaskmdb any updates on this? it's still a blocker for the team

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

3 participants