Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add TLS certificate util crate (#736)
* Initial commit * Use certs crate * Add first rough plans * Add ED25519 signing key support * Add RSA signing key * Finish initial CA creation, slowly start to refine code * Start to add K8s traits * Add SecretReference Copied from https://github.com/stackabletech/secret-operator/blob/main/rust/crd-utils/src/lib.rs * Add more errors, add more helper traits * Make certificate authority generic over the signing key * Start to add leaf certificate generation * Add more interop code, clean up trait impls and errors * Slightly simplify wrapper types and trait impls * Start to work through initial round of TODOs * Remove unwraps, add error handling * Move k8s code into own file * Remove initial manager code This code will be re-introduced in a follow-up PR. * Add a few more (doc) comments * Add more doc comments for constants * Apply suggestions Co-authored-by: Nick <[email protected]> * Add fixups for code suggestions * Change default RSA bit size * Add RSA bit size guard * Add doc comments, add leaf cert helper functions * Add doc comments for CertificatePairExt trait * Rename rustls feature to webhook * Fix doc comment reference * Add secret type guard * Remove unused trait function * Initial commit * Add const for Kubernetes TLS secret type * Turn the RSA bit size into an enum * Use enum discriminants * Remove hashset of serial numbers * Remove customizable line endings * Adjust root CA subject * Remove TLS mount related code * Add error handling for cert generation * Adjust conditional imports * Apply suggestion Co-authored-by: Natalie Klestrup Röijezon <[email protected]> * Revert "Apply suggestion" This reverts commit a0182d7. * Add from_secret and from_secret_ref functions to struct directly * Remove unneeded newlines * Add doc comment to SecretReference * Rename to KeySize, add bits method * Slightly adjust doc comment for SecretReference * Rename Keypair trait to CertificateKeypair * Remove KeySize enum * Move key size into constant * Use with_context to avoid unnecessary allocation when Ok * Adjust error message to reflect underlying error * Add doc comment to clarify paramter usage --------- Co-authored-by: Nick <[email protected]> Co-authored-by: Natalie Klestrup Röijezon <[email protected]>
- Loading branch information