Skip to content

secret: store base64-encoded secret key in the secret file

Created by: unknwon

Editing raw bytes for the secret key file is a strange experience, especially if we also want admin to "join" two arrays of bytes with a ASCII comma.

https://github.com/sourcegraph/sourcegraph/blob/e1c50a27564cde0d951d7fe0ed9b2f9d90cec85e/internal/secret/init.go#L16-L17

Instead, base64-encoded string is a good "container" for secrets, and much easier to deal with when we expect admin to do some editing with it.

This should be done before we announce the encryption feature to any customer.

Context: https://sourcegraph.slack.com/archives/CJX299FGE/p1602572887386000