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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//! The AXIAM management API — CONTRACT.md §27.
//!
//! Every other part of this SDK assumes a populated tenant. [`login`] signs a
//! user in; [`check_access`] asks about a resource; [`webhook`] verifies a
//! delivery signature. None of them can create the user, declare the resource
//! or register the webhook. This module is the part that can: **202 operations
//! across 29 namespaces** (contract 1.62 added `network`), which is the whole server API minus what other
//! contract sections already own and minus organization creation and deletion,
//! which §27.0 keeps deliberately out of reach of a client library.
//!
//! [`login`]: crate::client::AxiamClient::login
//! [`check_access`]: crate::client::AxiamClient::check_access
//! [`webhook`]: crate::webhook
//!
//! # Shape
//!
//! Operations hang off **namespace handles**, not off the client:
//!
//! ```no_run
//! # use axiam_sdk::client::AxiamClient;
//! # use axiam_sdk::management::PageRequest;
//! # async fn demo(client: &AxiamClient) -> Result<(), axiam_sdk::AxiamError> {
//! let users = client.users().list(PageRequest::first(50)).await?;
//! let role = client.roles().get(some_uuid()).await?;
//! # fn some_uuid() -> uuid::Uuid { uuid::Uuid::nil() }
//! # let _ = (users, role);
//! # Ok(())
//! # }
//! ```
//!
//! §27.2 makes that normative rather than stylistic: twenty namespaces have a
//! `list` and fourteen a `get`, so a flat surface would need a disambiguating
//! prefix invented once per operation — and 147 more methods on `AxiamClient`
//! would bury the eight most callers actually want.
//!
//! Acquiring a handle performs no I/O. It borrows the client, so it cannot
//! outlive it, and it cannot be constructed without one — a handle with its
//! own transport would be a second client with none of §3–§9 attached.
//!
//! # What you get for free
//!
//! Every operation here goes through the same request path as [`§1`]'s, so it
//! inherits the CSRF forwarding of §3, the cookie jar of §4, the `X-Tenant-ID`
//! header of §5, the TLS policy of §6, the single-flight refresh of §9, the
//! retry policy of §16 and the telemetry of §19. None of it is reimplemented
//! here, and none of it can be forgotten per-operation.
//!
//! [`§1`]: crate::rest
//!
//! # Four things worth knowing before you call anything
//!
//! **Reads retry; writes do not.** §27.4 rule 8. `certificates().generate()`
//! twice mints two certificates and `service_accounts().rotate_secret()` twice
//! invalidates the secret the first call returned — so no write on this
//! surface is retried, including the ones that look idempotent.
//!
//! **Some `PUT`s replace rather than patch.** Eighteen update bodies are
//! sparse: set the field you mean, leave the rest `None`, and nothing else
//! changes. Eleven are replacements — [`settings().set_org()`], the
//! organization-level email config, the WebAuthn attestation policy, the mTLS
//! trust anchor, the directory configuration, SAML service providers, SSF
//! streams, SCIM targets and the three `network` `PUT`s — where the fields you
//! omit are not preserved. The generated types make the difference visible: a
//! replacement body has required fields and will not compile half-filled.
//!
//! [`settings().set_org()`]: crate::management::ops::settings::Settings::set_org
//!
//! **Seven operations return a secret exactly once.** Creating a service
//! account or an OAuth2 client, generating a certificate, a CA, a signing CA
//! or a PGP key, minting a SCIM token. No later `get` returns that material
//! again — and the `get` projection has no field where it used to be, so
//! nothing tells you it is missing. Store it, or lose it.
//!
//! **404 means "absent, or not yours".** The server answers 404 for a resource
//! in another tenant on purpose: a distinguishable "exists but not yours" lets
//! a caller enumerate another tenant's ids. Both arrive as
//! [`AxiamError::Authz`] with [`AuthzKind::NotFound`], which is what
//! [`AxiamError::is_not_found`](crate::AxiamError::is_not_found) tests.
//!
//! [`AxiamError::Authz`]: crate::AxiamError::Authz
//! [`AuthzKind::NotFound`]: crate::AuthzKind::NotFound
//!
//! # How this module is built
//!
//! `models.rs` and `ops/` are **generated** by `tools/gen_management.py` from
//! the vendored `management-registry.json` — §27.8 requires that, because a
//! hand-maintained table of 147 names is wrong by the next release. Everything
//! else here is written by hand. CI regenerates and diffs.
// `error` (the `ValidationError` a local refusal carries) is pure data and
// builds under any feature set, `--no-default-features --features amqp`
// included; everything that makes a request needs the `rest` transport.
pub
pub
pub
pub use SsfStreamChanges;
pub use ;
pub use ;