cmd/uplink: ability to opt-out from object key encryption

Option added to `uplink access setup` and `uplink access create`
commands to disable object key encryption.

Related to https://github.com/storj/storj/issues/5678

Change-Id: I4789a94143742ff4b232fd60decc029ad2883c2a
This commit is contained in:
Kaloyan Raev 2022-10-24 16:54:51 +03:00 committed by Storj Robot
parent 7fa1a633aa
commit 2c28a0e599
11 changed files with 83 additions and 46 deletions

View File

@ -25,6 +25,8 @@ type cmdAccessCreate struct {
apiKey string apiKey string
importAs string importAs string
exportTo string exportTo string
unencryptedObjectKeys *bool
} }
func newCmdAccessCreate(ex ulext.External) *cmdAccessCreate { func newCmdAccessCreate(ex ulext.External) *cmdAccessCreate {
@ -42,6 +44,10 @@ func (c *cmdAccessCreate) Setup(params clingy.Parameters) {
c.importAs = params.Flag("import-as", "Import the access as this name", "").(string) c.importAs = params.Flag("import-as", "Import the access as this name", "").(string)
c.exportTo = params.Flag("export-to", "Export the access to this file path", "").(string) c.exportTo = params.Flag("export-to", "Export the access to this file path", "").(string)
c.unencryptedObjectKeys = params.Flag("unencrypted-object-keys", "If set, the created access grant won't encrypt object keys", nil,
clingy.Transform(strconv.ParseBool), clingy.Boolean, clingy.Optional,
).(*bool)
params.Break() params.Break()
c.am.Setup(params, c.ex) c.am.Setup(params, c.ex)
} }
@ -67,6 +73,21 @@ func (c *cmdAccessCreate) Execute(ctx context.Context) (err error) {
} }
} }
unencryptedObjectKeys := false
if c.unencryptedObjectKeys != nil {
unencryptedObjectKeys = *c.unencryptedObjectKeys
} else if !c.passphraseStdin {
answer, err := c.ex.PromptInput(ctx, "Would you like to disable encryption for object keys (allows lexicographical sorting of objects in listings)? (y/N):")
if err != nil {
return errs.Wrap(err)
}
answer = strings.ToLower(answer)
if answer == "y" || answer == "yes" {
unencryptedObjectKeys = true
}
}
var passphrase string var passphrase string
if c.passphraseStdin { if c.passphraseStdin {
stdinData, err := io.ReadAll(clingy.Stdin(ctx)) stdinData, err := io.ReadAll(clingy.Stdin(ctx))
@ -84,7 +105,7 @@ func (c *cmdAccessCreate) Execute(ctx context.Context) (err error) {
return errs.New("Encryption passphrase must be non-empty") return errs.New("Encryption passphrase must be non-empty")
} }
access, err := c.ex.RequestAccess(ctx, c.satelliteAddr, c.apiKey, passphrase) access, err := c.ex.RequestAccess(ctx, c.satelliteAddr, c.apiKey, passphrase, unencryptedObjectKeys)
if err != nil { if err != nil {
return errs.Wrap(err) return errs.Wrap(err)
} }

View File

@ -78,7 +78,18 @@ func (c *cmdAccessSetup) Execute(ctx context.Context) (err error) {
return errs.New("Encryption passphrase cannot be empty.") return errs.New("Encryption passphrase cannot be empty.")
} }
access, err = c.ex.RequestAccess(ctx, satelliteAddr, keyOrGrant, passphrase) unencryptedObjectKeys := false
answer, err := c.ex.PromptInput(ctx, "Would you like to disable encryption for object keys (allows lexicographical sorting of objects in listings)? (y/N):")
if err != nil {
return errs.Wrap(err)
}
answer = strings.ToLower(answer)
if answer == "y" || answer == "yes" {
unencryptedObjectKeys = true
}
access, err = c.ex.RequestAccess(ctx, satelliteAddr, keyOrGrant, passphrase, unencryptedObjectKeys)
if err != nil { if err != nil {
return errs.Wrap(err) return errs.Wrap(err)
} }

View File

