atlas_rb 1.3.9 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf2f8c7f9ef316468a2544efe2f4471c23c547ae36d50b9abfee2efd03db38c8
4
- data.tar.gz: 9da90557d04f84ddad26c05b6c50eab0d9a7378ccf57fbb37ba6b3e7e4355cd4
3
+ metadata.gz: 31c36891a34eef17727397e17017db5eb1acea6cdfae4dfbba76b93e6f32954a
4
+ data.tar.gz: 3871ca6703afa2ecccf780f089b22e8ff6fdcbcdaf5aaafb82e51bbf606e95a1
5
5
  SHA512:
6
- metadata.gz: 640d113ae6693aacb7d7d2a943634561281ebb5324d7db5284429673a48ff1ae9cbedda4d55b058710c497573e4c7c379dee18b08119925c5a0e7e73f7105088
7
- data.tar.gz: 8e7209552ebc5b7b8db138809bd89ef077ac282342c39d483f1c125f68d757c155ff12865f7a1c24bb65040bf287eb13c7ecd81549117cb0cf01d3a1bf58cc79
6
+ metadata.gz: 84f906c748bd98acb961eb403950d98e1c46be9084ae21fde55b949bc1af6f2bc9f72c567c0bb826b854209b75f51d437196d7e7d0b1031d9f2497e132d305f8
7
+ data.tar.gz: bac7488013b6d12db98806447405c27ae52d4fed86608c2fc96f2180cea48a931d0d43b1421b914de3218a742fb5bb53cfa46dc9d59f41ee3a92670571a52aee
data/.version CHANGED
@@ -1 +1 @@
1
- 1.3.9
1
+ 1.4.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Removed — legacy `ATLAS_TOKEN` relay
6
+
7
+ The shared-secret relay (`ATLAS_TOKEN` bearer + `User: NUID` / `On-Behalf-Of`
8
+ headers) has been removed. **Relay-signing is now the only relay path:** set
9
+ `AtlasRb.config.assertion_signing_key` / `assertion_signing_kid` and the
10
+ transport signs a short-lived ES256 assertion (`sub` = acting NUID; acting-as
11
+ rides a signed `obo` claim). `ATLAS_JWT` (BYO-JWT) still takes precedence.
12
+
13
+ With neither a signing key nor `ATLAS_JWT` configured, `connection` /
14
+ `multipart` now raise the new `AtlasRb::ConfigurationError` rather than falling
15
+ back to `ATLAS_TOKEN`. The `ATLAS_TOKEN` environment variable is no longer read.
16
+
17
+ **Migration:** hosts must configure a signing key (Cerberus already does via its
18
+ `atlas_rb` initializer). This is a breaking change for any caller still relying
19
+ on `ATLAS_TOKEN`.
20
+
3
21
  ## 1.3.5
4
22
 
5
23
  ### Added — `Compilation.list(q:)` title filter
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- atlas_rb (1.3.9)
4
+ atlas_rb (1.4.0)
5
5
  faraday (~> 2.7)
6
6
  faraday-follow_redirects (~> 0.3.0)
7
7
  faraday-multipart (~> 1)
data/README.md CHANGED
@@ -30,21 +30,24 @@ Every regular-path request reads these environment variables:
30
30
  | Variable | Purpose |
31
31
  |---------------|---------------------------------------------------------------|
32
32
  | `ATLAS_URL` | Base URL of the Atlas API (e.g. `https://atlas.example.edu`). |
33
- | `ATLAS_TOKEN` | Cerberus-relay bearer token used in the `Authorization` header (relay mode). |
34
33
  | `ATLAS_JWT` | *Optional.* A personal-access JWT minted by Atlas's `POST /nuid`. When set, switches to [BYO-JWT mode](#byo-jwt-mode-standalone-scripts). |
35
34
 
35
+ The default relay path authenticates by **signing** a short-lived assertion (see
36
+ [Relay-signing](#relay-signing-the-default-relay-path)); configure a signing key
37
+ for it. `ATLAS_JWT`, if set, takes precedence.
38
+
36
39
  ```ruby
37
- ENV["ATLAS_URL"] = "https://atlas.example.edu"
38
- ENV["ATLAS_TOKEN"] = "..."
40
+ ENV["ATLAS_URL"] = "https://atlas.example.edu"
41
+ # + a configured signing key (relay) or ENV["ATLAS_JWT"] (BYO-JWT)
39
42
  ```
40
43
 
41
44
  ### Ambient identity (`default_nuid` / `default_on_behalf_of`)
42
45
 
43
46
  Every resource method that talks to Atlas accepts a `nuid:` kwarg (the
44
47
  acting user) and an `on_behalf_of:` kwarg (the user the call is being
45
- made *for*, used by acting-as / view-as flows). Both are forwarded as
46
- `User: NUID <nuid>` and `On-Behalf-Of: NUID <nuid>` headers
47
- respectively.
48
+ made *for*, used by acting-as / view-as flows). On the relay-signing path
49
+ `nuid` is signed into the assertion `sub` and `on_behalf_of` rides as a
50
+ signed `obo` claim.
48
51
 
49
52
  Rather than threading them at every call site, register callables
50
53
  once on app boot and let the gem read them as defaults:
@@ -74,17 +77,17 @@ AtlasRb::Work.find("w-789")
74
77
  AtlasRb::Work.find("w-789", nuid: "X")
75
78
  ```
76
79
 
77
- If neither the call site nor the registered default supplies a value,
78
- no header is sent (legacy bearer-only path preserved).
80
+ On the relay-signing path the acting `nuid` is required (it becomes the
81
+ assertion `sub`): if neither the call site nor the registered `default_nuid`
82
+ supplies one, the transport raises `AtlasRb::ConfigurationError`.
79
83
 
80
84
  ### BYO-JWT mode (standalone scripts)
81
85
 
82
- The relay path above is what a Rails host (Cerberus) uses: a shared
83
- `ATLAS_TOKEN` plus a `User: NUID` header naming the acting person. For
84
- **standalone scripts** — a librarian automating their own workflow — Atlas
85
- also accepts a *personal-access JWT*, minted by Cerberus post-SSO via
86
- `POST /nuid` and handed to the user. Set it as `ATLAS_JWT` and the gem
87
- switches transport modes:
86
+ The relay-signing path above is what a Rails host (Cerberus) uses: a signed
87
+ assertion naming the acting person. For **standalone scripts** — a librarian
88
+ automating their own workflow — Atlas also accepts a *personal-access JWT*,
89
+ minted by Cerberus post-SSO via `POST /nuid` and handed to the user. Set it as
90
+ `ATLAS_JWT` and the gem switches transport modes:
88
91
 
89
92
  ```ruby
90
93
  ENV["ATLAS_URL"] = "https://atlas.example.edu"
@@ -96,7 +99,7 @@ AtlasRb::Work.find("w-789")
96
99
 
97
100
  In BYO-JWT mode:
98
101
 
99
- - The JWT is the bearer, **taking precedence over `ATLAS_TOKEN`**.
102
+ - The JWT is the bearer, **taking precedence over relay-signing**.
100
103
  - **No `User:` header is sent** — the token already encodes the acting
101
104
  user, and any `nuid:` kwarg or `default_nuid` is ignored on this path.
102
105
  - **`On-Behalf-Of` is suppressed** — acting-as is a Cerberus-relay-only
@@ -106,14 +109,12 @@ In BYO-JWT mode:
106
109
  To rotate or revoke, ask Cerberus to regenerate your token (Atlas rotates
107
110
  the user's `jti`, invalidating outstanding tokens — single-token model).
108
111
 
109
- ### Relay-signing mode (the `ATLAS_TOKEN` replacement)
112
+ ### Relay-signing (the default relay path)
110
113
 
111
- The default relay authenticates with the shared `ATLAS_TOKEN` and *asserts* the
112
- acting user via a `User: NUID` header. Relay-signing replaces that with a
113
- **proven** identity: the relay **signs** a short-lived assertion with its own
114
- private key (`iss=cerberus`, `aud=atlas`, `sub` = the acting nuid, ES256), which
115
- Atlas verifies against the matching public key. No shared secret, no asserted
116
- header.
114
+ The relay authenticates with a **proven** identity: it **signs** a short-lived
115
+ assertion with its own private key (`iss=cerberus`, `aud=atlas`, `sub` = the
116
+ acting nuid, ES256), which Atlas verifies against the matching public key. No
117
+ shared secret, no asserted `User:` header identity is the signed `sub`.
117
118
 
118
119
  Configure a signing key (and the `kid` Atlas indexes its public key by) — value
119
120
  or callable, so a Rails host reads it from credentials at request time:
@@ -125,10 +126,8 @@ AtlasRb.configure do |config|
125
126
  end
126
127
  ```
127
128
 
128
- When a signing key is configured, the regular relay (`connection` / `multipart`)
129
- signs instead of sending `ATLAS_TOKEN` + `User:`. Otherwise it behaves exactly as
130
- before — so signing **coexists with `ATLAS_TOKEN` during cutover** (turn it on by
131
- configuring the key; roll back by clearing it).
129
+ With no signing key configured (and no `ATLAS_JWT`), the relay has no credential
130
+ and `connection` / `multipart` raise `AtlasRb::ConfigurationError`.
132
131
 
133
132
  Two things to know:
134
133
 
@@ -136,8 +135,6 @@ Two things to know:
136
135
  with `sub` = the operator and `obo` = the target, inside the signature — so the
137
136
  target can't be forged onto a stolen assertion, and no `On-Behalf-Of` header is
138
137
  sent. Atlas admin-gates the operator and ignores any header obo on this path.
139
- (Requires an Atlas on the signed-obo release; older Atlas would silently ignore
140
- the claim — don't enable signing for acting-as traffic until Atlas is current.)
141
138
  - **`ATLAS_JWT` still wins.** A personal token (BYO-JWT) takes precedence over
142
139
  relay-signing.
143
140
 
@@ -188,7 +185,7 @@ radius and the kind of authentication they need:
188
185
 
189
186
  | Namespace | What it does | Auth | Friction |
190
187
  |----------------------|------------------------------------------------------------------------------------|-----------------------------------------------------|---------------------------------------|
191
- | `AtlasRb::*` | Regular CRUD (find / list / create / update / tombstone / metadata, etc.) | User token (`ATLAS_TOKEN`) + acting user's NUID | None — these are the daily-use paths. |
188
+ | `AtlasRb::*` | Regular CRUD (find / list / create / update / tombstone / metadata, etc.) | Relay-signing (signed assertion, `sub` = acting NUID) | None — these are the daily-use paths. |
192
189
  | `AtlasRb::Admin::*` | Hard delete (`destroy`) and un-tombstone (`restore`) for Work / Collection / Community. | Same as regular — a real operator is acting. | `destroy` requires `confirm: :i_understand`. |
193
190
  | `AtlasRb::System::*` | System-context provisioning (currently just SSO user find-or-create). | System token (`Rails.application.credentials.atlas_system_token`) + `User: NUID 000000000`. | The namespace itself is the marker — there is no way to call these as a non-system principal. |
194
191
 
@@ -446,8 +443,8 @@ string-keyed callers keep working.
446
443
  ```ruby
447
444
  require "atlas_rb"
448
445
 
449
- ENV["ATLAS_URL"] = "https://atlas.example.edu"
450
- ENV["ATLAS_TOKEN"] = "..."
446
+ ENV["ATLAS_URL"] = "https://atlas.example.edu"
447
+ # + a configured signing key (relay) or ENV["ATLAS_JWT"] (BYO-JWT)
451
448
 
452
449
  # 1. Build the org structure (each create can optionally seed MODS metadata).
453
450
  community = AtlasRb::Community.create(nil, "/tmp/community-mods.xml")
@@ -3,15 +3,15 @@
3
3
  module AtlasRb
4
4
  # User-facing identity lookups against the Atlas API.
5
5
  #
6
- # Unlike the resource classes, {Authentication} threads a real NUID into the
7
- # `User` header via {FaradayHelper#connection}'s second positional argument.
8
- # The Atlas server uses that NUID combined with the bearer token from
9
- # `ATLAS_TOKEN` — to resolve the acting user and their group memberships.
6
+ # Unlike the resource classes, {Authentication} threads a real NUID into
7
+ # {FaradayHelper#connection}'s second positional argument. On the relay-signing
8
+ # path that NUID is signed into the assertion `sub`; Atlas resolves the acting
9
+ # user and their group memberships from the proven `sub`.
10
10
  #
11
- # No login round-trip happens here today; the bearer token is assumed to be
12
- # already provisioned out-of-band. The commented-out code in this file
13
- # reflects an older flow where a `/token` endpoint exchanged an NUID for a
14
- # session token.
11
+ # No login round-trip happens here today; auth is assumed to be already
12
+ # provisioned out-of-band (a configured signing key, or `ATLAS_JWT`). The
13
+ # commented-out code in this file reflects an older flow where a `/token`
14
+ # endpoint exchanged an NUID for a session token.
15
15
  class Authentication
16
16
  extend AtlasRb::FaradayHelper
17
17
 
data/lib/atlas_rb/blob.rb CHANGED
@@ -17,9 +17,9 @@ module AtlasRb
17
17
  # Fetch a single Blob's metadata record (not its bytes — see {.content}).
18
18
  #
19
19
  # @param id [String] the Blob ID.
20
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
21
- # `User:` header. Required for cerberus-token requests; legacy bearer
22
- # tokens still resolve without it.
20
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
21
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
22
+ # path it is ignored (identity lives in the token).
23
23
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
24
24
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
25
25
  # omitted.
@@ -43,9 +43,9 @@ module AtlasRb
43
43
  # returned so callers can inspect `Content-Type`, `Content-Length`, etc.
44
44
  #
45
45
  # @param id [String] the Blob ID.
46
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
47
- # `User:` header. Required for cerberus-token requests; legacy bearer
48
- # tokens still resolve without it.
46
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
47
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
48
+ # path it is ignored (identity lives in the token).
49
49
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
50
50
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
51
51
  # omitted.
@@ -82,9 +82,9 @@ module AtlasRb
82
82
  # @param idempotency_key [String, nil] optional UUID. A repeat call with
83
83
  # the same key returns the originally-created Blob instead of creating
84
84
  # a new one. See {AtlasRb::Work.create} for full semantics.
85
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
86
- # `User:` header. Required for cerberus-token requests; legacy bearer
87
- # tokens still resolve without it.
85
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
86
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
87
+ # path it is ignored (identity lives in the token).
88
88
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
89
89
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
90
90
  # omitted.
@@ -114,9 +114,9 @@ module AtlasRb
114
114
  # Delete a Blob (the bytes *and* the metadata record).
115
115
  #
116
116
  # @param id [String] the Blob ID.
117
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
118
- # `User:` header. Required for cerberus-token requests; legacy bearer
119
- # tokens still resolve without it.
117
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
118
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
119
+ # path it is ignored (identity lives in the token).
120
120
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
121
121
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
122
122
  # omitted.
@@ -136,9 +136,9 @@ module AtlasRb
136
136
  #
137
137
  # @param id [String] the Blob ID.
138
138
  # @param blob_path [String] path to the replacement binary on disk.
139
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
140
- # `User:` header. Required for cerberus-token requests; legacy bearer
141
- # tokens still resolve without it.
139
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
140
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
141
+ # path it is ignored (identity lives in the token).
142
142
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
143
143
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
144
144
  # omitted.
@@ -16,9 +16,9 @@ module AtlasRb
16
16
  # Fetch a single Collection by ID.
17
17
  #
18
18
  # @param id [String] the Collection ID.
19
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
20
- # `User:` header. Required for cerberus-token requests; legacy bearer
21
- # tokens still resolve without it.
19
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
20
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
21
+ # path it is ignored (identity lives in the token).
22
22
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
23
23
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
24
24
  # omitted.
@@ -44,9 +44,9 @@ module AtlasRb
44
44
  # @param xml_path [String, nil] optional path to a MODS XML file used to
45
45
  # seed metadata. When given, the Collection is created and immediately
46
46
  # patched with the metadata in the file.
47
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
48
- # `User:` header. Required for cerberus-token requests; legacy bearer
49
- # tokens still resolve without it.
47
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
48
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
49
+ # path it is ignored (identity lives in the token).
50
50
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
51
51
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
52
52
  # omitted.
@@ -77,9 +77,9 @@ module AtlasRb
77
77
  #
78
78
  # @param id [String] the Collection ID to move.
79
79
  # @param new_parent_id [String] the destination Community ID.
80
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
81
- # `User:` header. Required for cerberus-token requests; legacy bearer
82
- # tokens still resolve without it.
80
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
81
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
82
+ # path it is ignored (identity lives in the token).
83
83
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
84
84
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
85
85
  # omitted.
@@ -132,9 +132,9 @@ module AtlasRb
132
132
  # {Resource.find} (or {Work.find}) when a full payload is needed.
133
133
  #
134
134
  # @param id [String] the Collection ID.
135
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
136
- # `User:` header. Required for cerberus-token requests; legacy bearer
137
- # tokens still resolve without it.
135
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
136
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
137
+ # path it is ignored (identity lives in the token).
138
138
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
139
139
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
140
140
  # omitted.
@@ -153,9 +153,9 @@ module AtlasRb
153
153
  #
154
154
  # @param id [String] the Collection ID.
155
155
  # @param xml_path [String] path to a MODS XML file on disk.
156
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
157
- # `User:` header. Required for cerberus-token requests; legacy bearer
158
- # tokens still resolve without it.
156
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
157
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
158
+ # path it is ignored (identity lives in the token).
159
159
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
160
160
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
161
161
  # omitted.
@@ -181,9 +181,9 @@ module AtlasRb
181
181
  #
182
182
  # @param id [String] the Collection ID.
183
183
  # @param values [Hash] field-level metadata updates.
184
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
185
- # `User:` header. Required for cerberus-token requests; legacy bearer
186
- # tokens still resolve without it.
184
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
185
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
186
+ # path it is ignored (identity lives in the token).
187
187
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
188
188
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
189
189
  # omitted.
@@ -208,9 +208,9 @@ module AtlasRb
208
208
  # @param thumbnail [String, nil] IIIF URI for the ~85² thumbnail.
209
209
  # @param thumbnail_2x [String, nil] IIIF URI for the ~170² 2x thumbnail.
210
210
  # @param preview [String, nil] IIIF URI for the ~500w preview image.
211
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
212
- # `User:` header. Required for cerberus-token requests; legacy bearer
213
- # tokens still resolve without it.
211
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
212
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
213
+ # path it is ignored (identity lives in the token).
214
214
  # @return [AtlasRb::Mash] the parsed JSON response.
215
215
  # @raise [AtlasRb::StaleResourceError] if Atlas reports an optimistic-lock
216
216
  # conflict that exhausted its internal retry budget (HTTP 409 with
@@ -236,9 +236,9 @@ module AtlasRb
236
236
  # @param id [String] the Collection ID.
237
237
  # @param kind [String, nil] one of `"json"` (default), `"html"`, or
238
238
  # `"xml"`.
239
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
240
- # `User:` header. Required for cerberus-token requests; legacy bearer
241
- # tokens still resolve without it.
239
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
240
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
241
+ # path it is ignored (identity lives in the token).
242
242
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
243
243
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
244
244
  # omitted.
@@ -17,9 +17,9 @@ module AtlasRb
17
17
  # Fetch a single Community by ID.
18
18
  #
19
19
  # @param id [String] the Community ID.
20
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
21
- # `User:` header. Required for cerberus-token requests; legacy bearer
22
- # tokens still resolve without it.
20
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
21
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
22
+ # path it is ignored (identity lives in the token).
23
23
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
24
24
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
25
25
  # omitted.
@@ -45,9 +45,9 @@ module AtlasRb
45
45
  # @param xml_path [String, nil] optional path to a MODS XML file. When
46
46
  # given, the Community is created and immediately patched with the
47
47
  # metadata in the file; the returned Hash reflects the patched state.
48
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
49
- # `User:` header. Required for cerberus-token requests; legacy bearer
50
- # tokens still resolve without it.
48
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
49
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
50
+ # path it is ignored (identity lives in the token).
51
51
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
52
52
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
53
53
  # omitted.
@@ -84,9 +84,9 @@ module AtlasRb
84
84
  # @param id [String] the Community ID to move.
85
85
  # @param new_parent_id [String, nil] the destination Community ID, or
86
86
  # `nil` to move the Community to the top of the tree.
87
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
88
- # `User:` header. Required for cerberus-token requests; legacy bearer
89
- # tokens still resolve without it.
87
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
88
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
89
+ # path it is ignored (identity lives in the token).
90
90
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
91
91
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
92
92
  # omitted.
@@ -142,9 +142,9 @@ module AtlasRb
142
142
  # needed.
143
143
  #
144
144
  # @param id [String] the parent Community ID.
145
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
146
- # `User:` header. Required for cerberus-token requests; legacy bearer
147
- # tokens still resolve without it.
145
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
146
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
147
+ # path it is ignored (identity lives in the token).
148
148
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
149
149
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
150
150
  # omitted.
@@ -163,9 +163,9 @@ module AtlasRb
163
163
  #
164
164
  # @param id [String] the Community ID.
165
165
  # @param xml_path [String] path to a MODS XML file on disk.
166
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
167
- # `User:` header. Required for cerberus-token requests; legacy bearer
168
- # tokens still resolve without it.
166
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
167
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
168
+ # path it is ignored (identity lives in the token).
169
169
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
170
170
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
171
171
  # omitted.
@@ -192,9 +192,9 @@ module AtlasRb
192
192
  # @param id [String] the Community ID.
193
193
  # @param values [Hash] field-level metadata updates (shape determined by
194
194
  # the Atlas server, typically a mapping from MODS field name to value).
195
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
196
- # `User:` header. Required for cerberus-token requests; legacy bearer
197
- # tokens still resolve without it.
195
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
196
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
197
+ # path it is ignored (identity lives in the token).
198
198
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
199
199
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
200
200
  # omitted.
@@ -219,9 +219,9 @@ module AtlasRb
219
219
  # @param thumbnail [String, nil] IIIF URI for the ~85² thumbnail.
220
220
  # @param thumbnail_2x [String, nil] IIIF URI for the ~170² 2x thumbnail.
221
221
  # @param preview [String, nil] IIIF URI for the ~500w preview image.
222
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
223
- # `User:` header. Required for cerberus-token requests; legacy bearer
224
- # tokens still resolve without it.
222
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
223
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
224
+ # path it is ignored (identity lives in the token).
225
225
  # @return [AtlasRb::Mash] the parsed JSON response.
226
226
  # @raise [AtlasRb::StaleResourceError] if Atlas reports an optimistic-lock
227
227
  # conflict that exhausted its internal retry budget (HTTP 409 with
@@ -248,9 +248,9 @@ module AtlasRb
248
248
  # @param kind [String, nil] one of `"json"` (default when omitted),
249
249
  # `"html"`, or `"xml"`. When `nil`, Atlas returns its default
250
250
  # representation.
251
- # @param nuid [String, nil] optional acting user's NUID, forwarded as the
252
- # `User:` header. Required for cerberus-token requests; legacy bearer
253
- # tokens still resolve without it.
251
+ # @param nuid [String, nil] optional acting user's NUID. On the relay-signing
252
+ # path it is signed into the assertion `sub`; on the BYO-JWT (`ATLAS_JWT`)
253
+ # path it is ignored (identity lives in the token).
254
254
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
255
255
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
256
256
  # omitted.