wso2 / wso2/docs-apim

APIM [3.x.x] Causing "SSL peer failed hostname validation for name: localhost" when login to APIM portals

Open
#8,966 0 comments 0 reactions 3 assignees View on GitHub

@shaniR is already working on this.

Since Jun 23, 2020.

Priority/Normal Type/Docs
Dominant language
CSS
Stars
99
Forks
708
Avg merge
1d 7h
Merged PRs (30d)
22

Description

When the localhost is not included in the certificate file as a common name (CN) or a subject alternative name (SAN).

Following SSL issue causing when tried to log in to the APIM 3.0.0 admin/publisher/dev portals.

org.jaggeryjs.scriptengine.exceptions.ScriptException: javax.net.ssl.SSLPeerUnverifiedException: SSL peer failed hostname validation for name: localhost

Since the hostname used for internal calls triggered when login (admin/publisher/devportal) are set to 'localhost' the above issue is causing

For APIM publisher and dev portal. we can modify the following files, by altering the localhost and provide the relevant hostname to solve the issue.

  • /repository/deployment/server/jaggeryapps/<PUBLISHER/DEVPORTAL>/site/public/theme/settings.js file, /repository/deployment/server/jaggeryapps/<PUBLISHER/DEVPORTAL>/site/public/theme/settings.js file

But when it comes to the admin portal we need to modify AuthManager, server URL hostname by providing the cert's CN. But In 3.x, the AuthManager, server URL is not configurable.

Due to this in order to avoid those issues, We need to update the documentation with recommending to add the localhost as a common name (CN) or a subject alternative name (SAN) when configuring the certificate.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.