Basic Authentication - HTTP(S)

The basic auth HTTP service connector exposes an HTTP proxy, which authenticates requests made to an arbitrary service that requires basic authentication.

Service Parameters

  • authenticateURLsMatching
    Required
    An array of regex patterns that match a request URI, either partially or fully. Requests matched by a regex in this array are authenticated by this connector.

Credentials

  • username
    Required
    The username you'll use to authenticate.

  • password
    Required
    The password you'll use to authenticate.

  • forceSSL
    Optional
    Boolean — if forceSSL=true the connection is forced over HTTPS.

Examples

Authenticates all requests proxied through this service connector

 
                            
version: "2"
services:
  http_basic_auth:
    connector: basic_auth
    listenOn: tcp://0.0.0.0:8080
    credentials:
      username: automation
      password:
        from: env
        get: BASIC_AUTH_PASSWORD
    config:
      authenticateURLsMatching:
        - .*
                        

Authenticate requests to a particular hostname

 
                            
version: "2"
services:
  http_basic_auth:
    connector: basic_auth
    listenOn: tcp://0.0.0.0:8080
    credentials:
      username: automation
      password:
        from: env
        get: BASIC_AUTH_PASSWORD
    config:
      authenticateURLsMatching:
        - ^https\:\/\/password-protected.myorg.com\/.*