-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #23234: Hash API tokens (#4971)
- Loading branch information
Showing
21 changed files
with
325 additions
and
112 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"@redocly/cli": "^1.0.0" | ||
"@redocly/cli": "^1.0.2" | ||
} | ||
} | ||
} |
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 9 additions & 20 deletions
29
webapp/sources/api-doc/components/securitySchemes/token.yml
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 |
---|---|---|
@@ -1,26 +1,15 @@ | ||
# SPDX-License-Identifier: CC-BY-SA-2.0 | ||
# SPDX-FileCopyrightText: 2013-2020 Normation SAS | ||
"API-Tokens": | ||
description: >- | ||
Apart for the status API, authenticating is mandatory for every request, as sensitive information like inventories or configuration rules may get exposed. | ||
It is done using a dedicated API account, than can be created in the web interface on the 'API accounts' page located inside the Administration part. | ||
![API Tokens settings](assets/APISettings.png "API tokens settings") | ||
API accounts are not linked to standard user accounts, and currently give full administrative privileges: they must be secured adequately. | ||
Once you have created an API account, you get a token that will be needed to authenticate every request. This token is the API equivalent of a password, and must | ||
be secured just like a password would be. | ||
On any call to the API, you will need to add a **X-API-Token** header to your request to authenticate: | ||
curl --request GET --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules | ||
If you perform any action (creation, update, deletion) using the API, the event log generated will record the API account as the user. | ||
description: > | ||
This request must be authenticated with a valid API token passed in a `X-API-Token` header, | ||
like in: | ||
```bash | ||
curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules | ||
``` | ||
See the [authentication section](#section/Introduction/Authentication) for details. | ||
type: apiKey | ||
in: header | ||
name: X-API-Token |
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
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
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
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
Oops, something went wrong.