storj/cmd/storagenode
Clement Sam 7e5025cac0 {storagenode,multinode/nodes}: use multinodeauth.Secret instead of []byte for APISecret
When enconding structs into JSON, byte slices are marshalled as base64
encoded string using the base64.StdEncoding.Encode():
ea9c3fd42d/src/encoding/json/encode.go (L833-L861)

We, however, expect API Secrets to be encoded as base64URL, so when
an marshalled secret (with byte slice type) is added to the multinode
dashboard, it fails with `illegal base64 data at input byte XX`.

This change changes the type of APISecret field in the
multinode/nodes.Nodes struct to use multinodeauth.Secret type instead
of []byte.
multinodeauth.Secret is extended with custom MarshalJSON and
UnmarshalJSON methods which implement the json.Marshaler and
json.Unmarshaler interfaces, respectively.

Resolves https://github.com/storj/storj/issues/4949

Change-Id: Ib14b5f49ceaac109620c25d7ff83be865c698343
2022-08-23 11:04:04 +00:00
..
docker cmd/storagenode: make supervisor HTTP Server configurable 2022-05-16 20:06:24 +00:00
docker-base cmd/storagenode: make supervisor HTTP Server configurable 2022-05-16 20:06:24 +00:00
dashboard.go storagenode/internalpb: move inspector.proto 2020-10-30 14:51:26 +02:00
deprecated.go storagenode/{monitor,pieces}, storage/filestore: add loop to check storage directory writability 2020-08-31 21:20:49 +00:00
Dockerfile cmd/storagenode: make supervisor HTTP Server configurable 2022-05-16 20:06:24 +00:00
Dockerfile.base cmd/storagenode: use Debian as base image instead of alpine 2022-03-25 08:19:20 +00:00
gracefulexit_test.go cmd/storagenode: add check if satellites available to gracefulexit 2020-06-10 13:38:36 +00:00
gracefulexit.go storagenode/internalpb: move gracefulexit.proto 2020-10-30 15:24:56 +02:00
main_test.go cmd/storagenode: enable migration of configs of different types (#3189) 2019-10-08 14:26:53 -04:00
main.go {storagenode,multinode/nodes}: use multinodeauth.Secret instead of []byte for APISecret 2022-08-23 11:04:04 +00:00
service_nonwindows.go ci: Golangci lint v1.43.0 changes (#4307) 2021-12-09 20:49:48 +01:00
service_windows.go all: fix linting issues 2022-03-21 15:26:42 +00:00
storagenode.yaml all: fix comments about grpc 2020-05-11 13:05:34 +03:00