mirror of
https://github.com/project-zot/zot.git
synced 2025-01-27 23:01:43 -05:00
17d1338af1
This change introduces OpenID authn by using providers such as Github, Gitlab, Google and Dex. User sessions are now used for web clients to identify and persist an authenticated users session, thus not requiring every request to use credentials. Another change is apikey feature, users can create/revoke their api keys and use them to authenticate when using cli clients such as skopeo. eg: login: /auth/login?provider=github /auth/login?provider=gitlab and so on logout: /auth/logout redirectURL: /auth/callback/github /auth/callback/gitlab and so on If network policy doesn't allow inbound connections, this callback wont work! for more info read documentation added in this commit. Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro> Signed-off-by: Petu Eusebiu <peusebiu@cisco.com> Co-authored-by: Alex Stan <alexandrustan96@yahoo.ro>
70 lines
1.4 KiB
Go
70 lines
1.4 KiB
Go
package config
|
|
|
|
import (
|
|
"time"
|
|
|
|
"zotregistry.io/zot/pkg/extensions/config/sync"
|
|
)
|
|
|
|
// BaseConfig has params applicable to all extensions.
|
|
type BaseConfig struct {
|
|
Enable *bool `mapstructure:",omitempty"`
|
|
}
|
|
|
|
type ExtensionConfig struct {
|
|
Search *SearchConfig
|
|
Sync *sync.Config
|
|
Metrics *MetricsConfig
|
|
Scrub *ScrubConfig
|
|
Lint *LintConfig
|
|
UI *UIConfig
|
|
Mgmt *MgmtConfig
|
|
APIKey *APIKeyConfig
|
|
}
|
|
|
|
type APIKeyConfig struct {
|
|
BaseConfig `mapstructure:",squash"`
|
|
}
|
|
|
|
type MgmtConfig struct {
|
|
BaseConfig `mapstructure:",squash"`
|
|
}
|
|
|
|
type LintConfig struct {
|
|
BaseConfig `mapstructure:",squash"`
|
|
MandatoryAnnotations []string
|
|
}
|
|
|
|
type SearchConfig struct {
|
|
BaseConfig `mapstructure:",squash"`
|
|
// CVE search
|
|
CVE *CVEConfig
|
|
}
|
|
|
|
type CVEConfig struct {
|
|
UpdateInterval time.Duration // should be 2 hours or more, if not specified default be kept as 24 hours
|
|
Trivy *TrivyConfig
|
|
}
|
|
|
|
type TrivyConfig struct {
|
|
DBRepository string // default is "ghcr.io/aquasecurity/trivy-db"
|
|
JavaDBRepository string // default is "ghcr.io/aquasecurity/trivy-java-db"
|
|
}
|
|
|
|
type MetricsConfig struct {
|
|
BaseConfig `mapstructure:",squash"`
|
|
Prometheus *PrometheusConfig
|
|
}
|
|
|
|
type PrometheusConfig struct {
|
|
Path string // default is "/metrics"
|
|
}
|
|
|
|
type ScrubConfig struct {
|
|
BaseConfig `mapstructure:",squash"`
|
|
Interval time.Duration
|
|
}
|
|
|
|
type UIConfig struct {
|
|
BaseConfig `mapstructure:",squash"`
|
|
}
|