Skip to content
Snippets Groups Projects

Use secure defaults for token storage in TokenAuthenticatable

Merged Rohit Shambhuni requested to merge 519551-secure-defaults into master

What does this MR do and why?

Use a secure default for token storage in TokenAuthenticatable.

The current default in TokenAuthenticatable if encrypted or digest storage strategies are not mentioned is insecure storage. 4 token types - Health check access token, SAML discovery token, Incoming email token and Feed token do not describe any storage strategy when add_authentication_token_field is called, so these 4 tokens are stored in plain text (as-is) in the database.

This MR is about changing the default in TokenAuthenticatable from from insecure to digest as a security best practice, thus this change in lib/authn/token_field/base.rb.

As @rymai mentioned here, we need to introduce an explicit insecure: true to the 4 four tokens that implicitly use it now, to not break them. The work to move these tokens from insecure to encrypted or digest storage is happening in different issues (see below) and is outside the scope of this MR.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #519551 (closed) and Align TokenAuthenticatable with security best p... (&16713).

Edited by Rohit Shambhuni

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading