Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

2FA verification blocking our automation tests

Justyna Kumor November 18, 2024

Hey

I am using e2e automated tests on bitbucket and run on pipelines. There has recently been a problem with 2FA verification appearing, blocking our automation tests.

Importantly, the user for whom 2FA appears has 2FA verification disabled in his profile (Atlassian support confirmed this).

Our automation tests are running in incognito mode. The problem occurs on pipelines, but also locally when I run tests manually, also in incognito mode.

At first, I thought the problem was due to the admin having 'Org admin' permissions, but today the problem appeared on a regular user without permission of 'org admin'/'jira admin/'side admin' nor any other 'admin' - so I suppose the problem is the 'incognito' mode.

Maybe someone has met such a problem and knows a way to solve it?

3 answers

0 votes
Konrad
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 16, 2024

Hi!

@Justyna Kumor did you find a solution for this problem ?

0 votes
Lina Kuhn [TNG]
Atlassian Partner
November 19, 2024

Hi @Justyna Kumor 

We had a similar issue in our automated tests. You can try to use some OTPAuth library to fetch a totp when executing the tests and login with a second factor. However, with this approach you are somewhat limited as the tokens can only be used once but change only every X seconds, so therefore, only 1 login within a validity period. But maybe in your case this is already sufficient?

Best,
Lina

Justyna Kumor November 19, 2024

Hi!
Thanks for your reply.
That sounds interesting, I'll check it out!


Best regards,
Justyna

0 votes
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2024

Hi @Justyna Kumor 

For automation tests, use API Tokens instead of password-based authentication to eliminate interactive login

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

Justyna Kumor November 18, 2024

Hi
Thanks for your reply
I tried such a solution, unfortunately, the tests are designed in such a way that I need to hold the login state to perform the next steps of tests on the UI. I think it is possible but quite expensive because such a change in approach will result in the need for many changes in our code.
So, as a first step, I am looking for another solution. If I don't find a better solution, I suppose I will use your suggestion

Best regards,
Justyna

Like Humashankar VJ likes this
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2024

Thanks for the update !!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events