-
Notifications
You must be signed in to change notification settings - Fork 30
K8SPS-265 add special characters #951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -6,18 +6,23 @@ ROUTER_DIR=${ROUTER_DIR:-/tmp/router} | |||
OPERATOR_USER=${OPERATOR_USER:-operator} | |||
NAMESPACE=$(</var/run/secrets/kubernetes.io/serviceaccount/namespace) | |||
|
|||
urlencode() { | |||
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" | |
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" |
@@ -1,15 +1,20 @@ | |||
#!/bin/bash | |||
|
|||
urlencode() { | |||
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" | |
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" |
@@ -1,7 +1,12 @@ | |||
#!/bin/bash | |||
|
|||
urlencode() { | |||
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" | |
python3 -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))' "$1" |
local user="${1:-root}" | ||
kubectl -n "${NAMESPACE}" get secret test-secrets -o jsonpath="{.data.${user}}" | base64 --decode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
local user="${1:-root}" | |
kubectl -n "${NAMESPACE}" get secret test-secrets -o jsonpath="{.data.${user}}" | base64 --decode | |
local user="${1:-root}" | |
kubectl -n "${NAMESPACE}" get secret test-secrets -o jsonpath="{.data.${user}}" | base64 --decode |
sed -r "s|^[#]?password=.*$|password=${TOPOLOGY_PASSWORD:-$ORC_TOPOLOGY_PASSWORD}|" "${ORC_CONF_PATH}/orc-topology.cnf" >"${temp}" | ||
|
||
ESCAPED_PASSWORD=$(printf '%s' "${TOPOLOGY_PASSWORD:-$ORC_TOPOLOGY_PASSWORD}" | sed -e 's/[&"\\]/\\&/g') | ||
ESCAPED_PASSWORD="\"${ESCAPED_PASSWORD}\"" # Wrap in double quotes for .cnf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
ESCAPED_PASSWORD="\"${ESCAPED_PASSWORD}\"" # Wrap in double quotes for .cnf | |
ESCAPED_PASSWORD="\"${ESCAPED_PASSWORD}\"" # Wrap in double quotes for .cnf |
-e "s|^[#]?user=.*$|user=${TOPOLOGY_USER}|" \ | ||
-e "s|^[#]?password=.*$|password=${ESCAPED_PASSWORD}|" \ | ||
"${ORC_CONF_PATH}/orc-topology.cnf" > "${temp}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
-e "s|^[#]?user=.*$|user=${TOPOLOGY_USER}|" \ | |
-e "s|^[#]?password=.*$|password=${ESCAPED_PASSWORD}|" \ | |
"${ORC_CONF_PATH}/orc-topology.cnf" > "${temp}" | |
-e "s|^[#]?user=.*$|user=${TOPOLOGY_USER}|" \ | |
-e "s|^[#]?password=.*$|password=${ESCAPED_PASSWORD}|" \ | |
"${ORC_CONF_PATH}/orc-topology.cnf" >"${temp}" |
@@ -45,7 +45,8 @@ const ( | |||
passwordMinLen = 16 | |||
passSymbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + | |||
"abcdefghijklmnopqrstuvwxyz" + | |||
"0123456789" | |||
"0123456789" + | |||
"!$%&()*+,-.<=>?@[]^_{}~#" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For any characters that we omitted from the password generation, I recommend we add a small godoc with some notes. It will help a lot.
@@ -10,7 +10,6 @@ commands: | |||
apply_s3_storage_secrets | |||
deploy_operator | |||
deploy_non_tls_cluster_secrets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we are removing this cause the operator does not trigger the password generation if the key/value pair exists, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I want operator generate random passwords and we use it in our tests. (now we use passwords from predefined file and it's like root_password
)
| sed 's/'\''/'\\\\\''/g' \ | ||
| sed 's/"/\\\"/g' | ||
} | ||
|
||
MYSQL_VERSION=$(mysqld -V | awk '{print $3}' | awk -F'.' '{print $1"."$2}') | ||
|
||
if [[ "$MYSQL_VERSION" != '8.0' ]] && [[ "${MYSQL_VERSION}" != '8.4' ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
if [[ "$MYSQL_VERSION" != '8.0' ]] && [[ "${MYSQL_VERSION}" != '8.4' ]]; then | |
if [[ $MYSQL_VERSION != '8.0' ]] && [[ ${MYSQL_VERSION} != '8.4' ]]; then |
the e2e are faiing for me. e.g. I tried the sample log:
|
CHANGE DESCRIPTION
Problem:
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
extending password strength with specific characters.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
Config/Logging/Testability