3. Security and Validation

basicAuthentication

Version

Blocks requests which do not have the correct RFC 1945 basic authentication credentials (HTTP header "Authentication: Basic ....").

Syntax

basicAuthentication:
'$ref': <string>
cachingUserDataProvider: {}
customStatementJdbcUserDataProvider: {}
htpasswdFileProvider: {}
jdbcUserDataProvider: {}
ldapUserDataProvider: {}
removeAuthorizationHeader: <boolean>
staticUserDataProvider: {}
unifyingUserDataProvider:
- <userDataProviders>
users:
- <staticUserDataProvider-user>
basicAuthentication:
  '$ref': <string>
  cachingUserDataProvider: {}
  customStatementJdbcUserDataProvider: {}
  htpasswdFileProvider: {}
  jdbcUserDataProvider: {}
  ldapUserDataProvider: {}
  removeAuthorizationHeader: <boolean>
  staticUserDataProvider: {}
  unifyingUserDataProvider:
    - <userDataProviders>
  users:
    - <staticUserDataProvider-user>

Sample

<serviceProxy>
<basicAuthentication>
<user name="admin" password="adminadmin" />
<user name="guest" password="guestguest" />
</basicAuthentication>
<target host="www.predic8.de" />
</serviceProxy>
<serviceProxy>
  <basicAuthentication>
    <user name="admin" password="adminadmin" />
    <user name="guest" password="guestguest" />
  </basicAuthentication>
  <target host="www.predic8.de" />
</serviceProxy>

Attributes

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
removeAuthorizationHeaderfalsetrueRemoves the Authorization header after successful authentication.

Default is true to prevent credentials from being forwarded to backends. Set to false if both gateway and backend need to validate credentials.

-

Child Structure

ElementCardinalityDescription
cachingUserDataProvider0..1Caching User Data provider caches previous successful logins in order to make authentication faster
customStatementJdbcUserDataProvider0..1
htpasswdFileProvider0..1A user data provider utilizing htpasswd-style files.
jdbcUserDataProvider0..1
ldapUserDataProvider0..1A user data provider querying an LDAP server to authorize users and retrieve attributes.
staticUserDataProvider0..1A user data provider listing all user data in-place in the config file.
userDataProviders0..*
staticUserDataProvider-user0..*A list of username/password combinations to accept.

Can be used in