detached cfa771f

docs(auth): document the admin scope gordon images push needs (#13)

A push,pull token only works with docker push; gordon images push needs at least one admin scope (admin:apps:read is the smallest).
commit
cfa771fc471edb7a9ada20c5ece9f4cd377f7442
author
brice · · 2026-10-08 07:50 UTC
committer
bnema · · 2026-10-08 07:50 UTC
parent
525f93d
signature
unsigned
4 files · +17 -7
M docs/cli/auth.md +2 -2
@@ -294,8 +294,8 @@ Usage:
294294 ### CI/CD Setup
295295
296296 ```bash
297-# Generate token for CI
298-gordon auth token generate --subject ci-bot --scopes push,pull --expiry 0
297+# Generate token for CI (gordon images push needs one admin scope)
298+gordon auth token generate --subject ci-bot --scopes push,pull,admin:apps:read --expiry 0
299299
300300 # Save token as CI secret
301301 # GitHub: Settings > Secrets > New repository secret
@@ -294,8 +294,8 @@ Usage:
294 ### CI/CD Setup294 ### CI/CD Setup
295 295
296 ```bash296 ```bash
297-# Generate token for CI297+# Generate token for CI (gordon images push needs one admin scope)
298-gordon auth token generate --subject ci-bot --scopes push,pull --expiry 0298+gordon auth token generate --subject ci-bot --scopes push,pull,admin:apps:read --expiry 0
299 299
300 # Save token as CI secret300 # Save token as CI secret
301 # GitHub: Settings > Secrets > New repository secret301 # GitHub: Settings > Secrets > New repository secret
M docs/cli/images.md +4 -1
@@ -87,7 +87,10 @@ When used with `--remote`, gordon images push authenticates in two ways:
8787 - **Admin API** (tag listing for inference): uses `--token` or `$GORDON_TOKEN` as Bearer token
8888 - **Registry push**: automatically exchanges the token for a short-lived (5 min) registry access token via `/auth/token` -- no `docker login` required
8989
90-This means CI/CD pipelines only need a single secret (`GORDON_TOKEN`).
90+This means CI/CD pipelines only need a single secret (`GORDON_TOKEN`). The token
91+needs `push` plus at least one `admin:*` scope, because the admin API rejects
92+tokens without one; `push,pull,admin:apps:read` is the minimum. A `push,pull`
93+token only works with `docker login` and `docker push`.
9194
9295 ### Version Auto-Detection
9396
@@ -87,7 +87,10 @@ When used with `--remote`, gordon images push authenticates in two ways:
87 - **Admin API** (tag listing for inference): uses `--token` or `$GORDON_TOKEN` as Bearer token87 - **Admin API** (tag listing for inference): uses `--token` or `$GORDON_TOKEN` as Bearer token
88 - **Registry push**: automatically exchanges the token for a short-lived (5 min) registry access token via `/auth/token` -- no `docker login` required88 - **Registry push**: automatically exchanges the token for a short-lived (5 min) registry access token via `/auth/token` -- no `docker login` required
89 89
90-This means CI/CD pipelines only need a single secret (`GORDON_TOKEN`).90+This means CI/CD pipelines only need a single secret (`GORDON_TOKEN`). The token
91+needs `push` plus at least one `admin:*` scope, because the admin API rejects
92+tokens without one; `push,pull,admin:apps:read` is the minimum. A `push,pull`
93+token only works with `docker login` and `docker push`.
91 94
92 ### Version Auto-Detection95 ### Version Auto-Detection
93 96
M docs/deployment/generic-ci.md +2 -1
@@ -166,7 +166,8 @@ Use the minimum scopes for the steps the pipeline performs. A repository restric
166166 | Workflow | Required Scopes |
167167 |----------|----------------|
168168 | Build + push, then apply + deploy | `push,pull,admin:apps:read,admin:apps:write` |
169-| Push only (no deploy) | `push,pull` |
169+| `gordon images push` only (no deploy) | `push,pull,admin:apps:read` |
170+| `docker push` only (no deploy) | `push,pull` |
170171 | docker push, then apply + deploy | `push,pull` + `admin:apps:read,admin:apps:write` for the CLI step |
171172
172173 ## Troubleshooting
@@ -166,7 +166,8 @@ Use the minimum scopes for the steps the pipeline performs. A repository restric
166 | Workflow | Required Scopes |166 | Workflow | Required Scopes |
167 |----------|----------------|167 |----------|----------------|
168 | Build + push, then apply + deploy | `push,pull,admin:apps:read,admin:apps:write` |168 | Build + push, then apply + deploy | `push,pull,admin:apps:read,admin:apps:write` |
169-| Push only (no deploy) | `push,pull` |169+| `gordon images push` only (no deploy) | `push,pull,admin:apps:read` |
170+| `docker push` only (no deploy) | `push,pull` |
170 | docker push, then apply + deploy | `push,pull` + `admin:apps:read,admin:apps:write` for the CLI step |171 | docker push, then apply + deploy | `push,pull` + `admin:apps:read,admin:apps:write` for the CLI step |
171 172
172 ## Troubleshooting173 ## Troubleshooting
M docs/deployment/index.md +9 -3
@@ -77,19 +77,25 @@ Clients use the main Gordon domain over HTTPS, normally on port 443. Gordon bind
7777 See the examples below for the right scopes for each workflow.
7878
7979 ```bash
80-# Push only — registry scopes
80+# docker push only — registry scopes
8181 gordon auth token generate \
8282 --subject ci-bot \
8383 --scopes "push,pull" \
8484 --expiry 90d
8585
86+# gordon images push only — the CLI also needs one admin scope
87+gordon auth token generate \
88+ --subject ci-bot \
89+ --scopes "push,pull,admin:apps:read" \
90+ --expiry 90d
91+
8692 # Push + apply/deploy — adds app mutation scopes
8793 gordon auth token generate \
8894 --subject ci-bot \
8995 --scopes "push,pull,admin:apps:read,admin:apps:write" \
9096 --expiry 90d
9197
92-# Repository-scoped registry token for push only
98+# Repository-scoped registry token for docker push only
9399 gordon auth token generate \
94100 --subject ci-bot \
95101 --repo myapp \
@@ -97,7 +103,7 @@ gordon auth token generate \
97103 --expiry 90d
98104 ```
99105
100-Set the generated token as `GORDON_TOKEN` in your CI environment. `--repo` limits registry push/pull to that repository; it does not constrain `admin:*` scopes. Use a separate least-privilege token for app administration when repository and deployment duties must be isolated.
106+Set the generated token as `GORDON_TOKEN` in your CI environment. `gordon images push` calls the admin API before it exchanges the token for registry access, so its token needs at least one `admin:*` scope; `admin:apps:read` is the smallest. `--repo` limits registry push/pull to that repository; it does not constrain `admin:*` scopes. Use a separate least-privilege token for app administration when repository and deployment duties must be isolated.
101107
102108 ## Version Strategies
103109
@@ -77,19 +77,25 @@ Clients use the main Gordon domain over HTTPS, normally on port 443. Gordon bind
77 See the examples below for the right scopes for each workflow.77 See the examples below for the right scopes for each workflow.
78 78
79 ```bash79 ```bash
80-# Push only — registry scopes80+# docker push only — registry scopes
81 gordon auth token generate \81 gordon auth token generate \
82 --subject ci-bot \82 --subject ci-bot \
83 --scopes "push,pull" \83 --scopes "push,pull" \
84 --expiry 90d84 --expiry 90d
85 85
86+# gordon images push only — the CLI also needs one admin scope
87+gordon auth token generate \
88+ --subject ci-bot \
89+ --scopes "push,pull,admin:apps:read" \
90+ --expiry 90d
91+
86 # Push + apply/deploy — adds app mutation scopes92 # Push + apply/deploy — adds app mutation scopes
87 gordon auth token generate \93 gordon auth token generate \
88 --subject ci-bot \94 --subject ci-bot \
89 --scopes "push,pull,admin:apps:read,admin:apps:write" \95 --scopes "push,pull,admin:apps:read,admin:apps:write" \
90 --expiry 90d96 --expiry 90d
91 97
92-# Repository-scoped registry token for push only98+# Repository-scoped registry token for docker push only
93 gordon auth token generate \99 gordon auth token generate \
94 --subject ci-bot \100 --subject ci-bot \
95 --repo myapp \101 --repo myapp \
@@ -97,7 +103,7 @@ gordon auth token generate \
97 --expiry 90d103 --expiry 90d
98 ```104 ```
99 105
100-Set the generated token as `GORDON_TOKEN` in your CI environment. `--repo` limits registry push/pull to that repository; it does not constrain `admin:*` scopes. Use a separate least-privilege token for app administration when repository and deployment duties must be isolated.106+Set the generated token as `GORDON_TOKEN` in your CI environment. `gordon images push` calls the admin API before it exchanges the token for registry access, so its token needs at least one `admin:*` scope; `admin:apps:read` is the smallest. `--repo` limits registry push/pull to that repository; it does not constrain `admin:*` scopes. Use a separate least-privilege token for app administration when repository and deployment duties must be isolated.
101 107
102 ## Version Strategies108 ## Version Strategies
103 109

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close