You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m getting into SSL cert problems due to the added domain apicast-staging when running the demo.
I.e. I have a server cert for apps.customer.rhmi.io but since the Jenkins-Toolbox config sets up the apicast router to *.apicast-staging.apps.customer.rhmi.io the SSL connection gets rejected.
The problem could be solved if I instead of using wildcard, could set the name of the Apicast host, for example beer-catalog.apps.customer.rhmi.io
Is this possible? Not sure how the hostname for apicast gets generated.
The other alternative to skip the apicast-staging part doesn’t work since the route *.apps.customer.rhmi.io is already taken.
There are multiple ways to solve the SSL/TLS issues that can arise in such situation:
1. Ignore SSL/TLS issues
Use the "curl -k" command in the integration test phase to workaround the SSL/TLS issue (that's already the case with the supplied sample jenkins pipelines). To showcase the resulting API in the API Developer Portal, you will have to accept the SSL/TLS warning in your browser (once before the demo) and it will work as long as your browser is left open.
2. Add a valid wildcard certificate to each wildcard route
When creating the wildcard routes for the APIcast gateways, you could pass --key and --cert to provide a valid wildcard certificate.
Getting a valid wildcard certificate is a bit out-of-scope for this guide. You can use Let's Encrypt certificates for this purpose but explaining in great details is out-of-scope for this guide (it involves setting up some DNS entries, which depends on your DNS provider...).
However, here is how I generate my wildcard certificates using Let's Encrypt and Gandi:
brew install lego
GANDIV5_API_KEY=[REDACTED] lego -d "*.$APICAST_SELF_MANAGED_STAGING_WILDCARD_DOMAIN" -d "*.$APICAST_SELF_MANAGED_PRODUCTION_WILDCARD_DOMAIN" -a -m [email protected] --path $HOME/.lego --dns gandiv5 run
3. Hardcode the staging and production hostnames for each pipeline
Create a staging and production route for each API with a custom hostname:
And in the JenkinsPipeline BuildConfig set the PUBLIC_STAGING_WILDCARD_DOMAIN and PUBLIC_PRODUCTION_WILDCARD_DOMAIN variables to your openshift router wildcard domain (the value of $OPENSHIFT_ROUTER_SUFFIX, that is to say: "apps.customer.rhmi.io").
If you plan to showcase the pipeline creation using the provided template, you will need to reference your forked github repo using -p GIT_REPO=https://github.com/<your-github-username>/3scale-toolbox-jenkins-samples.git and change the PUBLIC_{STAGING,PRODUCTION}_WILDCARD_DOMAIN parameters to $OPENSHIFT_ROUTER_SUFFIX.
For instance, with the hybrid-usecase-open pipeline:
As reported by @torbjorndahlen:
There are multiple ways to solve the SSL/TLS issues that can arise in such situation:
1. Ignore SSL/TLS issues
Use the "curl -k" command in the integration test phase to workaround the SSL/TLS issue (that's already the case with the supplied sample jenkins pipelines). To showcase the resulting API in the API Developer Portal, you will have to accept the SSL/TLS warning in your browser (once before the demo) and it will work as long as your browser is left open.
2. Add a valid wildcard certificate to each wildcard route
When creating the wildcard routes for the APIcast gateways, you could pass
--key
and--cert
to provide a valid wildcard certificate.Getting a valid wildcard certificate is a bit out-of-scope for this guide. You can use Let's Encrypt certificates for this purpose but explaining in great details is out-of-scope for this guide (it involves setting up some DNS entries, which depends on your DNS provider...).
However, here is how I generate my wildcard certificates using Let's Encrypt and Gandi:
3. Hardcode the staging and production hostnames for each pipeline
Create a staging and production route for each API with a custom hostname:
and so on for all the apis you plan to showcase...
Then, you need to fork this repository and slightly modify the pipelines.
Replace :
with:
And in the JenkinsPipeline BuildConfig set the
PUBLIC_STAGING_WILDCARD_DOMAIN
andPUBLIC_PRODUCTION_WILDCARD_DOMAIN
variables to your openshift router wildcard domain (the value of$OPENSHIFT_ROUTER_SUFFIX
, that is to say: "apps.customer.rhmi.io").If you plan to showcase the pipeline creation using the provided template, you will need to reference your forked github repo using
-p GIT_REPO=https://github.com/<your-github-username>/3scale-toolbox-jenkins-samples.git
and change thePUBLIC_{STAGING,PRODUCTION}_WILDCARD_DOMAIN
parameters to$OPENSHIFT_ROUTER_SUFFIX
.For instance, with the
hybrid-usecase-open
pipeline:The text was updated successfully, but these errors were encountered: