Repository navigation
Authentication Document & Microflow Activity (Beta) #12138
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
Open
atul-lahade-mx
wants to merge
4
commits into
mendix:development
Choose a base branch
from
atul-lahade-mx:development
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+190
−17
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8e44653
Authentication Document & Activity Beta Release
atul-lahade-mx 163ef55
Merge branch 'mendix:development' into development
atul-lahade-mx b56bdb9
Merge branch 'mendix:development' into development
atul-lahade-mx 62451c5
Updated ref guide url for Authentication MF action
atul-lahade-mx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
...pplication-logic/microflows-and-nanoflows/activities/email-activities/_index.md
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
...oflows-and-nanoflows/activities/integration-activities/authentication-action.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| --- | ||
| title: "Authentication (Beta)" | ||
| url: /refguide/get-authentication-data/ | ||
| weight: 30 | ||
| description: "Describes the configuration items of the Authentication microflow activity in Studio Pro." | ||
| #If moving or renaming this doc file, implement a temporary redirect and let the respective team know they should update the URL in the product. See Mapping to Products for more details. | ||
| --- | ||
|
|
||
| {{% alert color="info" %}} | ||
| This activity can only be used in microflows. | ||
| {{% /alert %}} | ||
|
|
||
| {{% alert color="info" %}} | ||
| This activity is currently in beta. For more information, see [Release Status](/releasenotes/release-status/). | ||
| {{% /alert %}} | ||
|
|
||
| ## Introduction | ||
|
|
||
| The **Authentication** activity allows you to run the authentication that is configured in an [authentication document](/refguide/authentication/) from a microflow, and to get the result in a variable. | ||
|
|
||
| ## Properties | ||
|
|
||
| The **Authentication** activity properties pane consists of the following sections: | ||
|
|
||
| * [Action](#action) | ||
| * [Common](#common) | ||
|
|
||
| ## Action Section {#action} | ||
|
|
||
| The **Action** section of the properties pane shows the action associated with this activity. | ||
|
|
||
| You can open a dialog box to configure this action by clicking the ellipsis (**…**) next to the action. | ||
|
|
||
| The dialog box consists of the following sections: | ||
|
|
||
| * [Authentication document](#authentication-document) | ||
| * [Output](#output) | ||
|
|
||
| ### Authentication Document {#authentication-document} | ||
|
|
||
| The **Authentication document** section contains the **Document** property. Click the selector to choose the [authentication document](/refguide/authentication/) that the activity uses. You can clear the selection by choosing **None**, but a document must be selected for the activity to work. | ||
|
|
||
| ### Output {#output} | ||
|
|
||
| The **Output** section configures the result of the activity. | ||
|
|
||
| #### Type | ||
|
|
||
| The type of the result. This is `System.Credentials` when an authentication document is selected, and `Nothing` when no document is selected. This property is read-only. | ||
|
|
||
| #### Variable Name | ||
|
|
||
| The name of the variable that stores the result. The name must be a valid name. | ||
|
|
||
| By default, the variable name is `Credentials` when you select an authentication document, and `None` when no document is selected. The name updates automatically until you edit it manually. After that, it keeps the name you entered. | ||
|
|
||
| When you change the variable name and click **OK**, Studio Pro renames the variable everywhere it is used in the microflow. | ||
|
|
||
| ## Common Section {#common} | ||
|
|
||
| {{% snippet file="/static/_includes/refguide/microflow-common-section-link.md" %}} | ||
|
|
||
| ## Read More | ||
|
|
||
| * [Authentication](/refguide/authentication/) | ||
| * [Integration Activities](/refguide/integration-activities/) |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
content/en/docs/refguide/modeling/integration/authentication.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| --- | ||
| title: "Authentication (Beta)" | ||
| url: /refguide/authentication/ | ||
| weight: 6 | ||
| description: "Describes how to use an authentication document to define authentication once and reuse it in your app." | ||
| #If moving or renaming this doc file, implement a temporary redirect and let the respective team know they should update the URL in the product. See Mapping to Products for more details. | ||
| --- | ||
|
|
||
| {{% alert color="info" %}} | ||
| This feature is currently in beta. For more information, see [Release Status](/releasenotes/release-status/). | ||
| {{% /alert %}} | ||
|
|
||
| ## Introduction | ||
|
|
||
| An authentication document defines how your app authenticates with an external service. You configure the authentication method and its credentials once in the document, and then reuse the document wherever your app needs to authenticate. Activities that use the document only reference it, and the document manages obtaining the credentials. | ||
|
|
||
| An authentication document supports the following authentication methods: | ||
|
|
||
| * **Basic** – authenticates with a username and a password | ||
| * **OAuth 2.0 / Entra ID** – authenticates with the OAuth 2.0 Client Credentials grant, for example with Microsoft Entra ID | ||
|
|
||
| Each document uses exactly one authentication method. | ||
|
|
||
| ## Adding an Authentication Document | ||
|
|
||
| An authentication document is a type of document you can add to modules in your app. Each document contains a single authentication configuration. | ||
|
|
||
| To add an authentication document, do the following: | ||
|
|
||
| 1. Right-click your module or a folder within a module. | ||
| 2. Select **Add other** > **Authentication (Beta)**. | ||
| 3. Give your authentication document a name and click **OK**. | ||
|
|
||
| The name of the document is the name of the authentication configuration. | ||
|
|
||
| Default: *Authentication* | ||
|
|
||
| ## Defining an Authentication Document {#authentication-document} | ||
|
|
||
| To define an authentication document, open it. The authentication is defined in the **Authentication** tab. | ||
|
|
||
| ### General {#general} | ||
|
|
||
| #### Authentication Method | ||
|
|
||
| The **Authentication method** determines how your app authenticates with the external service. The following methods are available: | ||
|
|
||
| | Authentication method | Description | | ||
| | --- | --- | | ||
| | (none) *(default)* | No authentication method is selected. | | ||
| | Basic | Authenticates with a username and a password. For more information, see [Basic](#basic). | | ||
| | OAuth 2.0 / Entra ID | Authenticates with the OAuth 2.0 Client Credentials grant. For more information, see [OAuth 2.0 / Entra ID](#oauth). | | ||
|
|
||
| When you change the authentication method, the values of the previous method are discarded and the properties of the new method are empty. | ||
|
|
||
| ### Credentials Stored in Constants {#constants} | ||
|
|
||
| Sensitive values are not entered directly in an authentication document. Instead, each sensitive property refers to a [constant](/refguide/constants/) that holds the value. This way, you can set a different value for each environment, and you do not need to store secrets in your app model. | ||
|
|
||
| For each sensitive property, do the following: | ||
|
|
||
| 1. Create a constant of type **String**. Mendix recommends not exposing the constant to the client. | ||
| 2. In the authentication document, click the selector next to the property and select the constant. | ||
| 3. Set the value of the constant. For example, set its [Default Value](/refguide/constants/#default-value) for local development, and set a different value for each environment in the Mendix Portal. | ||
|
|
||
| For more information on setting constant values per environment, see the [Constants](/developerportal/deploy/environments-details/#constants) section in *Environment Details*. | ||
|
|
||
| A property that does not refer to a constant shows **(none)**. | ||
|
|
||
| ### Basic {#basic} | ||
|
|
||
| When you select the **Basic** authentication method, the **Credentials** section is shown. It has the following properties: | ||
|
|
||
| | Property | Description | | ||
| | --- | --- | | ||
| | Username | The constant that holds the username. | | ||
| | Password | The constant that holds the password. | | ||
|
|
||
| ### OAuth 2.0 / Entra ID {#oauth} | ||
|
|
||
| When you select the **OAuth 2.0 / Entra ID** authentication method, the **OAuth Configuration** section is shown. It has the following properties: | ||
|
|
||
| | Property | Description | Stored in a constant? | Required? | | ||
| | --- | --- | :---: | :---: | | ||
| | Grant Type | The OAuth 2.0 grant type that is used to obtain the access token. Currently, only **Client Credentials** is supported. | - | - | | ||
| | Access Token URL | The URL of the token endpoint of the identity provider. | Yes | Yes | | ||
| | Client Id | The ID of the client application that is registered with the identity provider. | Yes | Yes | | ||
| | Client Secret | The secret of the client application that is registered with the identity provider. | Yes | Yes | | ||
| | Tenant Id | The ID of the tenant of the identity provider, for example, your Microsoft Entra ID tenant. | Yes | Yes | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [vale] reported by reviewdog 🐶 |
||
| | Scope | The scopes that are requested for the access token. Use comma-separated values, for example, *email, profile*. | No | No | | ||
| | Audience | The intended recipient of the access token, for example, `api://my-api`. | No | No | | ||
|
|
||
| If a required property does not refer to a constant, Studio Pro shows a [consistency error](/refguide/consistency-errors/). | ||
|
|
||
| #### Check Connection {#check-connection} | ||
|
|
||
| Click **Check Connection** to verify that your app can obtain an access token with the configured settings. To check the connection, do the following: | ||
|
|
||
| 1. Set the values of the constants that the document refers to. | ||
| 2. Run your app locally. | ||
| 3. Click **Check Connection**. | ||
|
|
||
| {{% alert color="info" %}} | ||
| **Check Connection** is only available for the **OAuth 2.0 / Entra ID** authentication method. For the **Basic** method, the credentials are only validated by the external service when a request is made. | ||
| {{% /alert %}} | ||
|
|
||
| ## Using an Authentication Document {#using} | ||
|
|
||
| You can use an authentication document in the following places: | ||
|
|
||
| * The [Authentication](/refguide/get-authentication-data/) microflow activity – runs the authentication that is configured in the document, and returns the result as a `System.Credentials` object that you can use in the rest of the microflow | ||
| * The [Send Email](/refguide/send-email-action/) microflow activity – uses the document to authenticate with the email server when you select **Use Authentication Document** | ||
|
|
||
| ## Read More | ||
|
|
||
| * [Authentication Activity](/refguide/get-authentication-data/) | ||
| * [Integration Activities](/refguide/integration-activities/) | ||
| * [Constants](/refguide/constants/) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [vale] reported by reviewdog 🐶
[Mendix.Capitalization] Use ''ID'' (capitalized)