Permits to only support login via hashed API tokens #1975
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
API tokens have already been deprecated for some time. Still some legacy systems need to support this approach. However, some systems now at least only rely in hashed tokens, which are way more secure as simply accepting a plaintext token which is also stored as plaintext in the DB.
Therefore, we now permit a more fine grained control over how kind of API tokens and authentication can be used.
Within the system config, next to "accept-api-tokens" one can also specify "accept-hashed-api-tokens". The former controls whether plaintext API keys can be used "just like a password" and the latter controls if a properly hashed version of the token is accepted. These two flags operate independently of each other.
NOTE: If "accept-api-tokens" was / is enabled, please review carefully, if now "accept-hashed-api-tokens" should be enabled, and also, if "accept-api-tokens" could be disabled after this change.
Description
Additional Notes
Checklist