add admin commands for system, users, gc, audit, security
All checks were successful
CI / Lint & Check (push) Successful in 11s

Phase 6 implementation:
- system: version, auth mode, storage volumes
- gc, gc-run: schedule, history, manual trigger
- users, user-create, user-delete, user-admin, user-passwd
- audit, audit-purge: view and purge audit logs
- cve-allow: manage system CVE allowlist
- scan-all: trigger system-wide vulnerability scan

Helpers: paginated_request(), confirm_action(), format_size()
This commit is contained in:
Username
2026-01-18 19:10:47 +01:00
parent 11f7bb5b7a
commit 969f0a5207
9 changed files with 1198 additions and 45 deletions

View File

@@ -44,10 +44,10 @@ Additional functionality:
- [ ] `labels` command - manage artifact labels
- [ ] `copy` command - copy artifact between repos
- [ ] `gc` command - show garbage collection status
- [x] `gc` command - show garbage collection status
- [ ] `replication` command - list replication rules/executions
- [ ] `quota` command - show project quota usage
- [ ] `audit` command - show audit logs
- [x] `audit` command - show audit logs
- [ ] Partial digest tab completion
## Phase 5: Distribution
@@ -59,11 +59,29 @@ Packaging and distribution:
- [ ] Man page generation
- [ ] Shell completions (bash/zsh/fish)
## Phase 6: Admin (Complete)
Admin capabilities for Harbor system management:
- [x] `system` command - version, auth mode, storage volumes
- [x] `gc` command - schedule, history, manual trigger
- [x] `gc-run` command - trigger GC with dry-run/wait
- [x] `users` command - list users with pagination
- [x] `user-create` command - create local user
- [x] `user-delete` command - delete user
- [x] `user-admin` command - grant/revoke admin privileges
- [x] `user-passwd` command - reset user password
- [x] `audit` command - view audit logs with filters
- [x] `audit-purge` command - purge old audit logs
- [x] `cve-allow` command - manage system CVE allowlist
- [x] `scan-all` command - trigger system-wide vulnerability scan
## Dependencies
```
Phase 1 (done) ──> Phase 2 ─┬─> Phase 3
─> Phase 4 ──> Phase 5
─> Phase 4 ──> Phase 5
└─> Phase 6 (done)
```
Phase 3 and 4 can proceed in parallel after Phase 2.
Phase 3, 4, and 6 can proceed in parallel after Phase 2.