Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Azure SSO, Added App Pakcage & deleted duplicates. #408

Merged
merged 5 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/left-nav-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"rest-api": {
"/docs/test-cases/step-types/rest-api/": "Type: REST API",
"/docs/continuous-integration/rest-api/": "REST API(Generic)"
"/docs/continuous-integration/rest-api/": "REST API (Generic)"
},
"while-loop": {
"/docs/test-cases/step-types/while-loop/": "Type: While Loop"
Expand Down Expand Up @@ -649,5 +649,11 @@
},
"sf-test-cases":{
"/docs/salesforce-testing/sf-test-cases/": " Build Test Cases: Manual+Live"
},
"collecting-har-file": {
"/docs/troubleshooting/web-apps/collecting-har-file/": "Collecting HAR File"
},
"chrome-settings": {
"/docs/troubleshooting/web-apps/chrome-settings/": "Missing Elements in Recorder"
}
}
45 changes: 42 additions & 3 deletions src/pages/docs/api/test-plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ contextual_links:
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Test Plan - Start Test Execution API"
url: "#test-plan---start-test-execution-api"
name: "Trigger Test Plans Using API"
url: "#trigger-test-plans-using-api"
- type: link
name: "Trigger Test Plans in Different Environments"
url: "#trigger-test-plans-in-different-environments"
- type: link
name: "Obtaining the Run ID"
url: "#obtaining-the-run-id"
Expand All @@ -37,7 +40,7 @@ You can use Testsigma API to trigger test executions remotely. This is useful wh


---
## **Test Plan - Start Test Execution API**
## **Trigger Test Plans Using API**
This endpoint allows users to trigger a Test Plan execution remotely.

|**Request Type**| POST |
Expand Down Expand Up @@ -113,6 +116,41 @@ Each Test Plan Run in Testsigma has a unique Run ID. This Run ID can be used to
---


## **Trigger Test Plans in Different Environments**

To execute a test plan with different Environments, you need to have an Environment ID. You can find the Environment ID by following the steps below.

### **Get Environment ID**

1. Navigating to **Test Data > Environments**, and click on an **Environment**.


2. On the Environment page, the <ENVIRONMENT\_ID> in the URL `https://app.testsigma.com/ui/td/88/environments/<ENVIRONMENT_ID>/details` is the ID of the environment.

![Environments](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ttpuapienv.png)

- For Example, if the URL is `https://app.testsigma.com/ui/td/88/environments/10/details`, the **ID** is **10**.

### **Executing Tests Plans with Different Environments**

1. Navigate to **Test Plans > Test Plan > CI/CD Integrations**, and copy **CURL request** under **REST API to integrate with other tools > REST API call to start Test Plan**.
![CURL](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ttpuapicurl.png)

2. Provide the Environment ID in the request body.

```
curl -X POST \
-H "Content-type: application/json" \
-H "Accept:application/json" \
-H "Authorization: Bearer <API_KEY>" \
https://app.testsigma.com/api/v1/execution_results \
-d "{\"executionId\": \"301\", \"environmentId\": \"<ENVIRONMENT_ID>\"}"
```

You can execute this CURL command in your computer's command-line interface (CLI) to trigger test plan with the environment specific to the given ID.

---

## **Obtaining the Run ID**

If the Test Plan Run was started from within the Testsigma App, the Run ID can be found from the Run Results page as shown below:
Expand Down Expand Up @@ -216,3 +254,4 @@ This endpoint allows users to get details of all Test case executions using REST
|**Request Body**|<pre>{ <br> "executionId": 268,<br> "executionResultId": 986,<br> "result": "FAILURE",<br> "status": "STATUS_COMPLETED",<br> "testCases": [<br> {<br> "testCaseId": 413,<br> "testCaseName": "03 data driven small",<br> "testCaseResultId": 7975,<br> "result": "FAILURE",<br> "isDataDrivenCase": true,<br> "iterationResults": [<br> {<br> "iterationResultId": 7963,<br> "setName": "examples",<br> "result": "SUCCESS"<br> },<br> {<br> "iterationResultId": 7976,<br> "setName": "travels",<br> "result": "FAILURE"<br> },<br> {<br> "iterationResultId": 7965,<br> "setName": "examples 1",<br> "result": "FAILURE"<br> }<br> ],<br> "testSuiteId": 197,<br> "testSuiteName": "02 DD Small",<br> "testSuiteResultId": 2295,<br> "machineId": 414,<br> "machineTitle": "machine 2",<br> "machineResultId": 2370<br> }<br> ]<br> }<pre>|

