-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSS-7081 Add OAuth-specific methods to secrets store (#1175)
* Add `Get/Put` OAuth key methods to Vault store Signed-off-by: Babak K. Shandiz <[email protected]> * Add `Get/Put` OAuth key methods to Postgres store Signed-off-by: Babak K. Shandiz <[email protected]> * Add `Get/Put` OAuth key methods to in-memory store Signed-off-by: Babak K. Shandiz <[email protected]> * Add `Get/Put` OAuth key methods to mock store Signed-off-by: Babak K. Shandiz <[email protected]> * Add `Get/Put` OAuth key methods to credential store interface Signed-off-by: Babak K. Shandiz <[email protected]> * Expose underlying `CredentialStore` via a `JIMM` interface method Signed-off-by: Babak K. Shandiz <[email protected]> * Use `New*` method to instantiate in-memory credential store Signed-off-by: Babak K. Shandiz <[email protected]> * Use credential store to retrieve OAuth session JWT secret key Signed-off-by: Babak K. Shandiz <[email protected]> * Update `CredentialStore` godoc Signed-off-by: Babak K. Shandiz <[email protected]> * Add test to verify `GetOAuthKey` returns not found error Signed-off-by: Babak K. Shandiz <[email protected]> * Add test to verify `GetOAuthKey` returns not found error Signed-off-by: Babak K. Shandiz <[email protected]> * Add `CheckOrGenerateOAuthKey` method Signed-off-by: Babak K. Shandiz <[email protected]> * Generate OAuth key on the leader unit Signed-off-by: Babak K. Shandiz <[email protected]> * Update suite to generate OAuth key as well Signed-off-by: Babak K. Shandiz <[email protected]> * Add package godoc Signed-off-by: Babak K. Shandiz <[email protected]> * Reuse shared `JWTTestSecret` in `JimmCmdSuite` Signed-off-by: Babak K. Shandiz <[email protected]> * Fix godoc Signed-off-by: Babak K. Shandiz <[email protected]> * Add `CleanupOAuth` to Postgres store Signed-off-by: Babak K. Shandiz <[email protected]> * Add `CleanupOAuth` to Vault store Signed-off-by: Babak K. Shandiz <[email protected]> * Add `CleanupOAuth` to mock store Signed-off-by: Babak K. Shandiz <[email protected]> * Add `CleanupOAuth` to in-memory store Signed-off-by: Babak K. Shandiz <[email protected]> * Add `CleanupOAuth` to credential store interface Signed-off-by: Babak K. Shandiz <[email protected]> * Use same const secret for in-memory store Signed-off-by: Babak K. Shandiz <[email protected]> * fix tests with populating OAuth key secrets in store Signed-off-by: Babak K. Shandiz <[email protected]> * Use `*WithContext` variants for read/write methods Signed-off-by: Babak K. Shandiz <[email protected]> * Use `net.Listen` to find an available TCP port Signed-off-by: Babak K. Shandiz <[email protected]> * Rename `CleanupOAuth` to `CleanupOAuthSecrets` Signed-off-by: Babak K. Shandiz <[email protected]> * Rename credential store `*OAuthKey` methods to `*OAuthSecret` Signed-off-by: Babak K. Shandiz <[email protected]> * Run `go mod tidy` Signed-off-by: Babak K. Shandiz <[email protected]> --------- Signed-off-by: Babak K. Shandiz <[email protected]>
- Loading branch information
Showing
22 changed files
with
382 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.