featurebase/internal/clustertests
reesporte 60e6900c2e
Add refresh token header/cookie (#2071)
* Add refresh token header/cookie

As part of work on automatic refreshing of access tokens in the grafana plugin
(FB-1377), we will now accept a refresh token in the "X-Molecula-Refresh-Token"
header or the "refresh-molecula-chip" cookie.

This refresh token will be used if the access token is expired. To achieve this,
there was a lot of plumbing that had to be done. Here is a list of some of it:

* Added lots of constants for the new values.
* Removed token cache, since we will be keeping state on the clients.
* We now only refresh tokens when they are expired, which is more inline with the
  OAuth spec.
* Refactored SetGRPCMetadata to be simpler to read.
* Refactored AddAuthToken.
* Update failing tests.
* We now don't split GRPC cookies on ";". Not sure why we did that before tbh.

I also added TODOs to add the refresh token to other subcommands. This is out of
scope for my current ticket, but it would be nice to have in the future.

* remove unnecessary context from Authenticate

* Add comments on why we check both cases for headers

It's because some GRPC clients lowercase metadata names. I've run into issues with
this enough that I think it's worth the extra checks. We prefer lowercase though,
because that's "standard".

* Fix test that broke during rebase
2022-05-20 16:12:27 -05:00
..
fakeidp fb1172: enable refresh tokens 2022-02-07 13:42:11 -06:00
testdata rip out ui/usage 2022-02-28 12:05:44 -06:00
cluster_test.go Add refresh token header/cookie (#2071) 2022-05-20 16:12:27 -05:00
docker-compose-replication2.yml remove trailing spaces en masse (#2024) 2022-04-18 09:31:35 -05:00
docker-compose.yml remove trailing spaces en masse (#2024) 2022-04-18 09:31:35 -05:00
Dockerfile-fakeIDP We check for incomplete deletion when server is started. 2022-02-25 09:28:13 -06:00
pause_node_test.go Add refresh token header/cookie (#2071) 2022-05-20 16:12:27 -05:00