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

refactor keystore config #43154

Merged
merged 4 commits into from
Jun 18, 2024
Merged

refactor keystore config #43154

merged 4 commits into from
Jun 18, 2024

Conversation

nklaassen
Copy link
Contributor

@nklaassen nklaassen commented Jun 18, 2024

We recently duplicated most fields of (lib/auth/keystore).Config types to (lib/service/servicecfg).KeystoreConfig to break some dependencies on cloud SDKs in our client binaries.

This PR deletes (lib/auth/keystore).Config to unify on (lib/service/servicecfg).KeystoreConfig. It adds a new keystore.Options struct to hold runtime options for the keystore, in contrast to KeystoreConfig which holds mostly static options coming from the config file.

No functional changes are made here.

Depends on #43153 and https://github.com/gravitational/teleport.e/pull/4425

I made these changes while prepping the keystore to support configurable signature algorithms for the implementation of RFD 136.

@nklaassen nklaassen added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v16 labels Jun 18, 2024
@nklaassen nklaassen requested a review from rosstimothy June 18, 2024 01:41
@github-actions github-actions bot requested review from codingllama and gzdunek June 18, 2024 01:42
Base automatically changed from nklaassen/keystore-config0 to master June 18, 2024 18:10
@@ -5687,7 +5687,7 @@ func TestGenerateHostCert(t *testing.T) {
// the first available identity.
func TestLocalServiceRolesHavePermissionsForUploaderService(t *testing.T) {
srv, err := NewTestAuthServer(TestAuthServerConfig{Dir: t.TempDir()})
require.NoError(t, err)
require.NoError(t, err, trace.DebugReport(err))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this something left over from debugging a failed test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes but I don't think it's worth reverting, it was helpful for me 🤷

Copy link
Contributor

@codingllama codingllama left a comment

Choose a reason for hiding this comment

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

LGTM, although you may want a domain expert to take a look.

lib/service/servicecfg/auth.go Outdated Show resolved Hide resolved
lib/service/servicecfg/auth.go Show resolved Hide resolved
lib/service/servicecfg/auth.go Outdated Show resolved Hide resolved
lib/service/servicecfg/auth.go Outdated Show resolved Hide resolved
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from gzdunek June 18, 2024 21:46
@nklaassen nklaassen force-pushed the nklaassen/keystore-config2 branch from f300440 to 8f0b329 Compare June 18, 2024 21:57
@nklaassen
Copy link
Contributor Author

LGTM, although you may want a domain expert to take a look.

I wrote all this originally and Tim's the only other person who has touched it

Comment on lines 257 to 258
GCPKMSProtectionLevelHSM = "HSM"
GCPKMSProtectionLevelSoftware = "SOFTWARE"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: godocs.

@nklaassen nklaassen added this pull request to the merge queue Jun 18, 2024
Merged via the queue into master with commit 8a72a03 Jun 18, 2024
37 checks passed
@nklaassen nklaassen deleted the nklaassen/keystore-config2 branch June 18, 2024 23:13
@public-teleport-github-review-bot

@nklaassen See the table below for backport results.

Branch Result
branch/v16 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v16 no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants