feat(generators): add hex generator#5314
Conversation
Signed-off-by: unique-jakub <jakub@unique.ch>
834bacd to
1809fe5
Compare
|
Can't this be a feature on |
|
Agree with @gusfcarvalho , i would rather put it in the password generator |
This reverts commit 1809fe5. Signed-off-by: unique-jakub <jakub@unique.ch>
Signed-off-by: unique-jakub <jakub@unique.ch>
Signed-off-by: unique-jakub <jakub@unique.ch>
|
jakobmoellerdev
left a comment
There was a problem hiding this comment.
I know this probably kills scope here, but: I dont think we should ad format-specific fields to password spec. I believe at some point we reach the natural domain of templating languages. many custom formats we could support via templating languages without inflating the API specification. I won't block the PR but I really think we should think about something like go templating or cue or whatever. happy to hear other opinions though
| // - "hex": hexadecimal encoding | ||
| // +kubebuilder:default="raw" | ||
| // +kubebuilder:validation:Enum=base64;base64url;base32;hex;raw | ||
| Encoding *string `json:"encoding,omitempty"` |
There was a problem hiding this comment.
I think this should be an own Type EncodingPolicy.
|
@jakobmoellerdev I think you're right, but I also think that indeed it is a huge scope creep so I would create a separate issue for that. :) |
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
|
* add hex generator Signed-off-by: unique-jakub <jakub@unique.ch> * Revert "add hex generator" This reverts commit 1809fe5. Signed-off-by: unique-jakub <jakub@unique.ch> * add encoding option to password generator Signed-off-by: unique-jakub <jakub@unique.ch> * make reviewable Signed-off-by: unique-jakub <jakub@unique.ch> * run make check-diff Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> --------- Signed-off-by: unique-jakub <jakub@unique.ch> Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Co-authored-by: Gergely Brautigam <skarlso777@gmail.com> Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Signed-off-by: Samuel Molling <samuelmolling@gmail.com>



Problem Statement
Users needed a way to generate cryptographically secure hexadecimal strings for use in Kubernetes secrets. The existing generators (UUID, Password) didn't provide pure hex string output - UUID generates formatted UUIDs with dashes, and Password generates mixed character sets. There was no dedicated generator for pure hex strings that could be used for API keys, tokens, or other hexadecimal identifiers.
Proposed Changes
Added a new Hex generator to the external-secrets project that provides:
Checklist
git commit --signoffmake testmake reviewable