The basic authentication handler exposes an HTTP proxy which will authenticate requests made to an arbitrary service requiring basic authentication.
type
Required
This parameter indicates the type of service proxied by the handler. For basic auth,
the value of type
should always be basic_auth
.
match
Required
An array of regex patterns which match a request URI, either partially or fully.
Requests which are matched by a regex in this array will be authenticated by
this handler.
username
Required
Username to authenticate with
password
Required
Password to authenticate with
forceSSL
Optional
Boolean; Forces connection over https if true
listeners:
- name: basic_auth_listener
protocol: http
address: 0.0.0.0:8080
handlers:
- name: basic_auth_handler
listener: basic_auth_listener
type: basic_auth
match:
- .*
credentials:
- name: username
provider: literal
id: automation
- name: password
provider: env
id: BASIC_AUTH_PASSWORD
listeners:
- name: basic_auth_listener
protocol: http
address: 0.0.0.0:8080
handlers:
- name: basic_auth_handler
listener: basic_auth_listener
type: basic_auth
match:
- ^https\:\/\/password-protected.myorg.com\/.*
credentials:
- name: username
provider: literal
id: automation
- name: password
provider: env
id: BASIC_AUTH_PASSWORD