mirror of
https://github.com/versity/versitygw.git
synced 2026-09-20 06:54:47 +00:00
Merge pull request #1875 from versity/sis/disable-acl-option
feat: configuration option to disable ACLs
This commit is contained in:
@@ -100,6 +100,7 @@ var (
|
||||
webuiNoTLS bool
|
||||
webuiGateways []string
|
||||
webuiAdminGateways []string
|
||||
disableACLs bool
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -341,6 +342,13 @@ func initFlags() []cli.Flag {
|
||||
Destination: &virtualDomain,
|
||||
Aliases: []string{"vd"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "disable-acl",
|
||||
Usage: "disables gateway ACLs, by ignoring all ACL headers",
|
||||
EnvVars: []string{"VGW_DISABLE_ACL"},
|
||||
Destination: &disableACLs,
|
||||
Aliases: []string{"noacl"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "access-log",
|
||||
Usage: "enable server access logging to specified file",
|
||||
@@ -833,6 +841,9 @@ func runGateway(ctx context.Context, be backend.Backend) error {
|
||||
if keepAlive {
|
||||
opts = append(opts, s3api.WithKeepAlive())
|
||||
}
|
||||
if disableACLs {
|
||||
opts = append(opts, s3api.WithDisableACL())
|
||||
}
|
||||
if debug {
|
||||
debuglogger.SetDebugEnabled()
|
||||
}
|
||||
|
||||
@@ -152,6 +152,11 @@ func initTestCommands() []*cli.Command {
|
||||
Usage: "Tests gateway access control with bucket ACLs and Policies",
|
||||
Action: getAction(integration.TestAccessControl),
|
||||
},
|
||||
{
|
||||
Name: "noacl",
|
||||
Usage: "Tests gateway in ACL-disabled mode",
|
||||
Action: getAction(integration.TestNoAclMode),
|
||||
},
|
||||
{
|
||||
Name: "bench",
|
||||
Usage: "Runs download/upload performance test on the gateway",
|
||||
|
||||
Reference in New Issue
Block a user