Configuring HTML5GW docker with JWT validation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring HTML5GW docker with JWT validation

L4 Transporter

Hi guys,

So I've upgraded to v12 and I'm trying to get my HTML5GW working with the JWT validation but for some reason I can't. Looking at the container logs I can see the error that a REST call fails for the JWT for:

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

The only KB regarding this seems to be about Base64 vs DER, but my certs are Base64 and look fine.

 

So, did anyone got this working and can shed some light on the subject?

 

Thanks,

Kostya

1 accepted solution

Accepted Solutions

L7 Applicator

Technically you don't need to import the actual PVWA cert - you could also just add the CA that signed the PVWA under a different filename.

 

The reason is this:

During the creation of the Docker container, the script PSMGWDockerConfigure.sh runs the basic deployment of Tomcat, the HTML5GW RPM, and a few methods to handle certificates, among them is the "add_imported_certificates_to_trust_stores" method.

The method add_imported_certificates_to_trust_stores looks inside the mapped directory containing the key+certs, and imports every cert file into the containers Java + OpenSSL cert stores... *except* for the files that were passed using the GWCert/GWCAFile env variables.

This means that for environments where the same CA signed the PSM HTML5 GW cert, and the PVWA cert, and also the PSM cert, you would have to duplicate this CA file in the import dir so that the add_imported_certificates_to_trust_stores method imports it correctly.

 

I had a case open regarding this exact issue a few months ago and suggested an improvement for it. Doesn't seem like a fix made it into v12.0.

View solution in original post

5 REPLIES 5

L4 Transporter

It appears that it took me a couple of more minutes to figure this out, as it appears that the documentation is not really clear on this.

According to the docs, you're suppose to add the CA cert that signed the PVWA to the /opt/certs folder.

This is not enough.

 

To get this working you will need to export the PVWA certificate and add it to the folder as well. This means that your folder will have 4 files now.

Field_Content_versions_oct20__0682J00000D5QrWQAV.png 

You need to recreate the image (kill, rm then run) and if you look at the logs you will see now that the HTML5GW will import the PVWA file as well:

Field_Content_versions_oct20__0682J00000D5QrgQAF.png 

Only after that you will be able to see a successful JWT validation process.

 

Hope this will help out others that will face the same issue.

L7 Applicator

Technically you don't need to import the actual PVWA cert - you could also just add the CA that signed the PVWA under a different filename.

 

The reason is this:

During the creation of the Docker container, the script PSMGWDockerConfigure.sh runs the basic deployment of Tomcat, the HTML5GW RPM, and a few methods to handle certificates, among them is the "add_imported_certificates_to_trust_stores" method.

The method add_imported_certificates_to_trust_stores looks inside the mapped directory containing the key+certs, and imports every cert file into the containers Java + OpenSSL cert stores... *except* for the files that were passed using the GWCert/GWCAFile env variables.

This means that for environments where the same CA signed the PSM HTML5 GW cert, and the PVWA cert, and also the PSM cert, you would have to duplicate this CA file in the import dir so that the add_imported_certificates_to_trust_stores method imports it correctly.

 

I had a case open regarding this exact issue a few months ago and suggested an improvement for it. Doesn't seem like a fix made it into v12.0.

I'm gonna switch the best answer to this, but that is a very annoying behavior.

Duplicating the root cert to rootCA2.crt actually solved a 2nd issue I had where I couldn't get the RDP over SSL working but it was fixed with this.

 

The whole process is counterintuitive and makes no sense. If I specified a root CA, it should be set for everything inside the container.

 

Thanks @Bernhard Brückler​ .

Version 14.0 but problem still persist and to resolve this issue, as tell @Bernhard Brückler​  you need to duplicate root CA crt to same folder, after this problem will be resolved

 

Version 14.2, and the solution does still work.

  • 1 accepted solution
  • 1011 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!