Skip to content

Deploy RC 66 to staging#2508

Merged
stevegsa merged 91 commits intostages/stagingfrom
stages/rc-2018-09-13
Sep 11, 2018
Merged

Deploy RC 66 to staging#2508
stevegsa merged 91 commits intostages/stagingfrom
stages/rc-2018-09-13

Conversation

@stevegsa
Copy link
Copy Markdown
Contributor

@stevegsa stevegsa commented Sep 11, 2018

Hi! Before submitting your PR for review, and/or before merging it, please
go through the checklists below. These represent the more critical elements
of our code quality guidelines. The rest of the list can be found in
CONTRIBUTING.md

Controllers

  • When adding a new controller that requires the user to be fully
    authenticated, make sure to add before_action :confirm_two_factor_authenticated
    as the first callback.

Database

  • Unsafe migrations are implemented over several PRs and over several
    deploys to avoid production errors. The strong_migrations gem
    will warn you about unsafe migrations and has great step-by-step instructions
    for various scenarios.

  • Indexes were added if necessary. This article provides a good overview
    of indexes in Rails.

  • Verified that the changes don't affect other apps (such as the dashboard)

  • When relevant, a rake task is created to populate the necessary DB columns
    in the various environments right before deploying, taking into account the users
    who might not have interacted with this column yet (such as users who have not
    set a password yet)

  • Migrations against existing tables have been tested against a copy of the
    production database. See LG-228 Make migrations safer and more resilient #2127 for an example when a migration caused deployment
    issues. In that case, all the migration did was add a new column and an index to
    the Users table, which might seem innocuous.

Encryption

  • The changes are compatible with data that was encrypted with the old code.

Routes

  • GET requests are not vulnerable to CSRF attacks (i.e. they don't change
    state or result in destructive behavior).

Session

  • When adding user data to the session, use the user_session helper
    instead of the session helper so the data does not persist beyond the user's
    session.

Testing

  • Tests added for this feature/bug
  • Prefer feature/integration specs over controller specs
  • When adding code that reads data, write tests for nil values, empty strings,
    and invalid inputs.

jgsmith-usds and others added 30 commits August 27, 2018 11:20
**Why**:
Fasterer is one of our linters to make sure we
are writing efficient code.

**How**:
Rather than make a method that returns the value
of an instance attribute, we use an attribute reader.
**Why**:
We want to start with the right set of vendors for
proofing.

**How**:
We initialize `@vendor` to `nil` rather than a truthy
value.
Fix Idv::Proofer vendor initialization
Int: Fix Idv::Proofer vendor initialization
**Why**:
Sometimes, we have an anonymous user. They don't have
any configured phones.

**How**:
Add a method that returns `nil`
**Why**:
Sometimes our gem bundle isn't in sync when we fetch the most
recent `master` of `identity-devops`. This fixes that.

**How**:
Run `bundle install` after fetching the most recent `master` of
`identity-devops`
Run `bundle install` in devops repo when releasing
…ymous-user

Add nil phone_configuration to anonymous user
**Why**: We want a table to hold configurations for webauthn as a second factor for users.

**How**: Create a new table with a one to many from users.  Store the public_key with each configuration and create a unique index on user_id + public_key
…ions-table

LG-597 Create WebAuthn Configurations Table
**Why**:
The migration fails because the `references` keyword creates an
index, so we don't need to call the index creation independently.
Doing so causes the migration to fail.

**How**:
Remove the offending line.
…-in-webauthn-configurations

Remove dup webauthn_configurations index creation
**Why**: To make it more consistent with other controllers and ensure
all desired analytics are properly captured.

**How**:
- Use service objects to validate the granted token, capture analytics,
and process the account deletion
- Fix the link to create a new account to point to the email sign up
page instead of the home page
- Remove unnecessary token param from `delete_account/show` view
- Move localizations out of Devise and into the `errors` file
- Update controller specs to test all analytics and before_action
- Update feature spec to test that the deletion confirmation email is
sent
…erer

Make user_access_key_overrides fasterer
**Why**: To prevent a 500 error when a user visits the
`/account_reset/confirm_request` path while signed out
Take into account nil user in SmsLoginOptionPolicy
…00-error

Fix failure screens throwing 500 error with failure_to_proof_url
**Why**:
A user can go from no phone to a phone, and this fixes an infrequent
exception around that.

**How**:
Move the formatting to the phone configuration model for this case
and only call it if we have a phone configuration.
…-phone-configuration

Catch no method error in formatted phone
**Why**: So the exception notifier doesn't raise an error and to allow
the full log to be generated.
**Why**: I originally created this PR to address a performance issue
flagged by the `fasterer` gem, which said to use `attr_reader` instead
of an ivar for `personal_key`, but then I noticed that we're not even
using that method except for in some specs, so I removed it and updated
the specs to use `encrypted_recovery_code_digest` instead.
Refactor AccountReset::DeleteAccountController
Allow full exception logs for users without phone
Remove unused personal_key method
**Why**: To make it easier and faster to test with users who use an
authentication app only.

**How**:
- Update dev:rake task to create a TOTP user
- Prefill the TOTP code for that user
**Why**: We are no longer reading form these columns in favor of
encrypted_recovery_code_digest
**Why**: The otp verification controller serves multiple puprose, phone
confirmation during sign up, sign in, edit phone, and idv. As a result
the logic is very complex and error prone. This commit creates a
separate controller specific for the IdV phone OTP confirmation since it
differs a good bit from the other use cases for phone confirmation.
monfresh and others added 26 commits September 7, 2018 15:35
LG-643 Add timeout to Twilio API calls
* [LG-574] make phone_configuration plural

**Why**: We want to support multiple phone numbers. This is
an intermediate step in that direction.

**How**: We go through and look for all the places we call
phone_configuration. We pluralize and try to see if we're
asking a question about the collection or a particular one.
**Why**: So we can support strong authentication via hardware security keys as a new 2FA option

**How**: Update the accounts page to list a user's webauthn configurations. Add new styling.
Revert changes to `find_with_email `
Update Reek from 4.8.1 to 5.0.2
**Why**: During LOA1 account creation, the user is given their personal
key after setting up 2FA. However, once an LOA3 user passes the
verification steps, and after they are prompted for their password in
order to encrypt their data, they must receive a new personal key.
In order to provide a better account creation experience for LOA3 users,
we only show them the personal key once, instead of once after 2FA
setup, and then again after verification.

This was working as expected for users who used a phone for 2FA, but the
logic for authentication app users was wrong.
This reverts commit a14b890.

We reverted #2351 over a month ago to give agencies a chance to provide
their logout redirect URIs. We gave them a deadline of August 23, which
has passed two weeks ago.
…ns-for-a-user

LG-598 LG-600 List/delete webauthn configurations for a user
LG-610 Don't show recovery code before IdV flow
**Why**: Figaro prefers strings for the config values and will convert the booleans into strings. This reduces confusion.
@stevegsa stevegsa merged commit 2c737d5 into stages/staging Sep 11, 2018
@mitchellhenke mitchellhenke deleted the stages/rc-2018-09-13 branch December 28, 2021 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants