atlas_rb 1.9.1 → 1.9.2
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 +4 -4
- data/.version +1 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +2 -2
- data/lib/atlas_rb/system/token.rb +11 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 235448544b8690ecf3a941cc259ab5f049442f609766666297c571e336ac3eae
|
|
4
|
+
data.tar.gz: d3dc2e59aab57397176e959eec0a28478d5a15dbc0ebe2be459c775a42ec00ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 786316240b620bed1a107503c2162d0add7979bbc70574a9f0d1b7cbc473e616e28001d8db9abc75edc972c544211207cbd93f1eee93e674f365d2b0cbecc5e0
|
|
7
|
+
data.tar.gz: aa6f59d62916ce00cb59ae8cca4e8e029ff96ff4c1fcb40041a4c4fd27d675dfcf98b7a2a04cca5a6f9876bdec846415196d09499f91ee170abb636964b22d25
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.9.
|
|
1
|
+
1.9.2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.2
|
|
4
|
+
|
|
5
|
+
### Added — `read_only:` on `System::Token.mint`
|
|
6
|
+
|
|
7
|
+
`AtlasRb::System::Token.mint(nuid:, read_only: true)` mints a token Atlas
|
|
8
|
+
structurally restricts to read-shaped actions, independent of what `nuid`
|
|
9
|
+
could otherwise do — the shape to hand to a non-human caller (e.g. an Atlas
|
|
10
|
+
MCP client) that must never be able to mutate the repository. Omitted, mint
|
|
11
|
+
is unchanged (full-privilege, as before).
|
|
12
|
+
|
|
3
13
|
## 1.8.8
|
|
4
14
|
|
|
5
15
|
### Added — type-agnostic current MODS (`Resource.mods`)
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
atlas_rb (1.9.
|
|
4
|
+
atlas_rb (1.9.2)
|
|
5
5
|
faraday (~> 2.7)
|
|
6
6
|
faraday-follow_redirects (~> 0.3.0)
|
|
7
7
|
faraday-multipart (~> 1)
|
|
@@ -25,7 +25,7 @@ GEM
|
|
|
25
25
|
net-http (~> 0.5)
|
|
26
26
|
hashie (5.1.0)
|
|
27
27
|
logger
|
|
28
|
-
json (2.
|
|
28
|
+
json (2.21.1)
|
|
29
29
|
jwt (2.10.3)
|
|
30
30
|
base64
|
|
31
31
|
logger (1.7.0)
|
|
@@ -27,13 +27,21 @@ module AtlasRb
|
|
|
27
27
|
# System-gated. The returned token authenticates as `nuid` in BYO-JWT
|
|
28
28
|
# mode (Atlas resolves identity from the token's `sub`, ignores any
|
|
29
29
|
# `User:` / `On-Behalf-Of` header, and refuses `:system`/`:anonymous`).
|
|
30
|
-
# Full-privilege for that user, 1-week TTL, single-jti
|
|
30
|
+
# Full-privilege for that user, 1-week TTL, single-jti — unless
|
|
31
|
+
# `read_only` is set, in which case Atlas structurally restricts the
|
|
32
|
+
# token to read-shaped actions regardless of what `nuid` could
|
|
33
|
+
# otherwise do. That's the shape to hand to a non-human caller (e.g.
|
|
34
|
+
# an MCP client) that must never be able to mutate the repository.
|
|
31
35
|
#
|
|
32
36
|
# @param nuid [String] the NUID the token will act as.
|
|
37
|
+
# @param read_only [Boolean] mint a token restricted to read-shaped
|
|
38
|
+
# actions only.
|
|
33
39
|
# @return [String, nil] the JWT, or nil when the NUID has no Atlas User
|
|
34
40
|
# row (404) — a clean "no such user" signal for the caller to surface.
|
|
35
|
-
def self.mint(nuid:)
|
|
36
|
-
|
|
41
|
+
def self.mint(nuid:, read_only: false)
|
|
42
|
+
body = { nuid: nuid }
|
|
43
|
+
body[:read_only] = true if read_only
|
|
44
|
+
response = system_connection.post("/nuid", body.to_json)
|
|
37
45
|
return nil if response.status == 404
|
|
38
46
|
|
|
39
47
|
AtlasRb::Mash.new(JSON.parse(response.body))["token"]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: atlas_rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Cliff
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|