Skip to content

Commit 4fa52fd

Browse files
committed
docs: README を GeonicDB サーバー週次アップデートに合わせて更新
1 parent 8eb9584 commit 4fa52fd

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- **Breaking**: `admin tenants update` から `--anonymous-access` / `--no-anonymous-access` フラグを削除 — テナントフィーチャーフラグが廃止され、匿名アクセスは XACML ポリシーで制御 (GeonicDB #752)
1313
- **Breaking**: スコープヘルプから `write:X implies read:X` の記述を削除 — `write:X``read:X` を暗黙的に含まなくなった (GeonicDB #723)
1414
- **Docs**: `admin policies create` のヘルプに `servicePath` リソース属性、priority の説明(大きい数値=高優先度)、デフォルトロールポリシーの説明を追加 (GeonicDB #747, #751, #752)
15+
- **Docs**: README を更新 — `--permissions` オプション、XACML 認可モデル、スコープ包含関係、API キーヘッダ排他仕様を反映
1516

1617
### 2026-03-19
1718
- **Feat**: `admin tenants update``--anonymous-access` / `--no-anonymous-access` オプションを追加 — テナントの匿名アクセス設定を CLI から管理可能に (#76)

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,16 @@ Displays the current authenticated user, token expiry, and active profile.
213213
| `--entity-types <types>` | Allowed entity types (comma-separated) |
214214
| `--rate-limit <n>` | Rate limit (requests per minute) |
215215
| `--dpop-required` | Require DPoP token binding (RFC 9449) |
216+
| `--permissions <perms>` | Permissions for auto-generated XACML policy (comma-separated) |
216217
| `--save` | Save the API key to profile config |
217218

218219
```bash
219220
# Create an API key and save to config
220221
geonic me api-keys create --name my-app --scopes read:entities --save
221222

223+
# Create with permissions (auto-generates XACML policy)
224+
geonic me api-keys create --name my-app --permissions read,write --save
225+
222226
# Create from JSON
223227
geonic me api-keys create '{"name":"my-app","allowedScopes":["read:entities"]}'
224228
```
@@ -392,6 +396,16 @@ Temporal entityOperations query supports: `--aggr-methods`, `--aggr-period`.
392396
| `admin policies activate <id>` | Activate a policy |
393397
| `admin policies deactivate <id>` | Deactivate a policy |
394398

399+
**XACML Authorization Model**: All authorization is unified under XACML policies. Default role policies (priority 0):
400+
401+
| Role | Default Behavior |
402+
|---|---|
403+
| `user` | GET only (read-only) |
404+
| `api_key` | All Deny |
405+
| `anonymous` | All Deny |
406+
407+
Custom policies with higher priority (e.g. 100) override defaults. Target resource attributes include: `path`, `entityType`, `entityId`, `entityOwner`, `tenantService`, `servicePath`. The `servicePath` attribute supports glob patterns (e.g. `/opendata/**`) and regex matching.
408+
395409
#### admin oauth-clients
396410

397411
| Subcommand | Description |
@@ -412,7 +426,9 @@ Temporal entityOperations query supports: `--aggr-methods`, `--aggr-period`.
412426
| `admin api-keys update <keyId> [json]` | Update an API key |
413427
| `admin api-keys delete <keyId>` | Delete an API key |
414428

415-
`admin api-keys list` supports `--tenant-id` to filter by tenant. `admin api-keys create` supports flag options: `--name`, `--scopes`, `--origins`, `--entity-types`, `--rate-limit`, `--dpop-required`, `--tenant-id`, `--save`. `admin api-keys update` supports `--name`, `--scopes`, `--origins`, `--entity-types`, `--rate-limit`, `--dpop-required` / `--no-dpop-required`.
429+
`admin api-keys list` supports `--tenant-id` to filter by tenant. `admin api-keys create` supports flag options: `--name`, `--scopes`, `--origins`, `--entity-types`, `--rate-limit`, `--dpop-required`, `--permissions`, `--tenant-id`, `--save`. `admin api-keys update` supports `--name`, `--scopes`, `--origins`, `--entity-types`, `--rate-limit`, `--dpop-required` / `--no-dpop-required`, `--permissions`.
430+
431+
**Permissions**: The `--permissions` flag accepts a comma-separated list of `read`, `write`, `create`, `update`, `delete`. `write` is an alias for `create` + `update` + `delete`. When specified, XACML policies are auto-generated for the API key (respects `allowedEntityTypes`).
416432

417433
**Note**: `allowedOrigins` must contain at least 1 item when specified. Use `*` to allow all origins. `allowedEntityTypes` is enforced at runtime — API key holders can only access entities of the specified types. `admin api-keys list` / `admin api-keys get` output includes a `dpopRequired` field (boolean).
418434

@@ -560,13 +576,13 @@ geonic entities list --api-key gdb_your_api_key_here
560576
GDB_API_KEY=gdb_your_api_key_here geonic entities list
561577
```
562578

563-
When both a Bearer token and an API key are configured, both headers are sent (the server determines precedence).
579+
When both a Bearer token and an API key are configured, headers are sent exclusively — the API key takes precedence when present.
564580

565581
### Valid Scopes
566582

567583
`read:entities`, `write:entities`, `read:subscriptions`, `write:subscriptions`, `read:registrations`, `write:registrations`, `read:rules`, `write:rules`, `read:custom-data-models`, `write:custom-data-models`, `admin:users`, `admin:tenants`, `admin:policies`, `admin:oauth-clients`, `admin:api-keys`, `admin:metrics`
568584

569-
`write:X` implies `read:X`. `admin:X` implies both `read:X` and `write:X`.
585+
`admin:X` implies both `read:X` and `write:X`. `write:X` does **not** imply `read:X` — specify both explicitly if needed.
570586

571587
Special scopes: `permanent` (no token expiry), `jwt` (JWT format token).
572588

0 commit comments

Comments
 (0)