pulsar-manager icon indicating copy to clipboard operation
pulsar-manager copied to clipboard

Adding https support for backend service

Open gurleen-gks opened this issue 2 years ago • 1 comments

Motivation:

With tls enabled, admin instance was getting created with the wrong URL, leading to a 401 error for all the requests from the manager backend service

Manager log Create Pulsar Admin instance. url=http://localhost:8080/, authPlugin=org.apache.pulsar.client.impl.auth.AuthenticationTls, authParams=tlsCertFile:client-cert.pem,tlsKeyFile:client-key.pem, tlsAllowInsecureConnection=false, tlsTrustCertsFilePath=cacert.pem, tlsEnableHostnameVerification=false

Broker log 2022-08-26T00:29:55,864-0700 [pulsar-web-42-22] INFO org.apache.pulsar.broker.PulsarService - created admin with url http://localhost:8080/

Modifications

  1. When tls enabled, getting the tls service URL.
  2. Modifying the HTTP broker URL to use the protocol and port from the original service URL.

gurleen-gks avatar Aug 30 '22 16:08 gurleen-gks

We can check the schema of the serviceUrl to use the HTTP/HTTPS.

nodece avatar Nov 23 '22 08:11 nodece