Feature Availability: Version 5.0
If the application you are testing is set up for AWS multi-factor authentication, follow the steps in this article to allow automation logic to acquire verification code when the test is running. The login user id which is used in your test cases should be configured for MFA authentication as described in this article.
Setting up AWS MFA for the test user-id
-
Log in to AWS and navigate to Identity and Access Management (IAM) dashboard as shown below
- Navigate to the Users section from the left-nav and create a new user or choose an existing user to set up MFA. This is the user id you will use to login into your test application.
- Select the required user and navigate to the Security Credentials tab.
Note: if you are choosing an existing user with MFA already enabled then, the MFA device has to be removed. Follow the steps here. Else, proceed to step #4 below.
-
- Click manage link for Assigned MFA Device field
- Choose Remove option and click Remove button
- Click manage link for Assigned MFA Device field
-
- Click Manage link for Assigned MFA Device field
- Choose the Virtual MFA Device option and click Continue
- Install any AWS supported Virtual MFA Application on your smartphone (Microsoft Authenticator, Google Authenticator, etc)
- Click the Show QR Code link and Scan the QR code with your Authenticator App installed on your smartphone to register the MFA with your App.
- Click Show secret key link
- Copy and store the Secret key. We will need this secret key later to be used in the Action logic.
- Type 2 consecutive MFA codes from the Authenticator App installed on your mobile and click Assign MFA Button
Extracting verification code in Action logic
When the application-under-test is set up for multi-factor authentication, you will need to enter a verification code as part of the login process. When you write the logic for Login Action in ACCELQ, insert statements to find and use security code as demonstrated below.
Command: Generate MFA Token from Key
In this command, you will utilize the security key saved in the setup steps. This parameter is encrypted as you type into your Action logic, and hence secure.
In the example below, a typical login process is followed by extraction of the verification code and then applying this code in the application field.
Comments
0 comments
Please sign in to leave a comment.