Skip to content

Conversation

@shwstppr
Copy link
Contributor

Description

Fixes #9308

When 2FA isn't validated and completed during setup and a login request is made, this PR clears 2FA configuration to allow setting it up again.

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)
  • build/CI
  • test (unit or integration test code)

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?

How did you try to break this feature and the system with this change?

Fixes apache#9308

When 2FA isn't validated and completed during setup and a login request
is done, this PR clears 2FA configuration to allow setting it up again.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@shwstppr shwstppr linked an issue Jan 23, 2025 that may be closed by this pull request
@blueorangutan
Copy link

@shwstppr a [SL] 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.

@codecov
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 63.63636% with 8 lines in your changes missing coverage. Please review.

Project coverage is 15.15%. Comparing base (9967bb3) to head (c128b0b).
Report is 24 commits behind head on 4.19.

Files with missing lines Patch % Lines
...ma/src/main/java/com/cloud/user/UserAccountVO.java 0.00% 3 Missing ⚠️
...c/main/java/com/cloud/user/AccountManagerImpl.java 82.35% 0 Missing and 3 partials ⚠️
server/src/main/java/com/cloud/api/ApiServer.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #10247      +/-   ##
============================================
+ Coverage     15.13%   15.15%   +0.01%     
- Complexity    11274    11285      +11     
============================================
  Files          5408     5408              
  Lines        473974   473844     -130     
  Branches      57813    57826      +13     
============================================
+ Hits          71730    71804      +74     
+ Misses       394227   394013     -214     
- Partials       8017     8027      +10     
Flag Coverage Δ
uitests 4.29% <ø> (-0.01%) ⬇️
unittests 15.87% <63.63%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blueorangutan
Copy link

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

@shwstppr
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_01_secure_vm_migration Error 131.42 test_vm_life_cycle.py
test_01_secure_vm_migration Error 131.43 test_vm_life_cycle.py

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr shwstppr marked this pull request as ready for review January 27, 2025 04:51
Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland DaanHoogland added this to the 4.19.2 milestone Jan 27, 2025
@borisstoyanov borisstoyanov self-assigned this Jan 27, 2025
@borisstoyanov
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@borisstoyanov a [SL] 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.

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.

code LGTM

@blueorangutan
Copy link

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

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

LGTM, cannot reproduce with the new changes

@DaanHoogland DaanHoogland merged commit b93589b into apache:4.19 Jan 30, 2025
26 checks passed
@DaanHoogland DaanHoogland deleted the fix-2fa-setup-relogin branch January 30, 2025 14:51
rg9975 pushed a commit to rg9975/cloudstack that referenced this pull request Jan 31, 2025
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 19, 2025
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
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.

2FA is enabled even if User fails to verify with TOTP code

5 participants