The Basic Authorization policy follows the RFC-7617 standard. From the standard, if a user agent wanted to send the user-id “Aladdin” and password “open sesame”, it would use the following HTTP header.
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
In order to use the Basic Authorization policy, consumers must be created and
basic-auth credentials created for them.
policies: - basic-auth # other policies
pipelines: pipeline1: apiEndpoints: - authorizedEndpoint policies: - basic-auth: - proxy: action: serviceEndpoint: backend
You can use cURL to test that the policy is working correctly:
curl -H "Authorization: Basic base64encoded(username:password)" https://gatewayurl/api/testEndpoint
Note: Make sure to replace the
base64encoded(username:password) with the correct data generated by the gateway.
- determines whether the gateway should execute the successive policy in case the auth process fails. If set to false,
the gateway will return an
- default value:
- determines whether the gateway should execute the successive policy in case the auth process fails. If set to false, the gateway will return an