Single Sign-On

There are many ways to login to ReportPortal from another application without having to enter the user id and password on the Login page.

  1. Easy but not secure method

    A user can bypass the login page by passing user id and password using query string parameters in the following way:

    http://MyServer/ReportPortal/login.aspx?id=admin&pw=password1
  2. Secure Method

    This method requires access to the ReportPortal database. The connection string to the database is stored in C:\Inetpub\wwwroot\ReportPortal\xmla.udl file.

    First, get the security token by running GetSecurityTokenForUser stored procedure against ReportPortal database. Here is an example of getting the token for "admin" user:

    exec GetSecurityTokenForUser 'admin'

    Here is an example of getting the token for "admin" user with password "password1":

    exec dbo.GetSecurityTokenForUserPassword 'admin', 'password1'

    Second, login to the application by passing the token via a URL, for example:

    http://MyServer/ReportPortal/login.aspx?token=69A7931B

    Or you can login by passing a cookie to the Login page, for example:

    Response.Cookies("token").Value = "69A7931B"
    Response.Redirect("http://MyServer/ReportPortal/login.aspx")
  3. Authenticating against Windows domain by using Pass-Through Authentication

    Go to Admin > Settings > Security > Enable the pass-through authentication. The Anonymous access has to be disabled for the virtual directory or the login.aspx page and Basic or Windows Authentication has to be chosen instead.

    You can see more information about Pass-Through Authentication here.

  4. Remember me on this computer method

    Go to Admin > Settings > Login and set "Remember me on this computer" value to anything other than "None". Now, when you login you will see "Remember me on this computer" option on the Login page. Next time you go to the Login page the application will log you in automatically.

    This method is less persistent than other methods because it will work only for some period of time and you will have to enter the user id and password again. However, it is easy to setup.

  5. Synch user tables method

    Have your external application insert/update ReportPortal's user table (AppUser) by calling UpdateAppUser stored procedure.

    exec UpdateAppUser 'UserName1', 'Password1', 'WindowsUserId1', 'WindowsPassword1', 'JohnSmith@gmail.com', 'John', 'Smith'

    This method requires access to the ReportPortal database. The connection string to the database is stored in C:\Inetpub\wwwroot\ReportPortal\xmla.udl file.

When the user session times out the application can redirect you to your custom Login page. Please modify the SQL below to point to your application Login page and run the SQL against the ReportPortal database.

INSERT INTO AppSettings (Param, ParamValue) VALUES ('LoginFailRedirect','https://MyServer/MyApp/Login.aspx?from=')