diff --git a/iac/README.md b/iac/README.md index 218a0f8..d38dda2 100644 --- a/iac/README.md +++ b/iac/README.md @@ -170,6 +170,33 @@ To check out the secrets inside a Kubernetes secrets resource you can use the fo ``` kubectl get secret -n -o jsonpath='{.data}' | jq 'map_values(@base64d)' ``` -kubectl get secret harbor-core -n harbor -o jsonpath='{.data}' | jq 'map_values(@base64d)' +kubectl get secret -n harbor -o jsonpath='{.data}' | jq 'map_values(@base64d)' ----- + + +Generating an RSA PKCS#1 key with openssl: +``` +openssl genrsa -traditional -out core-token-pkcs1.key 2048 +``` + +Convert to a single line +``` +awk '{printf "%s\\n", $0}' core-token-pkcs1.key +``` + +Make a cert +``` +openssl req -new -x509 -key core-token-pkcs1.key -out core-token.crt -days 365 -subj "/CN=harbor-core" +``` + +Convert to a single line +``` +awk '{printf "%s\\n", $0}' core-token.crt +``` + +Hashing the htpassword +``` +npm install bcryptjs +node -e 'console.log("admin:" + require("bcryptjs").hashSync("password", 10))' +``` \ No newline at end of file