1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! The authorization vocabulary the handler speaks to the backend.
//!
//! Authorization is the one aspect of the Delta API that is genuinely
//! server-specific — mangrove has its `Policy`/securable model, lakekeeper its
//! `Authorizer`, and neither wants to import the other's. So this crate does not
//! *decide* anything; it names the operation it is about to perform as a
//! [`DeltaAction`] and asks the backend, via a single
//! [`DeltaBackend::authorize`](crate::backend::DeltaBackend::authorize) hook,
//! whether the caller may proceed.
//!
//! Two properties fall out of routing every operation through one action enum:
//!
//! - **The authz contract is uniform and type-enforced.** Every user-facing
//! operation authorizes before it touches storage, and a new operation cannot
//! be added without giving it a [`DeltaAction`] variant. There is no
//! "some methods self-authorize, some don't" split for an implementor to trip
//! over — the backend's data methods (`resolve_table`, `delete_table`,
//! `vend_*`, …) are pure data access and must **not** re-authorize.
//! - **No server types leak into the crate.** Each variant carries only the
//! crate's own coordinate types, so the backend pattern-matches a
//! [`DeltaAction`] into its own permission/securable model without either side
//! depending on the other.
//!
//! This is also the natural seam for a future Databricks-style GRANTS check: a
//! variant already carries the securable coordinate and the operation, which is
//! exactly what a `(securable_type, securable_fullname, privilege)` lookup needs.
//! Growing that store is a backend concern — the crate is unaffected.
use crate;
use crateDeltaTableType;
/// An operation the handler is about to perform, in the crate's own vocabulary.
///
/// Passed to [`DeltaBackend::authorize`](crate::backend::DeltaBackend::authorize)
/// before the operation runs. Each variant borrows the coordinate it targets;
/// the backend maps it onto its own authorization model.