Skip to content

Commit

Permalink
Fix CA
Browse files Browse the repository at this point in the history
  • Loading branch information
dbutenhof committed May 4, 2024
1 parent 2c70d6b commit 2802d1f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
22 changes: 22 additions & 0 deletions server/pbenchinacan/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Private CA

The "pbench in a can" build of the Pbench Server relies on a private
Certificate Authority cert called `pbench_CA.crt`. This expires at 5
year intervals and needs to be periodically regenerated:

```
openssl req -x509 -new -nodes \
-key server/pbenchinacan/etc/pki/tls/private/pbench_CA.key \
-sha256 -days 1826 \
-out server/pbenchinacan/etc/pki/tls/certs/pbench_CA.crt \
-subj '/CN=pbench.redhat.com/C=US/L=Westford, MA'
```

Note that the private key file doesn't need to be regenerated.

You can view the current certificate with

```
openssl x509 -text \
-in server/pbenchinacan/etc/pki/tls/private/certs/pbench_CA.crt
```
20 changes: 10 additions & 10 deletions server/pbenchinacan/etc/pki/tls/certs/pbench_CA.crt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-----BEGIN CERTIFICATE-----
MIIDYTCCAkmgAwIBAgIUUtVXi1qMBbg1wLVBmeUM/tMuWsMwDQYJKoZIhvcNAQEL
MIIDYTCCAkmgAwIBAgIUDWClad/f+A7kcX0y0fpB2MaHWHQwDQYJKoZIhvcNAQEL
BQAwQDEaMBgGA1UEAwwRcGJlbmNoLnJlZGhhdC5jb20xCzAJBgNVBAYTAlVTMRUw
EwYDVQQHDAxXZXN0Zm9yZCwgTUEwHhcNMjMwNTA1MjEzNzU0WhcNMjQwNDI1MjEz
NzU0WjBAMRowGAYDVQQDDBFwYmVuY2gucmVkaGF0LmNvbTELMAkGA1UEBhMCVVMx
EwYDVQQHDAxXZXN0Zm9yZCwgTUEwHhcNMjQwNTA0MTI1MzM2WhcNMjkwNTA0MTI1
MzM2WjBAMRowGAYDVQQDDBFwYmVuY2gucmVkaGF0LmNvbTELMAkGA1UEBhMCVVMx
FTATB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RK
8S2AGOWIQOXO9gzlu9BsfrFkolKdnogG3Kcf5DqiFKEb9OA39Yute4VsrBAbT4ng
TEMI7Duz0hlef+beLHe0YGbR3vH2/e6EvZEa0kF127jdXo1v+h/r5ESlT067dA3M
dxDQ768G0TqUq8lxDDYX2/2u9JtNQSsz/pBO2/abha/tkTwqhOT39Iw/Z81orvLh
M7htpEM=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion server/pbenchinacan/load_keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ echo "Keycloak redirect URI list is <${keycloak_redirect_uris}>."

ADMIN_TOKEN=""
while true; do
ADMIN_TOKEN=$(curl -s -f -X POST \
ADMIN_TOKEN=$(curl -sS -f -X POST \
"${KEYCLOAK_HOST_PORT}/realms/master/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=${ADMIN_USERNAME}" \
Expand Down

0 comments on commit 2802d1f

Please sign in to comment.