From f31dea4bd6a01190472f1c051c873eec0f8a477b Mon Sep 17 00:00:00 2001 From: chenk Date: Mon, 10 Apr 2023 08:26:17 +0300 Subject: [PATCH] feat: auth support oci download server subcommand (#4008) --- docs/docs/references/cli/trivy_server.md | 3 +++ pkg/commands/app.go | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/docs/references/cli/trivy_server.md b/docs/docs/references/cli/trivy_server.md index d29964e3dfca..ed319ceecdd1 100644 --- a/docs/docs/references/cli/trivy_server.md +++ b/docs/docs/references/cli/trivy_server.md @@ -32,15 +32,18 @@ trivy server [flags] --listen string listen address in server mode (default "localhost:4954") --module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules") --no-progress suppress progress bar + --password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons. --redis-ca string redis ca file location, if using redis as cache backend --redis-cert string redis certificate file location, if using redis as cache backend --redis-key string redis key file location, if using redis as cache backend --redis-tls enable redis TLS with public certificates, if using redis as cache backend + --registry-token string registry token --reset remove all caches and database --skip-db-update skip updating vulnerability database --skip-java-db-update skip updating Java index database --token string for authentication in client/server mode --token-header string specify a header name for token in client/server mode (default "Trivy-Token") + --username strings username. Comma-separated usernames allowed. ``` ### Options inherited from parent commands diff --git a/pkg/commands/app.go b/pkg/commands/app.go index 93789060e387..71cfbe923289 100644 --- a/pkg/commands/app.go +++ b/pkg/commands/app.go @@ -518,10 +518,11 @@ func NewClientCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command { func NewServerCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command { serverFlags := &flag.Flags{ - CacheFlagGroup: flag.NewCacheFlagGroup(), - DBFlagGroup: flag.NewDBFlagGroup(), - ModuleFlagGroup: flag.NewModuleFlagGroup(), - RemoteFlagGroup: flag.NewServerFlags(), + CacheFlagGroup: flag.NewCacheFlagGroup(), + DBFlagGroup: flag.NewDBFlagGroup(), + ModuleFlagGroup: flag.NewModuleFlagGroup(), + RemoteFlagGroup: flag.NewServerFlags(), + RegistryFlagGroup: flag.NewRegistryFlagGroup(), } cmd := &cobra.Command{