Skip to content

Conversation

@johnmaguire
Copy link
Member

@johnmaguire johnmaguire commented Nov 11, 2024

Depends on #17.

This PR adds PrivateKey, PublicKey, and TrustedKey types for handling host keys and CA keys. dnapi will always send both P256 and Ed25519 keys with enrollment requests. From that point forward, dnapi will only generate keys of the type used in prior requests.

dnapi does not attempt to "filter" trusted keys to only the curve supported by Nebula. In other words, a P256 network requires P256 CAs and host keys, but does not necessarily require P256 trusted keys. Do we want to add enforcement here?

Some code was moved into a keys sub-package in order to allow dnapitest to import it, while still allowing the dnapi package to import dnapitest. The bulk of this code is tested through a call to DoUpdate.

@johnmaguire johnmaguire changed the title Support P256 network curve in enroll call Support P256 network curve in API calls Dec 3, 2024
@johnmaguire johnmaguire marked this pull request as ready for review December 5, 2024 16:25
@johnmaguire johnmaguire changed the base branch from main to go-1.22 December 5, 2024 16:28
Base automatically changed from go-1.22 to main December 5, 2024 16:32
brad-defined
brad-defined previously approved these changes Dec 5, 2024
brad-defined
brad-defined previously approved these changes Dec 5, 2024
@johnmaguire johnmaguire merged commit 9f2241d into main Dec 5, 2024
2 checks passed
@johnmaguire johnmaguire deleted the p256 branch December 5, 2024 18:50
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.

3 participants