forked from TrueCloudLab/frostfs-s3-gw
[#259] Support contract based policies
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
be6a37ada5
commit
9272f4e108
18 changed files with 428 additions and 43 deletions
|
@ -108,6 +108,8 @@ const ( // Settings.
|
|||
cfgAccessBoxCacheSize = "cache.accessbox.size"
|
||||
cfgAccessControlCacheLifetime = "cache.accesscontrol.lifetime"
|
||||
cfgAccessControlCacheSize = "cache.accesscontrol.size"
|
||||
cfgMorphPolicyCacheLifetime = "cache.morph_policy.lifetime"
|
||||
cfgMorphPolicyCacheSize = "cache.morph_policy.size"
|
||||
|
||||
// NATS.
|
||||
cfgEnableNATS = "nats.enabled"
|
||||
|
@ -207,6 +209,10 @@ const ( // Settings.
|
|||
cfgFrostfsIDEnabled = "frostfsid.enabled"
|
||||
cfgFrostfsIDContract = "frostfsid.contract"
|
||||
|
||||
// Policy.
|
||||
cfgPolicyEnabled = "policy.enabled"
|
||||
cfgPolicyContract = "policy.contract"
|
||||
|
||||
// envPrefix is an environment variables prefix used for configuration.
|
||||
envPrefix = "S3_GW"
|
||||
)
|
||||
|
@ -689,6 +695,10 @@ func newSettings() *viper.Viper {
|
|||
v.SetDefault(cfgFrostfsIDContract, "frostfsid.frostfs")
|
||||
v.SetDefault(cfgFrostfsIDEnabled, true)
|
||||
|
||||
// policy
|
||||
v.SetDefault(cfgPolicyContract, "policy.frostfs")
|
||||
v.SetDefault(cfgPolicyEnabled, true)
|
||||
|
||||
// resolve
|
||||
v.SetDefault(cfgResolveNamespaceHeader, defaultNamespaceHeader)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue