Skip to content

Commit

Permalink
cloudimpl: fix SHOW BACKUP when AUTH="" for s3
Browse files Browse the repository at this point in the history
When the AUTH param for an s3 URI is left unset, it defaults to
specified. This case was missed when checking if an operation such as
show backup required a user with admin role.

It is important to note that when AUTH is left empty for GS URIs it
defaults to reading from the cluster settings or env variables and so we
consider it implicit authentication.

Fixes: cockroachdb#58190

Release note: None
  • Loading branch information
adityamaru authored and dankinder committed May 5, 2021
1 parent dfe5778 commit fbcd8fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/cloudimpl/external_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func AccessIsWithExplicitAuth(path string) (bool, string, error) {
switch uri.Scheme {
case "s3":
auth := uri.Query().Get(AuthParam)
hasExplicitAuth = auth == AuthParamSpecified
hasExplicitAuth = auth == AuthParamSpecified || auth == ""

// If a custom endpoint has been specified in the S3 URI then this is no
// longer an explicit AUTH.
Expand Down

0 comments on commit fbcd8fc

Please sign in to comment.