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

CSS-7081 Add OAuth-specific methods to secrets store #1175

Merged
merged 31 commits into from
Mar 19, 2024
Merged

CSS-7081 Add OAuth-specific methods to secrets store #1175

merged 31 commits into from
Mar 19, 2024

Conversation

babakks
Copy link
Member

@babakks babakks commented Mar 13, 2024

Description

This PR adds two new methods to the CredentialStore interface; GetOAuthKey and PutOAuthKey. The key is used for symmetric encryption, so no more metadata (like alg or type, as in JWKs) is required to be stored along with the key value, and it suffices to use plain byte slices.

The initial OAuth secret key generation is handled just like JWKS rotation.

Fixes CSS-7081

Engineering checklist

Check only items that apply

  • Documentation updated
  • Covered by unit tests
  • Covered by integration tests

Notes for code reviewers

This is a copy of ale8k/jimm#1, updated with the latest feature-oidc branch.

babakks added 15 commits March 13, 2024 13:18
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
@babakks babakks changed the title CSS-7081 Add caching to secret store CSS-7081 Add OAuth-specific methods to secrets store Mar 13, 2024
internal/jujuapi/admin.go Outdated Show resolved Hide resolved
internal/vault/vault.go Show resolved Hide resolved
service.go Outdated Show resolved Hide resolved
cmd/jimmsrv/main.go Show resolved Hide resolved
internal/jimm/jimm.go Outdated Show resolved Hide resolved
internal/jimmtest/store.go Outdated Show resolved Hide resolved
Copy link
Contributor

@kian99 kian99 left a comment

Choose a reason for hiding this comment

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

lgtm

internal/db/secrets.go Outdated Show resolved Hide resolved
@kian99
Copy link
Contributor

kian99 commented Mar 15, 2024

Also, please make sure to squash-and-merge this.

Copy link
Contributor

@ale8k ale8k left a comment

Choose a reason for hiding this comment

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

lgtm, just some language around "pem" is confusing with the oauth keys, they're just strings no and nothing to do with PKI?

@babakks babakks merged commit ef3e14f into canonical:feature-oidc Mar 19, 2024
4 checks passed
@babakks babakks deleted the css-7081/use-secret-store branch March 19, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants