Revert "[GH-14] Add at-rest encryption for OAuth2 token (#143)" #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts PR #143 Add at-rest encryption for OAuth2 token
Summary
With the OAuth encryption code active, the
expires
field in the stored OAuth token is always being set to 0001-01-01T00:00:00Z, when it should be set to time ofconnect time + one hour
, something like2020-06-01T00:14:55.338026-04:00
. This causes Go's OAuth library to think the token is always valid and does not need a refresh.Since the OAuth tokens expire after one hour, the token stops working after an hour. And since the OAuth library thinks the token is valid, it will not refresh. So no operations work after an hour from connecting.
We've also determined that encrypting the OAuth token brings little to no value because of how the encryption key is stored. It can also make debugging a little more difficult due to not having direct access to the relevant data in the KV store.
Ticket Link
Fixes #155
Test Steps