Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Allow rotating most secrets #450

Merged
merged 4 commits into from
Sep 3, 2020
Merged

Allow rotating most secrets #450

merged 4 commits into from
Sep 3, 2020

Conversation

sethvargo
Copy link
Member

This isn't 100% complete, but it's about 95% toward GH-429. I'd eventually like to write a utility in tools/ that generates the secrets and puts them in Secret Manager so a human never sees them, but didn't want to muddle that with the actual docs/implementation.

Release Note

Add support for rotating HMAC and encryption keys

@googlebot googlebot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Sep 2, 2020
@sethvargo
Copy link
Member Author

/assign @mikehelmick

Copy link
Contributor

@icco icco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just nits and questions

docs/production.md Outdated Show resolved Hide resolved
base64, for example:

```sh
export COOKIE_KEYS="ARLaFwAqBGIkm5pLjAveJuahtCnX2NLoAUz2kCZKrScUaUkEaxHSvJLVYb5yAPCc441Cho5n5yp8jdEmy6hyig==,RLjcRZeqc07s6dh3OK4CM1POjHDZHC+usNU1w/XNTjM="
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could. you add a command to turn this from base64? Just to make this as dumb simple as possible to follow in case of a breach.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand. The openssl commands output base64, and the envvar accepts base64. Why would we want something that decodes it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, that's not how I read this. I thought this value was a base64 encoded value of an array of base64 strings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified.

docs/production.md Show resolved Hide resolved
docs/production.md Show resolved Hide resolved
docs/production.md Show resolved Hide resolved
@@ -11,3 +12,180 @@ configurations are available:
| ----------------------- | ------------------------------- | -----------
| OpenCensus Agent | `OCAGENT` | Use OpenCensus.
| Stackdriver\* | `STACKDRIVER` | Use Stackdriver.


## Rotating secrets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this a lot, I look forward to the tooling. Maybe add a TODO for that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was toying with the tooling yesterday. It's actually somewhat annoying because Terraform is managing the secret and the envvars.

pkg/database/authorized_app.go Show resolved Hide resolved
pkg/database/authorized_app.go Show resolved Hide resolved
Copy link
Contributor

@icco icco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks for clarifying!

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: icco, sethvargo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit b54fb0c into main Sep 3, 2020
@google-oss-robot google-oss-robot deleted the sethvargo/rotate branch September 3, 2020 14:38
@google google locked and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants