993d13c475
This reverts commit bfe88fda56
.
We are also adding some README.md files and some example yaml
for easy facilitation of secret generation.
Reason for revert: Taking a different approach to implement secret generation https://review.opendev.org/c/airship/airshipctl/+/771736
Change-Id: Idea4271f99b4bc9f0f88440fc19b6ca44686cf2a
1.2 KiB
1.2 KiB
Secret Generation Examples
Below examples show different function calls in templater that can be used for creation of secrets.
- derivePassword function to generate password
password: {{ derivePassword 1 "long" (randAscii 10) "user" "example.com" }}
- To generate randonm Ascii or AlphaNum or Numeric or Alpha keys
test1: {{ randAlphaNum <len> }}
test2: {{ randAlpha 5 }}
test3: {{ randNumeric 12 }}
test4: {{ randAscii 10 }}
- Generate keys matching regex
regexkey: {{ regexGen "abc[x-z]+" 6 }}
- To generate certificate authorities
{{- $ca := genCA <commonName> <validity> }}
{{- $ca := genCA "foo-ca" 365 }}
{{- $ca := genCAWithKey "foo-ca" 365 (genPrivateKey "rsa") }}
- Certificate generation(selfsigned and signed)
{{- $cert := genSelfSignedCert <cn> <ip_list> <dns_list> <validity> }}
{{- $cert := genSelfSignedCertWithKey "foo.com" (list "10.0.0.1" "10.0.0.2") (list "bar.com" "bat.com") 365 (genPrivateKey "ecdsa") }}
{{- $cert := genSignedCert "foo.com" (list "10.0.0.1" "10.0.0.2") (list "bar.com" "bat.com") 365 $ca }}
{{- $cert := genSignedCert "foo.com" (list "10.0.0.1" "10.0.0.2") (list "bar.com" "bat.com") 365 $ca (genPrivateKey "ed25519")}}