Skip to content

Commit 23b787c

Browse files
Merge pull request openshift#7057 from shiftstack/OCPBUGS-7954
OCPBUGS-7954: openstack: Only check HTTPS certs on public endpoints
2 parents 439f39c + b60071f commit 23b787c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/user/openstack/invalid-https-certificates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ With OpenShift v4.10, HTTPS certificates not using the `Subject Alternative Name
77
A script provided below automates the operation. However, it requires to have a set of tools available (including a relatively recent version of `python3-openstackclient`). To manually check your OpenStack infrastructure:
88

99
1. Collect the URL of the OpenStack public endpoints with `openstack catalog list` (HTTP (unsecured) endpoints do not need to be checked)
10-
2. For each HTTPS endpoint: collect the host (by removing the scheme, the port and the path) and the port
10+
2. For each public HTTPS endpoint: collect the host (by removing the scheme, the port and the path) and the port
1111
3. Run this openssl command to extract the SAN field of the certificate:
1212

1313
```plaintext
@@ -49,7 +49,7 @@ readonly catalog san
4949
declare invalid=0
5050

5151
openstack catalog list --format json --column Name --column Endpoints \
52-
| jq -r '.[] | .Name as $name | .Endpoints[] | [$name, .interface, .url] | join(" ")' \
52+
| jq -r '.[] | .Name as $name | .Endpoints[] | select(.interface=="public") | [$name, .interface, .url] | join(" ")' \
5353
| sort \
5454
> "$catalog"
5555

@@ -63,7 +63,7 @@ while read -r name interface url; do
6363
noschema=${url#"https://"}
6464

6565
# If the schema was not HTTPS, error
66-
if [[ noschema == "$url" ]]; then
66+
if [[ "$noschema" == "$url" ]]; then
6767
echo "ERROR (unknown schema): $name $interface $url"
6868
exit 2
6969
fi

0 commit comments

Comments
 (0)