TestCafe and failed login with identityserver - testcafe

I'm trying TestCafe for the first time for automating my test scenarios, and the test scenario is as follows:
1- open the website homepage
2- click on Login button
-- here the user is redirected to the identity server login page (https://id.xxxxxx/Account/Login)
3- fill in the username and password text fields and click login
-- here the user should be authenticated and redirected to the website homepage with welcome note.
the issue is that when I run the TestCafe test, the user isn't getting authenticated after login page redirection (in step 3 above).
has anybody faced this issue before and can help?

Related

Redirect to Moodle home page by skipping login

I have a customized Moodle website for which I would like to login directly without prompting the user to provide username and password in Moddle login page.
I have a third party application which uses MySQL DB and has user table in it. Moodle application also has user details available already. No need to create user from external application, just the login is sufficient. From my application, I would like to redirect to Moodle home page by skipping login page. I read about the options about CAS server and external DB authentication in Moodle. There are no clear documents about how to set his up or which option suits my scenario.
So am confused whether should I use CAS server authentication or External DB authentication?
How can I skip the login prompt and make the user login directly by utilizing the username (and not password) ?

SRSS Link Generate CSV File with username and password

We got on the report server a report that it gonna generate a CSV file. The link is:
http://reportserver/ReportServer/Pages/ReportViewer.aspx?/Reports%20Temporary/SugarAPI&acccode=ABC&rs:Format=CSV
The problem is when they click the link they got a prompt with username and password. How the username and password be embedded in the link?
Thank you!
You cannot embed username and password to the link, but if the user has permission to download report and if your users are authenticating under Domain, you can enable simple feature of Internet Explorer not to prompt password.
Go under Internet Options and Select Security Tab
Cick on Custom Level
Go to User Authentication Section
Select Automatic logon with current username and password
then users can authenticate without using username and password
If you are going to use this URI inside your backend application, SSRS has its own SOAP Services which you can use to get authenticated to report server and download CSV file.

TestCafe - User Profile and Log In

I have a scenario where I need to use the current user chrome profile. I expected that I don't need to log in to web app. I thought TestCafe would use stored credentials. But all tests are redirected to login page.
I launch testcafe tests with flag chrome:userProfile.
How could I run tests and use stored credentials in the browser?
TestCafe uses its own Roles mechanism to authenticate users. The login steps are executed only once during the first Role usage. Next time TestCafe restores the logged in user automatically.

Why does a sign-in prompt show up when I access a website over https?

I have created a website and hosted it in IIS Server on Windows Server 2012 R2. I have set the authentication to be Windows Authentication. When the user who has logged into the domain tries accessing the website, everything works fine and no prompt is shown to the user.
Now I need to serve this website over https. I have purchased the certificate and added it to the website and have set up the SSL binding. When the user tries accessing the website now (using Google Chrome), he/she gets a "Sign in" prompt like this:
Why does this happen? Is there a setting in IIS I can change so that the user is not prompted?
I cannot not find documentation from Microsoft on how is this supposed to happen but I was under impression that the browser would pass the user's credentials to the IIS server without prompting the user to enter them.
With the information from this post, I found the solution for Google Chrome (67.0.3396.99). Apparently Chrome (as well as IE) reads the settings from Internet Options in Control Panel.
Here are the steps to remove the Sign in prompt:
Go to Control Panel -> Internet Options
Go to Security tab and select Trusted sites zone:
Click Sites button and make sure that you have your website's URL added to the list. Add it if you do not see it.
Close the Trusted sites popup.
In the Internet Properties dialogue, click Custom level… button
Scroll down to User Authentication section and make sure that you have “Automatic logon with current user name and password” option selected.
Click OK button to close the security settings dialogue.
Click Yes button on the Warning popup.
Click OK button to close the Internet Properties dialogue.

How to do CAS authentication in the background (Using normal login screen) (Jasperserver)

currently if you got to the jasperserver page (nwc.ac.ba:8085/jasperserver-pro) it directs you to the CAS login (nwc.ac.ba:8443/cas-server-webapp-3.5.0/login...)
and then after the user logs in the user is directed back to the jasperserver home page
My Question is how can I keep the jasperserver login page and if the user logs the cas login will happen in the background (a.k.a username & password is sent to cas server, and then cas directs back to jasperserver)