- policyRef:
name: credential-injection-basic-auth-flex
config:
username: <string> // OPTIONAL
password: <string> // OPTIONAL
overwrite: <boolean> // OPTIONAL
customHeader: <string> // OPTIONAL
Credential Injection Basic Authentication Policy
Policy Name |
Credential Injection Basic Authentication |
Summary |
Injects a basic authorization header into outgoing requests |
Category |
Security |
First Flex Gateway version available |
v1.9.0 |
Returned Status Codes |
No return codes exist for this policy. Error codes are returned from the upstream service. |
Summary
The Credential Injection Basic Authentication policy injects an Authorization header containing a username and password into outbound requests. The policy ensures that requests sent from Flex Gateway to an upstream service include the correct authentication headers. The Authorization header format is Authorization: Basic <username:password>.
The policy follows Basic HTTP authentication standards.
When an error occurs, the policy returns a WWW-Authenticate HTTP header field.
Configuring Policy Parameters
Flex Gateway Local Mode
When you apply the policy via declarative configuration files, Refer to the following policy definition and table of parameters:
| Parameter | Required or Optional | Default Value | Description |
|---|---|---|---|
|
Optional |
N/A |
The username for the basic authentication credentials. |
|
Optional |
N/A |
The password for the basic authentication credentials. |
|
Optional |
true |
When enabled, if the |
|
Optional |
N/A |
When configured, a custom header is injected instead of the |
Managed Flex Gateway and Flex Gateway Connected Mode
When you apply the policy from the UI, the following parameters are displayed:
| Parameter | Description | Required? |
|---|---|---|
Username |
The username for the basic authentication credentials. |
Optional |
Password |
The password for the basic authentication credentials. |
Optional |
Overwrite header |
When enabled, if the |
Optional |
Custom Header |
When configured, a custom header is injected instead of the |
Optional |