@ -16,6 +16,7 @@ import (
"github.com/zeebo/errs" "github.com/zeebo/errs"
"storj.io/uplink" "storj.io/uplink"
"storj.io/uplink/private/access"
) )
func (ex *external) loadAccesses() error { func (ex *external) loadAccesses() error {
@ -155,8 +156,12 @@ func (ex *external) SaveAccessInfo(defaultName string, accesses map[string]strin
return nil return nil
} }
func (ex *external) RequestAccess(ctx context.Context, satelliteAddr, apiKey, passphrase string) (*uplink.Access, error) { func (ex *external) RequestAccess(ctx context.Context, satelliteAddr, apiKey, passphrase string, unencryptedObjectKeys bool) (*uplink.Access, error) {
access, err := uplink.RequestAccessWithPassphrase(ctx, satelliteAddr, apiKey, passphrase) config := uplink.Config{}
if unencryptedObjectKeys {
access.DisableObjectKeyEncryption(&config)
}
access, err := config.RequestAccessWithPassphrase(ctx, satelliteAddr, apiKey, passphrase)
if err != nil { if err != nil {
return nil, errs.Wrap(err) return nil, errs.Wrap(err)
} }

View File

@ -30,7 +30,7 @@ type External interface {
OpenAccess(accessName string) (access *uplink.Access, err error) OpenAccess(accessName string) (access *uplink.Access, err error)
GetAccessInfo(required bool) (string, map[string]string, error) GetAccessInfo(required bool) (string, map[string]string, error)
SaveAccessInfo(defaultName string, accesses map[string]string) error SaveAccessInfo(defaultName string, accesses map[string]string) error
RequestAccess(ctx context.Context, satelliteAddress, apiKey, passphrase string) (*uplink.Access, error) RequestAccess(ctx context.Context, satelliteAddress, apiKey, passphrase string, unencryptedObjectKeys bool) (*uplink.Access, error)
ExportAccess(ctx context.Context, access *uplink.Access, filename string) error ExportAccess(ctx context.Context, access *uplink.Access, filename string) error
ConfigFile() string ConfigFile() string

6
go.mod
View File

@ -32,7 +32,7 @@ require (
github.com/oschwald/maxminddb-golang v1.8.0 github.com/oschwald/maxminddb-golang v1.8.0
github.com/pquerna/otp v1.3.0 github.com/pquerna/otp v1.3.0
github.com/shopspring/decimal v1.2.0 github.com/shopspring/decimal v1.2.0
github.com/spacemonkeygo/monkit/v3 v3.0.19 github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191
github.com/spf13/cobra v1.1.3 github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5 github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1 github.com/spf13/viper v1.7.1
@ -55,11 +55,11 @@ require (
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
gopkg.in/segmentio/analytics-go.v3 v3.1.0 gopkg.in/segmentio/analytics-go.v3 v3.1.0
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
storj.io/common v0.0.0-20230224050842-81c8060f089b storj.io/common v0.0.0-20230317175107-185b0d7f55ba
storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8
storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41 storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41
storj.io/private v0.0.0-20230123202745-d3e63b336444 storj.io/private v0.0.0-20230123202745-d3e63b336444
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4 storj.io/uplink v1.10.1-0.20230314164611-f3794018352b
) )
require ( require (

12
go.sum
View File

@ -495,8 +495,8 @@ github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod
github.com/spacemonkeygo/monkit/v3 v3.0.0-20191108235033-eacca33b3037/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes= github.com/spacemonkeygo/monkit/v3 v3.0.0-20191108235033-eacca33b3037/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes=
github.com/spacemonkeygo/monkit/v3 v3.0.4/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes= github.com/spacemonkeygo/monkit/v3 v3.0.4/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes=
github.com/spacemonkeygo/monkit/v3 v3.0.18/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4= github.com/spacemonkeygo/monkit/v3 v3.0.18/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4=
github.com/spacemonkeygo/monkit/v3 v3.0.19 h1:wqBb9bpD7jXkVi4XwIp8jn1fektaVBQ+cp9SHRXgAdo= github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191 h1:QVUfVxilbPp8fBJ7701LL/WEUjBSiSxbs9LUaCIe5qM=
github.com/spacemonkeygo/monkit/v3 v3.0.19/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4= github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4=
github.com/spacemonkeygo/monotime v0.0.0-20180824235756-e3f48a95f98a/go.mod h1:ul4bvvnCOPZgq8w0nTkSmWVg/hauVpFS97Am1YM1XXo= github.com/spacemonkeygo/monotime v0.0.0-20180824235756-e3f48a95f98a/go.mod h1:ul4bvvnCOPZgq8w0nTkSmWVg/hauVpFS97Am1YM1XXo=
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
@ -959,8 +959,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ= storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ=
storj.io/common v0.0.0-20230224050842-81c8060f089b h1:iitkGcBeH9jduIdA5ZCKD/oD9NnGBOIViuPLr6s3h+Q= storj.io/common v0.0.0-20230317175107-185b0d7f55ba h1:e6EvQd4VlDxPDe16HnCs6cKZZGoXZcLcVtJUvzd4Rao=
storj.io/common v0.0.0-20230224050842-81c8060f089b/go.mod h1:tDgoLthBVcrTPEokBgPdjrn39p/gyNx06j6ehhTSiUg= storj.io/common v0.0.0-20230317175107-185b0d7f55ba/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA=
storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg= storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg=
storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 h1:TVfWJuTTBPT3pNu3b7q0nSg5bFCScMFqiU65MbWBbco= storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 h1:TVfWJuTTBPT3pNu3b7q0nSg5bFCScMFqiU65MbWBbco=
storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4= storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4=
@ -970,5 +970,5 @@ storj.io/picobuf v0.0.1 h1:ekEvxSQCbEjTVIi/qxj2za13SJyfRE37yE30IBkZeT0=
storj.io/picobuf v0.0.1/go.mod h1:7ZTAMs6VesgTHbbhFU79oQ9hDaJ+MD4uoFQZ1P4SEz0= storj.io/picobuf v0.0.1/go.mod h1:7ZTAMs6VesgTHbbhFU79oQ9hDaJ+MD4uoFQZ1P4SEz0=
storj.io/private v0.0.0-20230123202745-d3e63b336444 h1:qwjIC8HoYGH8H5jYWhxPVUqKK2y3lWSnKZiPtWb08GA= storj.io/private v0.0.0-20230123202745-d3e63b336444 h1:qwjIC8HoYGH8H5jYWhxPVUqKK2y3lWSnKZiPtWb08GA=
storj.io/private v0.0.0-20230123202745-d3e63b336444/go.mod h1:hc63X333SVJ3UrOxXpGN4VnwqnmbWgAHln3wYJ8AroI= storj.io/private v0.0.0-20230123202745-d3e63b336444/go.mod h1:hc63X333SVJ3UrOxXpGN4VnwqnmbWgAHln3wYJ8AroI=
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4 h1:pBMjYVgFeOKoatFmaZsIqh+lht4HR2nYhD32ZJiMnf8= storj.io/uplink v1.10.1-0.20230314164611-f3794018352b h1:grIrg8ndd23GS/ucLdG7kkoBnb/hAHV7FGiee02+Vh4=
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4/go.mod h1:xkJ9xXAP3e3UesnKn1NMS57hLfH/ctZ2HHf2IP3ov1o= storj.io/uplink v1.10.1-0.20230314164611-f3794018352b/go.mod h1:jz/Jx5F/tT7xzYU5M1muTtmPDl5RT/T1XLg3hYzFCsg=

View File

@ -9,11 +9,11 @@ require (
github.com/zeebo/errs v1.3.0 github.com/zeebo/errs v1.3.0
go.uber.org/zap v1.21.0 go.uber.org/zap v1.21.0
golang.org/x/sync v0.1.0 golang.org/x/sync v0.1.0
storj.io/common v0.0.0-20230224050842-81c8060f089b storj.io/common v0.0.0-20230317175107-185b0d7f55ba
storj.io/private v0.0.0-20230123202745-d3e63b336444 storj.io/private v0.0.0-20230123202745-d3e63b336444
storj.io/storj v1.63.1 storj.io/storj v1.63.1
storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0 storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4 storj.io/uplink v1.10.1-0.20230314164611-f3794018352b
) )
require ( require (
@ -107,7 +107,7 @@ require (
github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 // indirect github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/shopspring/decimal v1.2.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect
github.com/spacemonkeygo/monkit/v3 v3.0.19 // indirect github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191 // indirect
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
github.com/spf13/cobra v1.1.3 // indirect github.com/spf13/cobra v1.1.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect

View File

@ -699,8 +699,8 @@ github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod
github.com/spacemonkeygo/monkit/v3 v3.0.0-20191108235033-eacca33b3037/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes= github.com/spacemonkeygo/monkit/v3 v3.0.0-20191108235033-eacca33b3037/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes=
github.com/spacemonkeygo/monkit/v3 v3.0.4/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes= github.com/spacemonkeygo/monkit/v3 v3.0.4/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes=
github.com/spacemonkeygo/monkit/v3 v3.0.18/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4= github.com/spacemonkeygo/monkit/v3 v3.0.18/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4=
github.com/spacemonkeygo/monkit/v3 v3.0.19 h1:wqBb9bpD7jXkVi4XwIp8jn1fektaVBQ+cp9SHRXgAdo= github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191 h1:QVUfVxilbPp8fBJ7701LL/WEUjBSiSxbs9LUaCIe5qM=
github.com/spacemonkeygo/monkit/v3 v3.0.19/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4= github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4=
github.com/spacemonkeygo/monotime v0.0.0-20180824235756-e3f48a95f98a/go.mod h1:ul4bvvnCOPZgq8w0nTkSmWVg/hauVpFS97Am1YM1XXo= github.com/spacemonkeygo/monotime v0.0.0-20180824235756-e3f48a95f98a/go.mod h1:ul4bvvnCOPZgq8w0nTkSmWVg/hauVpFS97Am1YM1XXo=
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
@ -1217,8 +1217,8 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ= storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ=
storj.io/common v0.0.0-20230224050842-81c8060f089b h1:iitkGcBeH9jduIdA5ZCKD/oD9NnGBOIViuPLr6s3h+Q= storj.io/common v0.0.0-20230317175107-185b0d7f55ba h1:e6EvQd4VlDxPDe16HnCs6cKZZGoXZcLcVtJUvzd4Rao=
storj.io/common v0.0.0-20230224050842-81c8060f089b/go.mod h1:tDgoLthBVcrTPEokBgPdjrn39p/gyNx06j6ehhTSiUg= storj.io/common v0.0.0-20230317175107-185b0d7f55ba/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA=
storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg= storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg=
storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 h1:TVfWJuTTBPT3pNu3b7q0nSg5bFCScMFqiU65MbWBbco= storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 h1:TVfWJuTTBPT3pNu3b7q0nSg5bFCScMFqiU65MbWBbco=
storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4= storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4=
@ -1230,5 +1230,5 @@ storj.io/private v0.0.0-20230123202745-d3e63b336444 h1:qwjIC8HoYGH8H5jYWhxPVUqKK
storj.io/private v0.0.0-20230123202745-d3e63b336444/go.mod h1:hc63X333SVJ3UrOxXpGN4VnwqnmbWgAHln3wYJ8AroI= storj.io/private v0.0.0-20230123202745-d3e63b336444/go.mod h1:hc63X333SVJ3UrOxXpGN4VnwqnmbWgAHln3wYJ8AroI=
storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0 h1:pSfGf9E9OlUd17W7LSpL4tTONIyFji6dz8I2iTDd8BY= storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0 h1:pSfGf9E9OlUd17W7LSpL4tTONIyFji6dz8I2iTDd8BY=
storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0/go.mod h1:5nLgAOl1KTDVyqORAhvrp+167PtShEuS1L3pJgXPjwo= storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0/go.mod h1:5nLgAOl1KTDVyqORAhvrp+167PtShEuS1L3pJgXPjwo=
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4 h1:pBMjYVgFeOKoatFmaZsIqh+lht4HR2nYhD32ZJiMnf8= storj.io/uplink v1.10.1-0.20230314164611-f3794018352b h1:grIrg8ndd23GS/ucLdG7kkoBnb/hAHV7FGiee02+Vh4=
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4/go.mod h1:xkJ9xXAP3e3UesnKn1NMS57hLfH/ctZ2HHf2IP3ov1o= storj.io/uplink v1.10.1-0.20230314164611-f3794018352b/go.mod h1:jz/Jx5F/tT7xzYU5M1muTtmPDl5RT/T1XLg3hYzFCsg=

View File

@ -6,13 +6,13 @@ replace storj.io/storj => ../../
require ( require (
github.com/go-rod/rod v0.101.8 github.com/go-rod/rod v0.101.8
github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20221026154455-f053d3fae32c github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191
github.com/spf13/pflag v1.0.5 github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.0 github.com/stretchr/testify v1.8.0
go.uber.org/zap v1.23.0 go.uber.org/zap v1.23.0
storj.io/common v0.0.0-20230224050842-81c8060f089b storj.io/common v0.0.0-20230317175107-185b0d7f55ba
storj.io/gateway-mt v1.46.0 storj.io/gateway-mt v1.49.0
storj.io/private v0.0.0-20230123202745-d3e63b336444 storj.io/private v0.0.0-20230217131736-be584dbddd08
storj.io/storj v0.12.1-0.20221125175451-ef4b564b82f7 storj.io/storj v0.12.1-0.20221125175451-ef4b564b82f7
) )
@ -42,7 +42,7 @@ require (
github.com/cheggaaa/pb v1.0.29 // indirect github.com/cheggaaa/pb v1.0.29 // indirect
github.com/cloudfoundry/gosigar v1.1.0 // indirect github.com/cloudfoundry/gosigar v1.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dchest/siphash v1.2.1 // indirect github.com/dchest/siphash v1.2.3 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/djherbis/atime v1.0.0 // indirect github.com/djherbis/atime v1.0.0 // indirect
@ -216,9 +216,9 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 // indirect storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 // indirect
storj.io/gateway v1.8.4-0.20230118210906-ad9333efd516 // indirect storj.io/gateway v1.8.4-0.20230306203023-8b133c0994f0 // indirect
storj.io/minio v0.0.0-20230118205046-c025fcc9eef3 // indirect storj.io/minio v0.0.0-20230118205046-c025fcc9eef3 // indirect
storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41 // indirect storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41 // indirect
storj.io/picobuf v0.0.1 // indirect storj.io/picobuf v0.0.1 // indirect
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4 // indirect storj.io/uplink v1.10.1-0.20230314164611-f3794018352b // indirect
) )

View File

@ -328,8 +328,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4= github.com/dchest/siphash v1.2.3 h1:QXwFc8cFOR2dSa/gE6o/HokBMWtLUaNDVd+22aKHeEA=
github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= github.com/dchest/siphash v1.2.3/go.mod h1:0NvQU092bT0ipiFN++/rXm69QG9tVxLAlQHIXMPAkHc=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA=
@ -1038,8 +1038,8 @@ github.com/spacemonkeygo/errors v0.0.0-20201030155909-2f5f890dbc62 h1:X5+jSi+pL+
github.com/spacemonkeygo/monkit/v3 v3.0.0-20191108235033-eacca33b3037/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes= github.com/spacemonkeygo/monkit/v3 v3.0.0-20191108235033-eacca33b3037/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes=
github.com/spacemonkeygo/monkit/v3 v3.0.4/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes= github.com/spacemonkeygo/monkit/v3 v3.0.4/go.mod h1:JcK1pCbReQsOsMKF/POFSZCq7drXFybgGmbc27tuwes=
github.com/spacemonkeygo/monkit/v3 v3.0.18/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4= github.com/spacemonkeygo/monkit/v3 v3.0.18/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4=
github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20221026154455-f053d3fae32c h1:QaUPfV2qfZxtku9uj2kbrk/qIqE6Plkyx3U6j4Qh9HI= github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191 h1:QVUfVxilbPp8fBJ7701LL/WEUjBSiSxbs9LUaCIe5qM=
github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20221026154455-f053d3fae32c/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4= github.com/spacemonkeygo/monkit/v3 v3.0.20-0.20230227152157-d00b379de191/go.mod h1:kj1ViJhlyADa7DiA4xVnTuPA46lFKbM7mxQTrXCuJP4=
github.com/spacemonkeygo/monotime v0.0.0-20180824235756-e3f48a95f98a/go.mod h1:ul4bvvnCOPZgq8w0nTkSmWVg/hauVpFS97Am1YM1XXo= github.com/spacemonkeygo/monotime v0.0.0-20180824235756-e3f48a95f98a/go.mod h1:ul4bvvnCOPZgq8w0nTkSmWVg/hauVpFS97Am1YM1XXo=
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
@ -1921,24 +1921,24 @@ sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ= storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ=
storj.io/common v0.0.0-20230224050842-81c8060f089b h1:iitkGcBeH9jduIdA5ZCKD/oD9NnGBOIViuPLr6s3h+Q= storj.io/common v0.0.0-20230317175107-185b0d7f55ba h1:e6EvQd4VlDxPDe16HnCs6cKZZGoXZcLcVtJUvzd4Rao=
storj.io/common v0.0.0-20230224050842-81c8060f089b/go.mod h1:tDgoLthBVcrTPEokBgPdjrn39p/gyNx06j6ehhTSiUg= storj.io/common v0.0.0-20230317175107-185b0d7f55ba/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA=
storj.io/dotworld v0.0.0-20210324183515-0d11aeccd840 h1:oqMwoF6vaOrCe92SKRyr8cc2WSjLYAd8fjpAHA7rNqY= storj.io/dotworld v0.0.0-20210324183515-0d11aeccd840 h1:oqMwoF6vaOrCe92SKRyr8cc2WSjLYAd8fjpAHA7rNqY=
storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg= storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg=
storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 h1:TVfWJuTTBPT3pNu3b7q0nSg5bFCScMFqiU65MbWBbco= storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8 h1:TVfWJuTTBPT3pNu3b7q0nSg5bFCScMFqiU65MbWBbco=
storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4= storj.io/drpc v0.0.33-0.20230224050324-1fd05d3459f8/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4=
storj.io/gateway v1.8.4-0.20230118210906-ad9333efd516 h1:UUFgi/GHPSESM7cCHTiqypKJWODMMm2X7+0ZJxsLRcg= storj.io/gateway v1.8.4-0.20230306203023-8b133c0994f0 h1:OIg2UT9OnaYWAKHuEzw5qTgp3bTlCuQ/PMhi8kVi3zA=
storj.io/gateway v1.8.4-0.20230118210906-ad9333efd516/go.mod h1:9yQhV0Rs8Q6cCGXb6ax+T4QDPXhw8GTJjRR2zXaoWAk= storj.io/gateway v1.8.4-0.20230306203023-8b133c0994f0/go.mod h1:FPMhOUqTJgqi+FFY2pmUZkBeAt7QzQa16gVAE7NawEc=
storj.io/gateway-mt v1.46.0 h1:wV3P8NdL/wQKqfbAXMqzH5wLfTXAeAXuult7lKuSzoE= storj.io/gateway-mt v1.49.0 h1:x96aKPj5Qx5TRMjgtg0BLolmhUtb5gGFHuriOyafs80=
storj.io/gateway-mt v1.46.0/go.mod h1:h9LOJXYeUDGnUYEPNveGL7iqdKAfNozjFnt+Ca548wY= storj.io/gateway-mt v1.49.0/go.mod h1:SsspEVzdk2LZIpsDCw3YjjfbcO1MdEba9yy2Z3HAd64=
storj.io/minio v0.0.0-20230118205046-c025fcc9eef3 h1:FT3ChvMha2DIwCQE49Pbkj+k+oQ2o6UfL0Omt/uyis0= storj.io/minio v0.0.0-20230118205046-c025fcc9eef3 h1:FT3ChvMha2DIwCQE49Pbkj+k+oQ2o6UfL0Omt/uyis0=
storj.io/minio v0.0.0-20230118205046-c025fcc9eef3/go.mod h1:3knaZE6oHV2TQA/H2hQ00llsP3cJixUALYznzkP3enY= storj.io/minio v0.0.0-20230118205046-c025fcc9eef3/go.mod h1:3knaZE6oHV2TQA/H2hQ00llsP3cJixUALYznzkP3enY=
storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41 h1:SVuEocEhZfFc13J1AmlVLitdGXTVrvmbzN4Z9C9Ms40= storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41 h1:SVuEocEhZfFc13J1AmlVLitdGXTVrvmbzN4Z9C9Ms40=
storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41/go.mod h1:iK+dmHZZXQlW7ahKdNSOo+raMk5BDL2wbD62FIeXLWs= storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41/go.mod h1:iK+dmHZZXQlW7ahKdNSOo+raMk5BDL2wbD62FIeXLWs=
storj.io/picobuf v0.0.1 h1:ekEvxSQCbEjTVIi/qxj2za13SJyfRE37yE30IBkZeT0= storj.io/picobuf v0.0.1 h1:ekEvxSQCbEjTVIi/qxj2za13SJyfRE37yE30IBkZeT0=
storj.io/picobuf v0.0.1/go.mod h1:7ZTAMs6VesgTHbbhFU79oQ9hDaJ+MD4uoFQZ1P4SEz0= storj.io/picobuf v0.0.1/go.mod h1:7ZTAMs6VesgTHbbhFU79oQ9hDaJ+MD4uoFQZ1P4SEz0=
storj.io/private v0.0.0-20230123202745-d3e63b336444 h1:qwjIC8HoYGH8H5jYWhxPVUqKK2y3lWSnKZiPtWb08GA= storj.io/private v0.0.0-20230217131736-be584dbddd08 h1:C/eUqVTqkviMgfBHmYrXs9Q+yHGbzgvq10sZ5NYLvZA=
storj.io/private v0.0.0-20230123202745-d3e63b336444/go.mod h1:hc63X333SVJ3UrOxXpGN4VnwqnmbWgAHln3wYJ8AroI= storj.io/private v0.0.0-20230217131736-be584dbddd08/go.mod h1:hc63X333SVJ3UrOxXpGN4VnwqnmbWgAHln3wYJ8AroI=
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4 h1:pBMjYVgFeOKoatFmaZsIqh+lht4HR2nYhD32ZJiMnf8= storj.io/uplink v1.10.1-0.20230314164611-f3794018352b h1:grIrg8ndd23GS/ucLdG7kkoBnb/hAHV7FGiee02+Vh4=
storj.io/uplink v1.10.1-0.20230224190621-ce85aec713d4/go.mod h1:xkJ9xXAP3e3UesnKn1NMS57hLfH/ctZ2HHf2IP3ov1o= storj.io/uplink v1.10.1-0.20230314164611-f3794018352b/go.mod h1:jz/Jx5F/tT7xzYU5M1muTtmPDl5RT/T1XLg3hYzFCsg=
storj.io/zipper v0.0.0-20220124122551-2ac2d53a46f6 h1:vJQmb+uAiYn8hVfkhMl6OqjnUyMWSCPnkzW8IsjF8vE= storj.io/zipper v0.0.0-20220124122551-2ac2d53a46f6 h1:vJQmb+uAiYn8hVfkhMl6OqjnUyMWSCPnkzW8IsjF8vE=

View File

@ -94,7 +94,7 @@ func Edge(t *testing.T, test EdgeTest) {
authClient := authclient.New(gwConfig.Auth) authClient := authclient.New(gwConfig.Auth)
gateway, err := server.New(gwConfig, planet.Log().Named("gateway"), gateway, err := server.New(gwConfig, planet.Log().Named("gateway"),
trustedip.NewListTrustAll(), []string{}, authClient, []string{}, 16) trustedip.NewListTrustAll(), []string{}, authClient, 16)
require.NoError(t, err) require.NoError(t, err)
defer ctx.Check(gateway.Close) defer ctx.Check(gateway.Close)
@ -103,7 +103,7 @@ func Edge(t *testing.T, test EdgeTest) {
authConfig := auth.Config{ authConfig := auth.Config{
Endpoint: "http://" + gateway.Address(), Endpoint: "http://" + gateway.Address(),
AuthToken: "super-secret", AuthToken: []string{"super-secret"},
KVBackend: "memory://", KVBackend: "memory://",
ListenAddr: authSvcAddr, ListenAddr: authSvcAddr,
ListenAddrTLS: authSvcAddrTLS, ListenAddrTLS: authSvcAddrTLS,