05 — Credential & Storage Boundary
UC derive quyền logical thành temporary credential và filesystem wrapper chống bypass storage như thế nào.
Câu hỏi
Làm sao Databricks cấp được token/credential để user đọc storage đúng phạm vi, nhưng không để user bypass policy bằng token chung hoặc raw path?
Vì sao câu này quan trọng
Catalog policy chỉ có ý nghĩa nếu storage access cũng bị kiểm soát. Nếu user có thể lấy cluster IAM role hoặc Hadoop credential chung rồi đọc thẳng S3/ADLS/GCS, thì row/table permission ở catalog layer không còn đủ.
Với UC, câu hỏi không chỉ là “ai được SELECT table”, mà là:
SELECT table
-> resolve table/path
-> derive quyền path
-> vend temporary credential
-> bind credential vào filesystem operation
-> chặn raw path/bypass pathBreakdown
1. UC derive quyền path từ quyền logical bằng gì?
Cần trả lời:
UnityCatalogSAMDerivationhoạt động ở tầng nào?PathSAMActionđại diện cho quyền gì?PathPermissionProviderImpltrả lời path permission ra sao?- Table/volume/external location/storage credential được nối thế nào?
2. Temporary credential được vend và cache thế nào?
Cần trả lời:
- UC credential vending call nằm ở client nào?
- Credential có scope theo path/securable/principal/session không?
- Cache credential tránh gọi UC liên tục như thế nào?
- Expiration/refresh diễn ra trước mỗi command hay mỗi filesystem access?
3. Filesystem wrapper enforce boundary ra sao?
Cần trả lời:
CredentialScopeFileSystemkhácCredentialPassthroughFileSystemvàFixedCredentialsFileSystemthế nào?LokiFileSystemwrap những scheme nào?WorkspaceLocalFileSystemkhiếnfile://không còn là local thuần ra sao?UCVolumesFileSystem/PersonalStagingFileSystemnằm ở đâu?
4. Bypass bị chặn ở những tầng nào?
Cần trả lời:
- Hadoop
fs.*.implmapping chặn raw object-store access thế nào? hadoop-safety-jarsshadow class Hadoop nào?FileSystemCallSiteAllowlistchặn local FS/raw FS ra sao?- FUSE
/dbfs,/Volumes,/Workspacecó policy/credential forwarding thế nào? - Python/Py4J/Spark Connect có chặn bypass JVM không?
Evidence trong snapshot
- Reverse docs:
/Users/chimeyrock/ChimeyRock/databricks/reverse/docs/18-storage-filesystem.md/Users/chimeyrock/ChimeyRock/databricks/reverse/docs/19-credentials-passthrough.md/Users/chimeyrock/ChimeyRock/databricks/reverse/docs/17-authz-acl.md
- Artifact/class/config:
UnityCatalogSAMDerivationUnityCatalogSAMDerivationRulePathSAMActionPathPermissionProviderImplCredentialScopeFileSystemCredentialScopeSQLHelperSAMRegistry,UnitySAMRegistryDBRUCSHandleWrapperLokiFileSystemWorkspaceLocalFileSystemCredentialPassthroughFileSystem,FixedCredentialsFileSystemUCVolumesFileSystem,UCVolumesFileSystemFactoryPersonalStagingFileSystemspark/dbconf/hadoop/core-site.xmlhadoop-safety-jars/*FileSystemCallSiteAllowlist
Câu trả lời tạm thời
Databricks không để storage là một raw object-store path. Quyền logical từ UC/SAM được derive thành path permission, credential tạm được vend theo scope, rồi filesystem wrapper dùng credential đó khi access storage. Đồng thời DBR thay fs.*.impl, wrap local/cloud filesystem, dùng FUSE có credential forwarding, và prepend hadoop-safety-jars để chặn bypass qua class Hadoop gốc.
Còn thiếu / cần verify
- Cần đọc sâu credential vending client để biết scope/TTL/cache chính xác.
- Snapshot thiếu control plane UC service nên không thấy policy decision source đầy đủ.
- Cần phân biệt rõ path qua Spark SQL, Hadoop FS API, Python
open(), shell/FUSE.