0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-01-20 22:52:51 -05:00
zot/pkg/cli
Andrei Aaron 77149aa85c
refactor(extensions)!: refactor the extensions URLs and errors (#1636)
BREAKING CHANGE: The functionality provided by the mgmt endpoint has beed redesigned - see details below
BREAKING CHANGE: The API keys endpoint has been moved -  see details below
BREAKING CHANGE: The mgmt extension config has been removed - endpoint is now enabled by having both the search and the ui extensions enabled
BREAKING CHANGE: The API keys configuration has been moved from extensions to http>auth>apikey

mgmt and imagetrust extensions:
- separate the _zot/ext/mgmt into 3 separate endpoints: _zot/ext/auth, _zot/ext/notation, _zot/ext/cosign
- signature verification logic is in a separate `imagetrust` extension
- better hanling or errors in case of signature uploads: logging and error codes (more 400 and less 500 errors)
- add authz on signature uploads (and add a new middleware in common for this purpose)
- remove the mgmt extension configuration - it is now enabled if the UI and the search extensions are enabled

userprefs estension:
- userprefs are enabled if both search and ui extensions are enabled (as opposed to just search)

apikey extension is removed and logic moved into the api folder
- Move apikeys code out of pkg/extensions and into pkg/api
- Remove apikey configuration options from the extensions configuration and move it inside the http auth section
- remove the build label apikeys

other changes:
- move most of the logic adding handlers to the extensions endpoints out of routes.go and into the extensions files.
- add warnings in case the users are still using configurations with the obsolete settings for mgmt and api keys
- add a new function in the extension package which could be a single point of starting backgroud tasks for all extensions
- more clear methods for verifying specific extensions are enabled
- fix http methods paired with the UI handlers
- rebuild swagger docs

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-08-02 21:58:34 +03:00
..
cli.go feat(cli): add referrers and search commands to cli (#1497) 2023-06-22 10:43:01 -07:00
client.go fix: removed duplicate structures from service.go and moved them to pkg/common (#1436) 2023-05-25 11:27:49 -07:00
client_elevated_test.go refactor: Cleanup/simplify testcases in /pkg/cli (#1103) 2023-01-16 21:52:50 -08:00
client_test.go test(refactor): cleanup/simplify testcases (#1124) 2023-01-20 10:01:52 -08:00
client_utils_test.go refactor(artifact): remove oci artifact support (#1359) 2023-05-10 10:15:33 -07:00
config_cmd.go feat(zli): add new subcommand to remove a zli config (#1619) 2023-07-13 09:34:01 -07:00
config_cmd_test.go feat(zli): add new subcommand to remove a zli config (#1619) 2023-07-13 09:34:01 -07:00
config_reloader.go feat: signal handling (#1651) 2023-07-25 10:39:13 -07:00
config_reloader_test.go fix(test): TestConfigReloader, wait for trivy db download (#1543) 2023-07-06 14:17:49 +03:00
cve_cmd.go fix(CVE): attempt to scan now returns early with an error if trivyDB metadata json is missing (#1548) 2023-07-05 09:08:16 -07:00
cve_cmd_test.go test(refactor): change upload image function signature (#1655) 2023-07-28 17:53:46 +03:00
discover.go fix: removed duplicate structures from service.go and moved them to pkg/common (#1436) 2023-05-25 11:27:49 -07:00
extensions_test.go refactor(extensions)!: refactor the extensions URLs and errors (#1636) 2023-08-02 21:58:34 +03:00
image_cmd.go feat(cli): add referrers and search commands to cli (#1497) 2023-06-22 10:43:01 -07:00
image_cmd_test.go refactor(extensions)!: refactor the extensions URLs and errors (#1636) 2023-08-02 21:58:34 +03:00
minimal.go build(tags): remove redundant build tag ui_base (#857) 2022-10-10 15:05:55 +03:00
repo_cmd.go feat(cli): add referrers and search commands to cli (#1497) 2023-06-22 10:43:01 -07:00
root.go refactor(extensions)!: refactor the extensions URLs and errors (#1636) 2023-08-02 21:58:34 +03:00
root_test.go refactor(extensions)!: refactor the extensions URLs and errors (#1636) 2023-08-02 21:58:34 +03:00
search_cmd.go fix(cli): add help message for searching referrers under search command (#1551) 2023-06-23 17:44:30 +03:00
search_cmd_referrers_test.go feat(pagination): move pagination and sorting image summary results after conversion (#1637) 2023-07-31 22:16:09 +03:00
search_cmd_test.go test(refactor): change upload image function signature (#1655) 2023-07-28 17:53:46 +03:00
searcher.go feat(pagination): move pagination and sorting image summary results after conversion (#1637) 2023-07-31 22:16:09 +03:00
service.go fix(cli): make sure all needed ImageSummary properties are requested from the server (#1618) 2023-07-14 09:22:14 +03:00
stress_test.go refactor: Cleanup/simplify testcases in /pkg/cli (#1103) 2023-01-16 21:52:50 -08:00