storj/cmd
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
..
certificates all: fix error naming 2021-04-29 15:38:21 +03:00
connect-test deps: upgrade storj.io/common 2022-02-16 18:59:19 +00:00
crashcollect crashcollect: process for receiving panics 2021-04-27 18:57:47 +03:00
identity ci: fix lint errors 2021-05-17 13:37:31 +00:00
inspector satellite: remove irreparabledb leftovers from code 2021-06-22 11:26:17 +00:00
internal/wizard cmd/internal/asset: delete unused code 2021-05-20 18:30:19 +03:00
metabase-orphaned-segments metabase: use predefined snapshot for unit tests avoid migration 2022-06-01 12:07:00 +00:00
metabase-verify cmd,private,satellite: add application_name to metabase connections 2022-02-20 22:29:41 +01:00
metric-receiver cmd/metric-receiver: restore minimal metrics server 2020-10-14 20:01:29 +03:00
multinode {storagenode,multinode/nodes}: use multinodeauth.Secret instead of []byte for APISecret 2022-08-23 11:04:04 +00:00
node-cleanup cmd/node-cleanup: command to delete uncontacted nodes 2022-07-12 12:15:49 +00:00
nullify-bad-user-agents cmd/nullify-bad-user-agents: set user_agent to NULL where user_agent = partner_id 2022-03-31 16:57:50 -04:00
satellite satellite/payments/stripecoinpayments: storjscan invoice generation 2022-08-03 13:24:26 -07:00
storagenode {storagenode,multinode/nodes}: use multinodeauth.Secret instead of []byte for APISecret 2022-08-23 11:04:04 +00:00
storagenode-updater cmd/storagenode-updater: add should-update cmd 2022-04-12 17:55:54 +00:00
storj-admin all: fix linter complaints 2020-10-13 15:59:01 +03:00
storj-sim cmd/storj-sim: ignore context canceled and flush output 2022-08-02 20:48:46 +03:00
uplink cmd/uplink: fix access setup flags setup 2022-08-09 16:05:44 +00:00
versioncontrol Dockerfiles: switch base image from alpine to Debian 2022-04-05 11:40:44 +00:00