Using Selenium with C# and Continuous Integration for a Web App requiring SSO (single sign on)

Viewed 140

The web app I want to test require my company Single Sign On to access it. I have a Selenium C# scenario with ChromeDriver, I would like to execute in my continuous integration system (separate servers). It won't work because of single sign on. We have a 2 factors authentication policy so I can't even automate the authentication SSO part with selenium and I want to avoid storing a SSO password on my CI server.

Locally I bypass by using my local chrome options:

 ChromeOptions chroptions = new ChromeOptions();
 chroptions.AddArguments("--noerrdialogs");
 chroptions.AddArguments(@"user-data-dir=C:\Users\" + currentUser + @"\AppData\Local\Google\Chrome\User Data");
 chroptions.AddAdditionalCapability("useAutomationExtension", false);
 chroptions.AddArgument("no-sandbox");

I know I could also just use a saved cookie (an the 2 factor security will still be an issue) but I will face the same problem. Also for security it will expire after a time, so I would like to have a more reliable solution for Continuous Integration. I know without knowing the details of my SSO it's difficult but did anyone encounter this situation and solve it ? (SSO and 2 factors authentication is more and more common)

Lionel

0 Answers
Related