-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document upstream basic authentication
- Loading branch information
1 parent
de98886
commit c8718c7
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...ic-config-and-security/security/upstream-authentication/basic-authentication.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Upstream Basic Authentication | ||
tags: ["upstream-basic-auth"] | ||
description: "How to authenticate upstream requests with basic authentication" | ||
menu: | ||
main: | ||
parent: "Upstream Authentication" | ||
weight: 2 | ||
--- | ||
|
||
If your upstream API is protected with basic authentication, you can configure Tyk to send requests with basic authentication credentials. | ||
|
||
- You can specifiy username and password to be used. | ||
- You can configure the header in which basic authenticaiton credentials are to be sent, the default header to be used is `Authorization`. | ||
|
||
|
||
## How To Set Up | ||
|
||
### Via API Definition | ||
|
||
Inside your OAS API definition you should configure `x-tyk-api-gateway.upstream.authentication.basicAuth` field. | ||
- `enabled` needs to be true to enable upstream basic authentication. | ||
- `headerName` is the header to be used. | ||
- `username` is the username to be used. | ||
- `password` is the password to be used. | ||
|
||
``` | ||
{{< note success >}} | ||
**Note** | ||
`x-tyk-api-gateway.upstream.authentication.enabled` needs to be true to enable upstream authentication. | ||
If the configured `headerName` is also sent from clientside, Tyk will replace it with basic auth credentials before sending it to upstream. | ||
{{< /note >}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters