Basic Auth

Connect to a broker with Basic Auth

You can secure a Zeebe cluster with Basic Auth using an reverse proxy. In this case you can use a username / password pair as effectively an API key for your client applications.

Basic Auth without TLS

To enable Basic Auth without TLS:

import { ZBClient } from 'zeebe-node'

const zbc = new ZBClient({
  basicAuth: {    
    username: 'basicAuth-username',
    password: 'basicAuth-password',
  },
  hostname: 'my-secure-zeebe-gateway.com',
  port: 80
})
    
const { ZBClient } = require('zeebe-node')

const zbc = new ZBClient({
  basicAuth: {    
    username: 'basicAuth-username',
    password: 'basicAuth-password',
  },
  hostname: 'my-secure-zeebe-gateway.com',
  port: 80
})
    

Basic Auth with TLS

To enable Basic Auth with TLS:

import { ZBClient } from 'zeebe-node'

const zbc = new ZBClient({
  basicAuth: {    
    username: 'basicAuth-username',
    password: 'basicAuth-password',
  },
  hostname: 'my-secure-zeebe-gateway.com',
  port: 443,
  useTLS: true
})
    
const { ZBClient } = require('zeebe-node')

const zbc = new ZBClient({
  basicAuth: {    
    username: 'basicAuth-username',
    password: 'basicAuth-password',
  },
  hostname: 'my-secure-zeebe-gateway.com',
  port: 443,
  useTLS: true
})
    

Environmentalizing Basic Auth configuration

The following environment variables control Basic Auth configuration:

ZEEBE_BASIC_AUTH_USERNAME
ZEEBE_BASIC_AUTH_PASSWORD

To enable TLS on the connection:

ZEEBE_SECURE_CONNECTION=true