Repository navigation
Conversation
The first argument of genCA, genSelfSignedCert, genSignedCert and their WithKey variants can now be a dict of subject fields (organization, organizationalUnit, country, ...) in addition to a common name string.
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The certificate functions only accept a common name, so certificates that need
other subject fields can't be generated. A common case is Kubernetes client
certificates, where the group comes from the Organization (e.g. the admin cert
needs
O=system:masters). Helm chart authors can't create those with sprig today.This lets the first argument of
genCA,genSelfSignedCert,genSignedCertand their
WithKeyvariants be either a string (unchanged behavior) or a dict:Supported keys map to
pkix.Name:commonName,serialNumber,organization,organizationalUnit,country,province,locality,streetAddress,postalCode. List fields take a string or a list. Unknown keys return an error,so a typo like
organisationdoesn't silently produce a cert without the group.Existing templates are not affected. Tests and docs are included.
Closes #284