mirror of
https://github.com/safing/portbase
synced 2025-09-04 19:50:18 +00:00
Mark config options as sensitive
This commit is contained in:
parent
1546261fcc
commit
deef6cdafc
3 changed files with 6 additions and 0 deletions
|
@ -65,6 +65,7 @@ func registerConfig() error {
|
||||||
Name: "API Keys",
|
Name: "API Keys",
|
||||||
Key: CfgAPIKeys,
|
Key: CfgAPIKeys,
|
||||||
Description: "Define API keys for priviledged access to the API. Every entry is a separate API key with respective permissions. Format is `<key>?read=<perm>&write=<perm>`. Permissions are `anyone`, `user` and `admin`, and may be omitted.",
|
Description: "Define API keys for priviledged access to the API. Every entry is a separate API key with respective permissions. Format is `<key>?read=<perm>&write=<perm>`. Permissions are `anyone`, `user` and `admin`, and may be omitted.",
|
||||||
|
Sensitive: true,
|
||||||
OptType: config.OptTypeStringArray,
|
OptType: config.OptTypeStringArray,
|
||||||
ExpertiseLevel: config.ExpertiseLevelDeveloper,
|
ExpertiseLevel: config.ExpertiseLevelDeveloper,
|
||||||
ReleaseLevel: config.ReleaseLevelStable,
|
ReleaseLevel: config.ReleaseLevelStable,
|
||||||
|
|
|
@ -190,6 +190,9 @@ type Option struct {
|
||||||
// Help is considered immutable after the option has
|
// Help is considered immutable after the option has
|
||||||
// been created.
|
// been created.
|
||||||
Help string
|
Help string
|
||||||
|
// Sensitive signifies that the configuration values may contain sensitive
|
||||||
|
// content, such as authentication keys.
|
||||||
|
Sensitive bool
|
||||||
// OptType defines the type of the option.
|
// OptType defines the type of the option.
|
||||||
// OptType is considered immutable after the option has
|
// OptType is considered immutable after the option has
|
||||||
// been created.
|
// been created.
|
||||||
|
|
|
@ -41,6 +41,7 @@ func prepConfig() error {
|
||||||
Name: "Metrics Instance Name",
|
Name: "Metrics Instance Name",
|
||||||
Key: CfgOptionInstanceKey,
|
Key: CfgOptionInstanceKey,
|
||||||
Description: "Define the prometheus instance label for exported metrics. Please note that changing the instance name will reset persisted metrics.",
|
Description: "Define the prometheus instance label for exported metrics. Please note that changing the instance name will reset persisted metrics.",
|
||||||
|
Sensitive: true,
|
||||||
OptType: config.OptTypeString,
|
OptType: config.OptTypeString,
|
||||||
ExpertiseLevel: config.ExpertiseLevelExpert,
|
ExpertiseLevel: config.ExpertiseLevelExpert,
|
||||||
ReleaseLevel: config.ReleaseLevelStable,
|
ReleaseLevel: config.ReleaseLevelStable,
|
||||||
|
@ -61,6 +62,7 @@ func prepConfig() error {
|
||||||
Name: "Push Prometheus Metrics",
|
Name: "Push Prometheus Metrics",
|
||||||
Key: CfgOptionPushKey,
|
Key: CfgOptionPushKey,
|
||||||
Description: "Push metrics to this URL in the prometheus format.",
|
Description: "Push metrics to this URL in the prometheus format.",
|
||||||
|
Sensitive: true,
|
||||||
OptType: config.OptTypeString,
|
OptType: config.OptTypeString,
|
||||||
ExpertiseLevel: config.ExpertiseLevelExpert,
|
ExpertiseLevel: config.ExpertiseLevelExpert,
|
||||||
ReleaseLevel: config.ReleaseLevelStable,
|
ReleaseLevel: config.ReleaseLevelStable,
|
||||||
|
|
Loading…
Add table
Reference in a new issue