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

Add client-side functions to export multiple authorities #51189

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

codingllama
Copy link
Contributor

Add "ExportAll" variants of ExportAuthorities and ExportAuthoritiesSecrets that can gracefully handle multiple active CAs.

ExportAll functions return an []*ExportedAuthority, so future iterations could easily include (and differentiate) CertAuthoritySpecV2.AdditionalTrustedKeys, plus whatever other data is necessary.

Subsequent PRs will take advantage of the new functions on both tctl and Web API. After the follow-ups the "unary" Export functions are to be removed.

Similar to #35754 (minus the frontend parts).

#35444

@codingllama codingllama added the no-changelog Indicates that a PR does not require a changelog entry label Jan 17, 2025
@codingllama
Copy link
Contributor Author

May be reviewed as a whole or commit-by-commit, as preferred. Commit 41ff204 refactors existing tests without changing functionality, so I suggest taking a look at it regardless. There are no changes in the test table itself (apart from ident), it only removes the outer loop in favor of a couple of explicit t.Run calls (which we built into in the next commits).

return exportAllAuthorities(ctx, client, req, exportSecrets)
}

func exportAllAuthorities(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is largely refactored from the old ExportAuthorities and ExportAuthoritiesSecrets bodies.

@codingllama
Copy link
Contributor Author

FYI @GavinFrazar, this tackles the same issues as #35754 (only I'll do the "frontend" parts in a follow up).

@codingllama
Copy link
Contributor Author

Optimistically adding backport labels. Once I mail the tctl/Web API parts we'll see how far back this will actually go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant