Skip to content

Commit

Permalink
Always use 2SV, not 2FA
Browse files Browse the repository at this point in the history
We currently use a mixture of 2FA, 2SV, 2-factor authentication and
2-step verification to refer to the same thing.

This ensures we are always using 2SV or 2-step verification.
  • Loading branch information
brucebolt committed Feb 16, 2023
1 parent c93e33e commit a070984
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Signon

Signon is a centralised OAuth2 based single sign-on provider for GDS services that provides username/password and 2-Factor authentication.
Signon is a centralised OAuth2 based single sign-on provider for GDS services that provides username/password and 2-step verification.

## Technical documentation

Expand Down
4 changes: 2 additions & 2 deletions test/integration/change_user_role_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def sign_in_as_and_edit_user(sign_in_as, user_to_edit)
end

context "when logged in as a super admin" do
should "be able to change the role of a user who has no 2fa exemption reason" do
should "be able to change the role of a user who has no 2SV exemption reason" do
user = create(:user)
sign_in_as_and_edit_user(@super_admin, user)

Expand All @@ -23,7 +23,7 @@ def sign_in_as_and_edit_user(sign_in_as, user_to_edit)
assert user.reload.admin?
end

should "not be able to change the role of a user who has a 2fa exemption reason" do
should "not be able to change the role of a user who has a 2SV exemption reason" do
user = create(:two_step_exempted_user)
sign_in_as_and_edit_user(@super_admin, user)

Expand Down
32 changes: 16 additions & 16 deletions test/integration/managing_two_step_verification_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class ManagingTwoStepVerificationTest < ActionDispatch::IntegrationTest
@super_admin = create(:superadmin_user)
end

should "be able to send a notification to a user to set up 2fa" do
admin_can_send_2fa_email(@super_admin, @user)
should "be able to send a notification to a user to set up 2SV" do
admin_can_send_2sv_email(@super_admin, @user)
end

should "be able to unset the requirement for 2fa" do
should "be able to unset the requirement for 2SV" do
admin_can_remove_2sv_requirement_without_notifying_user(@super_admin, @user)
end

Expand Down Expand Up @@ -59,11 +59,11 @@ class ManagingTwoStepVerificationTest < ActionDispatch::IntegrationTest
@admin = create(:admin_user)
end

should "be able to send a notification to a user to set up 2fa" do
admin_can_send_2fa_email(@admin, @user)
should "be able to send a notification to a user to set up 2SV" do
admin_can_send_2sv_email(@admin, @user)
end

should "be able to unset the requirement for 2fa" do
should "be able to unset the requirement for 2SV" do
admin_can_remove_2sv_requirement_without_notifying_user(@admin, @user)
end

Expand All @@ -77,19 +77,19 @@ class ManagingTwoStepVerificationTest < ActionDispatch::IntegrationTest
@super_org_admin = create(:super_org_admin, organisation: @user.organisation)
end

should "be able to send a notification to a user to set up 2fa" do
admin_can_send_2fa_email(@super_org_admin, @user)
should "be able to send a notification to a user to set up 2SV" do
admin_can_send_2sv_email(@super_org_admin, @user)
end

should "be able to unset the requirement for 2fa" do
should "be able to unset the requirement for 2SV" do
admin_can_remove_2sv_requirement_without_notifying_user(@super_org_admin, @user)
end

should "be able to send a notification to a user in a child organisation to set up 2fa" do
admin_can_send_2fa_email(@super_org_admin, @user_in_child_organisation)
should "be able to send a notification to a user in a child organisation to set up 2SV" do
admin_can_send_2sv_email(@super_org_admin, @user_in_child_organisation)
end

should "be able to unset the requirement for 2fa for a user in a child organisation" do
should "be able to unset the requirement for 2SV for a user in a child organisation" do
admin_can_remove_2sv_requirement_without_notifying_user(@super_org_admin, @user_in_child_organisation)
end

Expand All @@ -111,11 +111,11 @@ class ManagingTwoStepVerificationTest < ActionDispatch::IntegrationTest
@org_admin = create(:organisation_admin, organisation: @user.organisation)
end

should "be able to send a notification to a user to set up 2fa" do
admin_can_send_2fa_email(@org_admin, @user)
should "be able to send a notification to a user to set up 2SV" do
admin_can_send_2sv_email(@org_admin, @user)
end

should "be able to unset the requirement for 2fa" do
should "be able to unset the requirement for 2SV" do
admin_can_remove_2sv_requirement_without_notifying_user(@org_admin, @user)
end

Expand All @@ -133,7 +133,7 @@ class ManagingTwoStepVerificationTest < ActionDispatch::IntegrationTest
end

context "when logged in as a normal user" do
should "not be able to view any 2fa actions" do
should "not be able to view any 2SV actions" do
non_admin_user = create(:user, organisation: @user.organisation)
sign_in_as_and_edit_user(non_admin_user, @user)

Expand Down
2 changes: 1 addition & 1 deletion test/support/managing_two_sv_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def mandate_2sv_for_exempted_user
click_button "Update User"
end

def admin_can_send_2fa_email(admin, user)
def admin_can_send_2sv_email(admin, user)
sign_in_as_and_edit_user(admin, user)

assert page.has_text? "2-step verification not set up"
Expand Down

0 comments on commit a070984

Please sign in to comment.