RE: Using compily.py when 2FA in enabled fails.

Dear Mars,

I hope you are doing fine.

Some time ago you enquired about using two-factor authentication with the remote compilation of the IPMC software. We are happy to tell you now that this works with 2FA. You can find the updated compile.py script in the ipmc-project repository at https://gitlab.cern.ch/ep-ese-be-xtca/ipmc-project. If you have set up your CERN access with 2FA, then you just need to add “—2fa” (or “-2”) when calling the script. It will ask then ask you for entering the one-time code. This works with an authenticator application installed on your smartphone; the code needs to be entered at every time you call the remote compilation, because no permanent session to the web application is established.

Please let me know if this works for you or if you have any question.

Cheers,

Ralf.

Hi Ralf,

Using the last tag v1.3.2 login now seems to be broken when not using 2FA:

[thompson@pcl1c-stf-dcs ipmc-project]$ python compile.py
CERN Username: thompson
CERN Password: 
LoginError: wrong ursername / password

Do we now need to use master?

Ta,

Dave

Dear Dave,

I assume you have set up 2FA for your CERN login?

You then need to specify:

python compile.py -2

We will change the default to be 2FA when all the users will have been migrated.

Cheers,

Ralf.

Hi Ralf,

I’m doing well, I hope the same for you.

Great to hear this is implemented! I tried it out today. I cloned ipmc-project and ran python3 compile.py –2fa.

I notice the code gets stuck on the below line

result = self.session.get(login_url)

Do you have an idea what the problem may be?

Kind Regards,
Mars

Hi Mars,

Thanks for your email.

I am not sure what the error you are reporting could actually mean.

Have you set up two-factor authentication with CERN? If not, then you must not use the “—2fa” flag, and it should work exactly as before.

If you have, then you should be prompted to enter the one-time code. Note, that it does not work with the Yubikey, if that is what you have set up as second factor.

If it still doesn’t work, can you send me the print out of the script?

Cheers,
Ralf.

Hi Ralf,

I tried the script again today and it worked without issue. Maybe I was unlucky that day.

Thanks for your response.

Kind Regards,
Mars Lyukova

Dear Mars,

Thanks for your feedback. Good that it works for you now.

Cheers,
Ralf.