storj/private
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
..
api satellite/console: integrate sessions into satellite UI 2022-06-13 08:02:02 +00:00
apigen {private,satellite}: add Typescript generation to REST API generation 2022-08-18 16:37:48 +00:00
blockchain satellite/{payments/storjscan,satellitedb}: Add storjscan wallet DB 2022-05-24 08:42:02 +00:00
compensation multinode/console: storage usage and total storage usage 2021-06-10 16:01:41 +00:00
crashreportpb all: fix linting issues 2022-03-21 15:26:42 +00:00
cui all: reformat comments as required by gofmt 1.19 2022-08-10 18:24:55 +00:00
currency private/currency: add strictcsv support to microunit 2020-03-31 14:57:04 -06:00
date Fix monthly earning estimation (#4282) 2021-11-17 18:26:21 -05:00
debugging all: fix dots 2020-07-16 14:58:28 +00:00
lifecycle satellite: more detailed goroutine labels 2022-05-11 17:50:55 +00:00
migrate all: fix error naming 2021-04-29 15:38:21 +03:00
multinodeauth {storagenode,multinode/nodes}: use multinodeauth.Secret instead of []byte for APISecret 2022-08-23 11:04:04 +00:00
multinodepb all: fix linting issues 2022-03-21 15:26:42 +00:00
nodeoperator all: fix error naming 2021-04-29 15:38:21 +03:00
post satellite/email: add delimiter to close the last part of Multipart emails 2022-02-01 09:55:29 +00:00
prompt private/prompt: remove dependency to go-prompt 2020-02-25 13:09:41 +02:00
revocation all: fix error naming 2021-04-29 15:38:21 +03:00
server private/server: monitor incoming connection kinds 2022-03-15 21:20:32 +00:00
testblobs satellite/audit,storage: increase sleep delay in TestMaxVerifyCount 2021-09-10 15:30:37 +00:00
testmonkit all: reformat comments as required by gofmt 1.19 2022-08-10 18:24:55 +00:00
testplanet testplanet: support snapshot based migration for storagenode 2022-08-22 09:46:27 +00:00
testredis ci: fix lint errors 2021-05-17 13:37:31 +00:00
testrevocation pkg/,private/: merge with private package 2021-04-23 16:37:28 +03:00
teststorj all: fix dots 2020-07-16 14:58:28 +00:00
testuplink mod: bump uplink 2021-05-06 14:48:36 +00:00
version private/version: document kebabToPascal 2022-03-31 13:52:27 +03:00
web web/ratelimiter: support disabling 2022-06-09 15:33:35 +00:00