Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you do key rotation? #65

Closed
fmpwizard opened this issue Jul 7, 2017 · 4 comments
Closed

How do you do key rotation? #65

fmpwizard opened this issue Jul 7, 2017 · 4 comments

Comments

@fmpwizard
Copy link

Is there a way we can rotate the 32 byte long key? instead of forcing users to logout and log back in to use the new key?

@elithrar
Copy link
Contributor

elithrar commented Jul 13, 2017 via email

@fmpwizard
Copy link
Author

Thanks for your reply. I'll explore what it would take to implement such a feature and if it works well I'll send a PR for review (may be a few weeks before I get to it though).

@elithrar
Copy link
Contributor

Note: I'd suggest a func RotatedKeys(keys []byte...) Option functional option that takes a slice of key material, and passes them to the underlying SecureCookie instance here: https://github.com/gorilla/csrf/blob/master/csrf.go#L152-L159

The library will need to use EncodeMulti & DecodeMulti to achieve this.

@stale
Copy link

stale bot commented Dec 9, 2018

This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.

@stale stale bot added the stale label Dec 9, 2018
@stale stale bot closed this as completed Dec 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants