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

Make CSI driver spiffe writeFiles compatable with go-spiffe x509svid.Parse #13

Conversation

JoshVanL
Copy link
Contributor

@JoshVanL JoshVanL commented May 4, 2022

This PR ensures that the driver writes certificate key pairs which are compatible with the go-spiffe x509svid.Parse library function.

To do this, the private key marshalling has been changed from MarshalECPrivateKey -> MarshalPKCS8PrivateKey and PEM header EC PRIVATE KEY -> PRIVATE KEY.

In order to test this, the camanager driver component has been split out into its own struct. This was required since the camanager absolutely needs a filesystem storage (in order to read files back), however we need to use the store Interface for the writeKeypair func so InMemory can be used for tests. filesystem is incompatible with unit tests since it requires mounts.

/cc @jakexks @charlieegan3

@jetstack-bot jetstack-bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label May 4, 2022
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoshVanL

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 4, 2022
@charlieegan3
Copy link

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2022
@jetstack-bot jetstack-bot merged commit e804a9f into cert-manager:main May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants