Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
58318: cloudimpl: fix SHOW BACKUP when AUTH="" for s3 r=miretskiy a=adityamaru

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

Co-authored-by: Aditya Maru <[email protected]>
  • Loading branch information
craig[bot] and adityamaru committed Feb 9, 2021
2 parents 0870e88 + ad9b0c7 commit 2a5aaa6
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 @@ -377,7 +377,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 2a5aaa6

Please sign in to comment.