---

149 changes: 72 additions & 77 deletions src/pages/docs/configuration/security/azure-sso.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Setting up SAML-based SSO login for Testsigma in Azure"
page_title: "Setting up SAML-based Single Sign-On (SSO) for Testsigma with Azure AD"
metadesc: "Learn how to enable single sign-on for Testsigma with Azure AD. "
metadesc: "Learn how to Set up SAML-based SSO login for Testsigma in Azure. With Azure Active Directory, users can automatically sign into their cloud-hosted/on-premise apps "
noindex: false
order: 19.24
page_id: "Learn how to Set up SAML-based SSO login for Testsigma in Azure. With Azure Active Directory, users can automatically sign into their cloud-hosted/on-premise apps"
page_id: "Set up SAML-based SSO login for Testsigma in Azure"
search_keyword: ""
warning: false
contextual_links:
Expand Down Expand Up @@ -38,153 +38,148 @@ You can use the Azure Active Directory Admin Center to enable single sign-on (SS


---

## **Prerequisites**

**-** Azure Account with Active Directory enabled
- Azure Account with Active Directory enabled

**-** Admin Access to Azure Account
- Admin Access to Azure Account


---
## **I. Adding Testsigma Enterprise Application**

1. Login to Azure portal using the URL : https://portal.azure.com

## **I. Adding Testsigma Enterprise Application**

You will be taken to the home page as shown below:
![Azure management portal](https://docs.testsigma.com/images/azure-sso/azure-management-portal.png)
1. Login to [Azure](https://portal.azure.com) portal.
![Azure management portal](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/mazsso.png)

2. Click the **View** button below **“Manage Azure Active Directory”.**
2. Click the **View** button below **“Manage Microsoft Entra ID”.**

3. In the Active Directory Overview page, click on **+ New application** and choose **Enterprise Application**


4. Click on **+ Create your own application**
In the overlay that opens up on the right, enter the name of the app you are integrating, i.e., *Testsigma*. Select option, **‘Integrate any other Application (Non-gallery)’** and click the **Create** button.
In the overlay that opens up on the right, enter the name of the app you are integrating, and select option, **‘Integrate any other Application (Non-gallery)’** and click the **Create** button.

![Add Testsigma in Azure AD](https://docs.testsigma.com/images/azure-sso/add-new-application-testsigma-azure-ad.png)
![Add Testsigma in Azure AD](https://docs.testsigma.com/images/azure-sso/add-new-application-testsigma-azure-ad.png)

You’ll be taken to the newly added Testsigma overview page.
You’ll be redirected to the newly added Testsigma overview page.

![Testsigma properties on Azure](https://docs.testsigma.com/images/azure-sso/Testsigma-properties.png)
![Testsigma properties on Azure](https://docs.testsigma.com/images/azure-sso/Testsigma-properties.png)

---

## **II. Adding Users to the Enterprise Application**

1. Click the **Assign users and groups card** to add the users in Azure AD to the recently added Testsigma app.
1. Click the **Assign users and groups card** to add the users in **Azure AD** to the recently added Testsigma app.

2. Click on the **+ Add user/group** on top
![Add users to enable sign on for Testsigma](https://docs.testsigma.com/images/azure-sso/add-users-azure-sso.png)
2. Click on the **+ Add user/group** on top.
![Add users to enable sign on for Testsigma](https://docs.testsigma.com/images/azure-sso/add-users-azure-sso.png)

3. In the next page, Add Assignment, click on the **None selected** link to open up the Users overlay.
![SSO enabled users for login](https://docs.testsigma.com/images/azure-sso/sso-enabled-users-list.png)
3. In the next page, **Add Assignment**, click on the **None selected** link to open up the Users overlay.
![SSO enabled users for login](https://docs.testsigma.com/images/azure-sso/sso-enabled-users-list.png)
Select the required users from the Users overlay that opens up on the right.

4. Click on the **Select** button to pick and finalize the users list. You can find the list of added Users at the left pane under Users.
4. Click on the **Select** button to pick and finalize the users list. You can find the list of added Users at the left pane under Users.

5. To add assignments to these users, click **Assign**.
5. To add assignments to these users, click **Assign**.

---

## **III. SAML Configuration on Azure in Testsigma**

1. Back in Testsigma Overview page on Azure, click option 2 i.e, **Set up single sign on**.
1. Back in Testsigma Overview page on Azure, click option 2 i.e, **Set up single sign on**.
![set up sso login for Testsigma](https://docs.testsigma.com/images/azure-sso/setup-sso-for-login.png)

2. Select the SAML authentication option.
You will be taken to the Setup Single Sign-on with SAML screen as shown below:
![SAML configuration settings for Testsigma](https://docs.testsigma.com/images/azure-sso/saml-configuration-settings.png)
2. Select the **SAML authentication** option.
You will be taken to the Setup Single Sign-on with SAML screen as shown below:
![SAML configuration settings for Testsigma](https://docs.testsigma.com/images/azure-sso/saml-configuration-settings.png)

3. Click on the Edit button on Section **1 - Basic SAML Configuration,** enter the following details, and click Save:
3. Click on the Edit button on Section **1 - Basic SAML Configuration,** enter the following details, and click Save:

&emsp; **Entity ID :** https://app.testsigma.com/saml/<id>/metadata
- **Entity ID :** https://app.testsigma.com/saml/&lt;id&gt;/metadata

&emsp; **Reply URL :** https://app.testsigma.com/saml/<id>/callback
- **Reply URL :** https://app.testsigma.com/saml/&lt;id&gt;/callback

&emsp; **Sign on URL :** (Leave it empty)
- **Sign on URL :** (Leave it empty)

&emsp; **Relay State :** https://app.testsigma.com/saml/<id>/callback
- **Relay State :** https://app.testsigma.com/saml/&lt;id&gt;/callback

&emsp; **Logout URL :** (Leave it empty)
- **Logout URL :** (Leave it empty)

[[info | NOTE:]]
|*You need to replace the **<id>** with the SAML token identifier for your account. To get your **id**, you need to follow the steps below*.

Back in your Testsigma account, navigate to **Settings > Security**. Choose the SAML card and click **Proceed**.
![Choose identity provider as SAML](https://docs.testsigma.com/images/azure-sso/choose-identity-provider-saml.png)

You will see an exclusive SAML token identifier for your account.
![Configuration id for saml configuration on Azure](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/saml.png)
| You need to replace the **&lt;id&gt;** with the SAML token identifier for your account. To get your **id**, you need to follow the steps below.
| - Back in your Testsigma account, navigate to **Settings > Security**. Choose the SAML card and click **Proceed**.
| ![Choose identity provider as SAML](https://docs.testsigma.com/images/azure-sso/choose-identity-provider-saml.png)
| - You will see an exclusive SAML token identifier for your account. \
| ![Configuration id for saml configuration on Azure](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/saml.png)

4. You need to put this identifier in place of **\<id>** in Step 3 and click Save.
4. You need to put this identifier in place of **\<id>** in Step 3 and click **Save**.
![Fill in basic configuration details for saml configuration](https://docs.testsigma.com/images/azure-sso/fill-saml-configuration-settings-basic-details.png)

5. Click on the Edit button of Section 2 - **User Attributes & Claims**. Under **Required claim**, click the Claim name/Claim value.
5. Click on the Edit button of Section 2 - **User Attributes & Claims**. Under **Required claim**, click the Claim name/Claim value.

6. In the Manage Claim page that now appears, select **Source attribute** as **user.email** from the dropdown.
![Key/value-pairs attached to the user in Azure AD](https://docs.testsigma.com/images/azure-sso/manage-claim-azure-ad.png)
6. In the Manage Claim page that now appears, select **Source attribute** as **user.userprincipalname** from the dropdown.
![Key/value-pairs attached to the user in Azure AD](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ssoazure.png)

7. Click **Save** and go back to the previous SAML-based Sign-on page.
7. Click **Save** and go back to the previous SAML-based Sign-on page.

8. Click on the Edit button for section 3 - **SAML Signing Certificate,** enter the following details, and click Save:
8. Click on the Edit button for section 3 - **SAML Signing Certificate,** enter the following details, and click Save:

&emsp; **Signing Option:** SAML response and assertion
- **Signing Option:** SAML response and assertion

&emsp; **Signing Algorithm:** SHA-256
- **Signing Algorithm:** SHA-256

That's all the configuration you need to perform on Azure App for SAML-based Sign-on.
That's all the configuration you need to perform on Azure App for SAML-based Sign-on.


9. Now, navigate back to the SAML Sign-on page
Download the XML file, **‘Federation Metadata XML’** by clicking the **Download** link under Section 3 - SAML Signing Certificate.
![downloaded SAML certificate](https://docs.testsigma.com/images/azure-sso/download-saml-certificate.png)
9. Now, navigate back to the SAML Sign-on page
Download the XML file, **‘Federation Metadata XML’** by clicking the **Download** link under Section 3 - SAML Signing Certificate.
![Downloaded SAML certificate](https://docs.testsigma.com/images/azure-sso/download-saml-certificate.png)


10. Open the XML File and copy the value under the key **EntityDescriptor > Signature > KeyInfo > X509Data > X509Certificate**
![downloaded SAML certificate](https://docs.testsigma.com/images/azure-sso/downloaded-saml-certificate.png)
10. Open the XML File and copy the value under the key **EntityDescriptor > Signature > KeyInfo > X509Data > X509Certificate**
![Downloaded SAML certificate](https://docs.testsigma.com/images/azure-sso/downloaded-saml-certificate.png)


You can just search for **\<X509Certificate>** and copy the value between first occurrence of **\<X509Certificate>** and **\<X509Certificate>**
You can just search for **\<X509Certificate>** and copy the value between first occurrence of **\<X509Certificate>** and **\<X509Certificate>**

11. Note down the following values from **Section 4 - Set Up Testsigma App**.
11. Note down the following values from **Section 4 - Set Up Testsigma App**.
- **Azure AD Identifier**
- **Login URL**

&emsp; **Azure AD Identifier**

&emsp; **Login URL**

We will use the **X509Certificate** value, also the values above in Testsigma app in the next section.
We will use the **X509Certificate** value, also the values above in Testsigma app in the next section.

---

## **IV. Azure Specific SAML Configuration in Testsigma**

Inside your Testsigma account, navigate to **Settings>Security**
1. Click **Proceed** under SAML

Enter the following details:
1. Click **Proceed** under **SAML** and enter the following details:
- **Entity ID:** Same as **Microsoft Entra Identifier** (obtained from Section 4 in Azure SAML Setup page)
- **SSO URL:** Same as **Login URL** (obtained from Section 4 in Azure SAML Setup page)
- **SAML certificate:** Downloaded **\<X509Certificate>** value (obtained in previous section from downloaded XML file).
This value resides within the tag: **\<X509Certificate>\<X509Certificate>** Paste this value.

![Azure Specific SAML Configuration On Testsigma](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/mazcreds.png)

* **Entity ID:** same as **Azure AD Identifier** (obtained from Section 4 in Azure SAML Setup page)
* **SSO URL:** same as **Login URL** (obtained from Section 4 in Azure SAML Setup page)
* **SAML certificate:** downloaded **\<X509Certificate>** value (obtained in previous section from downloaded XML file).
This value resides within the tag: **\<X509Certificate>\<X509Certificate>**
Paste this value.
![Azure Specific SAML Configuration On Testsigma](https://docs.testsigma.com/images/azure-sso/azure-saml-configuration-testsigma.png)

<br>

2. Click the **Confirm** button to finalize the changes.

SAML will now be enabled,
2. Click the **Confirm** button to finalize the changes. SAML will now be enabled.

Let’s test the SSO.

---

## **V. Test the SAML Config**

1. On Section 5 of the Single Sign-On option, you will find the option to test. Click
**Test**.
1. On Section 5 of the Single Sign-On option, you will find the option to test. Click **Test**.

2. To test the sign-in, click on the **‘Sign in as current user’** option.
2. To test the sign-in, click on the **‘Sign in as current user’** option.

This will test the SAML-based login with the currently logged-in user.
![Test Testsigma SIngle Sign On](https://docs.testsigma.com/images/azure-sso/test-testsigma-sso.png)
![Test Testsigma Single Sign On](https://docs.testsigma.com/images/azure-sso/test-testsigma-sso.png)

This will automatically log you into Testsigma.

This will automatically log you into Testsigma.
---
Loading
Loading