Skip to content

Conversation

@winterhazel
Copy link
Member

Description

During the 2FA setup, the user must input a code in order to verify the configuration. If the user inserts the wrong code, an error message is shown; however, 2FA still gets enabled.

This PR fixes this behavior and prevents 2FA from becoming enabled if the user inserts the wrong code.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

In a local lab:

  • In a user of the root admin account, I opened the 2FA setup, selected static PIN, provided the wrong PIN and verified that 2FA did not get enabled;
  • In a user of the root admin account, I opened the 2FA setup, selected static PIN, provided the correct PIN and verified that 2FA was enabled;
  • In a user of a non-admin account belonging to domain test/test2, I opened the 2FA setup, selected static PIN, provided the wrong PIN and verified that 2FA did not get enabled.
  • In a user of a non-admin account belonging to domain test/test2, I opened the 2FA setup, selected static PIN, provided the correct PIN and verified that 2FA was enabled.

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #7972 (e1501ad) into 4.18 (9c9b178) will not change coverage.
Report is 1 commits behind head on 4.18.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##               4.18    #7972   +/-   ##
=========================================
  Coverage     13.06%   13.06%           
  Complexity     9102     9102           
=========================================
  Files          2720     2720           
  Lines        257469   257469           
  Branches      40146    40146           
=========================================
  Hits          33638    33638           
  Misses       219605   219605           
  Partials       4226     4226           
Files Changed Coverage Δ
...c/main/java/com/cloud/user/AccountManagerImpl.java 20.47% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7059

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-7691)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44451 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7972-t7691-kvm-centos7.zip
Smoke tests completed. 107 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_11_destroy_ssvm Failure 910.80 test_ssvm.py

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@rohityadavcloud rohityadavcloud added this to the 4.18.2.0 milestone Sep 23, 2023
@rohityadavcloud
Copy link
Member

ping @harikrishna-patnala can you review this?

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, code LGTM

@harikrishna-patnala
Copy link
Contributor

reproduced the issue and verified the fix, it is looking good. Thanks @rohityadavcloud

@DaanHoogland DaanHoogland merged commit ef74221 into apache:4.18 Sep 26, 2023
@GutoVeronezi
Copy link
Contributor

Thanks for the fix, @winterhazel.

shwstppr pushed a commit to shapeblue/cloudstack that referenced this pull request Oct 12, 2023
rohityadavcloud pushed a commit to shapeblue/cloudstack that referenced this pull request Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants