Skip to content

Enable TLS for UI and API #1408

@jescalada

Description

@jescalada

Is your feature request related to a problem? Please describe.
Currently, TLS is configurable only for the proxy. We could extend the implementation to add secure connections to the API/UI server.

The current implementation allows configuring the TLS parameters as follows (config.schema.json):

"tls": {
  "description": "TLS configuration for secure connections",
  "type": "object",
  "properties": {
    "enabled": { "type": "boolean" },
    "key": { "type": "string" },
    "cert": { "type": "string" }
  },
  "required": ["enabled", "key", "cert"]
},

These values are fetched and used when creating the server:

if (getTLSEnabled()) {
  await new Promise<void>((resolve, reject) => {
    const server = https.createServer(getServerOptions(), this.expressApp!);
    server.on('error', reject);
    server.listen(proxyHttpsPort, () => {
      console.log(`HTTPS Proxy Listening on ${proxyHttpsPort}`);
      resolve();
    });
    this.httpsServer = server;
  });
}

Describe the solution you'd like
It would be nice to extend this implementation so that the API/UI server can make use of TLS as well.

Additional context
#1391 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions