Skip to content
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

prevent remember_token timing attacks #917

Merged

Commits on Nov 29, 2020

  1. prevent remember_token timing attacks

    * see thoughtbot#916
    * similar to thoughtbot#909
    * also see GHSA-hrqr-hxpp-chr3
      for an example of the type of attack that could be possible with an
      injectable cookie value
    * Rails provides signed cookies https://api.rubyonrails.org/classes/ActionDispatch/Cookies.html
      since Rails 3 (??) which prevents tampering
    * using a signed cookie instead of a plain one, means the attacker cannot
      forge the cookie value, and therefore cannot perform timing attacks
      to find a valid token
    * another added value is that tampering with the cookie will
      not even hit the database
    * added a configuration parameter `signed_cookie` so this is optional
      and defaults to false for backwards compatibility
      (however, for better security, it might be better to issue a breaking
       change and default to true)
    * changed the add_cookies_to_headers method to use ActionDispatch /
      Rails' cookie-handling code to set the cookie
    * updated specs
    Yoav Aner committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    364d6ea View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2020

  1. adding 3-state signed_cookie option

    * the configuration value for signed_cookie can be set 3-ways:
      - `false` (default): backwards compatible, insecure
      - `:migrate`: converts unsigned cookies to signed ones
      - `true`: forces using signed cookies only
    * these 3 options would allow users to transition to signed cookies
      and also the project to gradually change the default
    * updated specs + added "validation" inside the configuration class
      to allow only those 3 values
    Yoav Aner committed Dec 1, 2020
    Configuration menu
    Copy the full SHA
    e01ff06 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2020

  1. Configuration menu
    Copy the full SHA
    4843780 View commit details
    Browse the repository at this point in the history
  2. Update lib/clearance/configuration.rb

    Co-authored-by: Eebs Kobeissi <[email protected]>
    gingerlime and eebs authored Dec 22, 2020
    Configuration menu
    Copy the full SHA
    4ddb749 View commit details
    Browse the repository at this point in the history
  3. applied suggestion

    Yoav Aner committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    f3316ad View commit details
    Browse the repository at this point in the history
  4. Merge branch 'prevent_remember_token_timing_attacks' of github.com:gi…

    …ngerlime/clearance into prevent_remember_token_timing_attacks
    Yoav Aner committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    237a9fd View commit details
    Browse the repository at this point in the history
  5. styleguide

    Yoav Aner committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    aa17b92 View commit details
    Browse the repository at this point in the history
  6. styleguide

    Yoav Aner committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    28898ca View commit details
    Browse the repository at this point in the history
  7. styleguide

    Yoav Aner committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    e6864d0 View commit details
    Browse the repository at this point in the history
  8. styleguide

    Yoav Aner committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    86eda14 View commit details
    Browse the repository at this point in the history
  9. workaround for styleguide issue

    Yoav Aner committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    2b74280 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2021

  1. Merge branch 'master' of https://github.com/thoughtbot/clearance into…

    … prevent_remember_token_timing_attacks
    Yoav Aner committed Jan 19, 2021
    Configuration menu
    Copy the full SHA
    566cfb8 View commit details
    Browse the repository at this point in the history