-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TT-13186/TT-13275/TT-13331] document upstream basic authentication #5566
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,33 @@ | ||||||
--- | ||||||
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. | ||||||
- `header.name` is the custom header to be used, defaults to `Authorization` | ||||||
- Please note that `header.enabled` needs to be true to use a custom header name specified in `header.name` | ||||||
- `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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a prerequisite, |
||||||
|
||||||
If the configured `header.name` is also sent from clientside, Tyk will replace it with basic auth credentials before sending it to upstream. | ||||||
{{< /note >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.