-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #987 from logto-io/yemq-add-saml-app-docs
feat: add SAML app docs
- Loading branch information
Showing
95 changed files
with
1,732 additions
and
202 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,63 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# SAML App | ||
|
||
Logto supports integration as an [Identity Provider (IdP)](https://auth.wiki/identity-provider) with SAML protocol-based applications [Service Provider, SP](https://auth.wiki/service-provider). Through SAML app integration, you can provide enterprise users with a secure, standardized Single Sign-On (SSO) experience. | ||
|
||
## Introduction \{#introduction} | ||
|
||
SAML (Security Assertion Markup Language) is an XML-based open standard for exchanging authentication and authorization data between parties. In a SAML integration: | ||
|
||
- **Logto as IdP**: Acts as the central authentication authority, managing user identities and issuing SAML assertions | ||
- **Your Application as SP**: Relies on Logto to authenticate users and consumes SAML assertions for access control | ||
|
||
### How SAML authentication works \{#how-saml-authentication-works} | ||
|
||
SAML authentication in Logto primarily follows the SP-initiated flow, where the authentication process starts from your application (Service Provider). Here's a brief overview: | ||
|
||
1. User attempts to access your application | ||
2. Your application generates a SAML request and redirects the user to Logto | ||
3. User authenticates with Logto | ||
4. Logto generates a SAML response containing user information | ||
5. Your application validates the response and grants access | ||
|
||
For a more detailed explanation of SAML authentication flows and comparison with other protocols, check out our [authentication flow guide](/integrate-logto/integrate-logto-into-your-application/understand-authentication-flow.mdx#saml-authentication-flow). | ||
|
||
### Benefits of SAML integration \{#benefits-of-saml-integration} | ||
|
||
- **Enhanced Security**: Encrypted communication and digital signatures ensure secure data exchange | ||
- **Simplified User Experience**: Users only need to sign in once to access multiple applications | ||
- **Reduced Administrative Overhead**: Centralized user management and access control | ||
- **Enterprise Readiness**: Widely adopted by organizations for secure identity federation | ||
|
||
## Key Features \{#key-features} | ||
|
||
- **Standardized Integration**: Full support for SAML 2.0 protocol, ensuring compatibility with various service providers | ||
- **Flexible Attribute Mapping**: Support for custom user attribute mapping to meet different application data requirements | ||
- **Secure and Reliable**: Support for signing and encryption to protect the authentication process | ||
- **Automatic Configuration**: Support for quick SAML integration setup via metadata URL or file | ||
|
||
## Use Cases \{#use-cases} | ||
|
||
SAML app integration is suitable for the following scenarios: | ||
|
||
- Enterprise application systems requiring Single Sign-On (SSO) | ||
- Integration with third-party services supporting SAML protocol | ||
- Requirements for high security and standardized authentication processes | ||
|
||
## Create an SAML application in Logto \{#create-an-saml-application-in-logto} | ||
|
||
1. Go to <CloudLink to="/applications">Console > Applications</CloudLink> | ||
2. Select "My apps" as the application type and choose the following integration protocol "SAML" | ||
3. Enter a name and description for your application and click on the “Create” button. A new SAML application will be created. | ||
|
||
## Configuration Guide \{#configuration-guide} | ||
|
||
To start using SAML app integration, you need to complete the following steps: | ||
|
||
1. [Configure SAML App](/integrate-logto/saml-app/setup.mdx): Set up basic SAML integration parameters | ||
2. [Configure Attribute Mapping](/integrate-logto/saml-app/attribute-mapping.mdx): Define how to map Logto user attributes to SAML assertions | ||
|
||
After completing the configuration, your application can securely authenticate and exchange data with Logto through the SAML protocol. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,41 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Configure SAML assertion attributes | ||
|
||
SAML attributes are key components of SAML assertions that carry specific information about the authenticated user. These attributes can include user identifiers, roles, permissions, and other relevant user data that the Service Provider (SP) may need for authorization and personalization purposes. | ||
|
||
## Understanding SAML attributes \{#understanding-saml-attributes} | ||
|
||
In SAML authentication: | ||
|
||
- Attributes are name-value pairs that contain user information | ||
- They are included in the SAML assertion sent from the Identity Provider (Logto) to the Service Provider | ||
- They help Service Providers make informed decisions about user access and personalization | ||
|
||
 | ||
|
||
## Attribute mapping in Logto \{#attribute-mapping-in-logto} | ||
|
||
Attribute mapping allows you to define how user information from Logto should be mapped to specific attributes in the SAML assertion. This mapping ensures that your Service Provider receives the user information in the expected format and under the expected attribute names. | ||
|
||
When you configure attribute mapping: | ||
|
||
1. You specify which user properties from Logto should be included in the SAML assertion | ||
2. You define custom attribute names that your Service Provider expects | ||
3. The mapped attributes are automatically included in the SAML assertion during authentication | ||
|
||
### Common attributes \{#common-attributes} | ||
|
||
Some commonly used SAML attributes include: | ||
|
||
- Sub (User ID) | ||
- Organizations | ||
- Name | ||
- Preferred username | ||
|
||
By properly configuring attribute mapping, you ensure that your Service Provider receives all the necessary user information to provide appropriate access and personalization for your users. | ||
|
||
You can map all Logto available user information to your SP's expected attributes using the attribute mapping settings. |
This file contains 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,90 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Basic SAML integration setup | ||
|
||
This guide will help you configure your SAML application in Logto. Follow these steps to set up the basic SAML integration. | ||
|
||
## Application settings \{#application-settings} | ||
|
||
### Basic information \{#basic-information} | ||
|
||
- **Application name** (Required): Enter a name for your SAML application. This name will help you identify the application in Logto. | ||
- **Description**: Add an optional description to provide more details about your application. | ||
|
||
### SAML service provider configuration \{#saml-service-provider-configuration} | ||
|
||
- **Assertion consumer service URL (Reply URL)** (Required): Enter the URL where Logto should send the SAML assertion after successful authentication. This URL should match the ACS URL provided in your Service Provider (SP) application. | ||
|
||
- **Service Provider (SP) Entity ID** (Required): Enter the unique identifier for your Service Provider. This value should match the Entity ID found in your SP application. The SP Entity ID is a string input that typically follows a URI format (but not necessary). | ||
- Common formats include: | ||
- `urn:your-domain.com:sp:saml:{serviceProviderId}` | ||
- `https://your-domain/saml/{serviceProviderId}` | ||
|
||
## SAML IdP metadata \{#saml-idp-metadata} | ||
|
||
After configuring the basic settings, Logto will provide you with important SAML Identity Provider (IdP) metadata that you'll need to configure in your Service Provider: | ||
|
||
### IdP metadata URL \{#idp-metadata-url} | ||
|
||
Use this URL to configure your SP with the IdP metadata. The metadata contains all necessary information for SAML integration. | ||
|
||
### Single sign-on service URL \{#single-sign-on-service-url} | ||
|
||
This is the URL where your SP should send SAML authentication requests. | ||
|
||
### IdP entity ID \{#idp-entity-id} | ||
|
||
The unique identifier for the Identity Provider. | ||
|
||
:::note | ||
"Single sign-on service URL" and "IdP entity ID" have already been included in IdP metadata, so you don't need to configure it separately if your SP can handle metadata URL. | ||
::: | ||
|
||
### SAML signing certificate \{#saml-signing-certificate} | ||
|
||
Logto uses this certificate to sign SAML assertions. You'll need to configure this in your SP to verify the signatures: | ||
|
||
- **Expires at**: The certificate's expiration date | ||
- **Fingerprint**: The certificate's unique fingerprint for verification | ||
- **Status**: The current status of the certificate (Active or Inactive) | ||
|
||
 | ||
|
||
:::note Important certificate management rules | ||
|
||
- Only one certificate can be active at a time. The active certificate will be used in the IdP metadata URL. | ||
- The IdP metadata URL will not be available if there is no active certificate. | ||
- You cannot delete an active certificate. To delete a certificate, you must first deactivate it. | ||
- When you activate an inactive certificate, the currently active certificate will be automatically deactivated. | ||
|
||
::: | ||
|
||
### Additional settings \{#additional-settings} | ||
|
||
#### Name ID format \{#name-id-format} | ||
|
||
Select how you want the user identifier to be formatted in the SAML assertion. The default is "Persistent" which uses the Logto user ID as the Name ID. | ||
|
||
 | ||
|
||
You can find there are four available formats provided by Logto: | ||
|
||
- **Persistent** (Use Logto user ID as Name ID): Creates a permanent, non-reusable identifier that remains consistent across sessions. This is ideal for maintaining a stable user identity across multiple sign-ins and is recommended for most enterprise applications. | ||
|
||
- **Email address** (Use email address as Name ID): Uses the user's email address as the identifier. This is useful when your Service Provider relies on email addresses for user identification or when you need human-readable identifiers. | ||
|
||
- **Transient** (Use one-time user ID as Name ID): Generates a temporary, one-time identifier that changes with each authentication request. This provides enhanced privacy and is suitable for applications where persistent user tracking is not desired. | ||
|
||
- **Unspecified** (Use Logto user ID as Name ID for now): Similar to Persistent format but indicates that no specific format is required. This offers flexibility while still using the stable Logto user ID as the identifier. | ||
|
||
#### Encrypt SAML assertion \{#encrypt-saml-assertion} | ||
|
||
Toggle this option if you want to encrypt the SAML assertion for enhanced security. When enabled, the SAML assertion will be encrypted before being sent to your SP. | ||
|
||
 | ||
|
||
:::note | ||
When you enable SAML assertion encryption, you must provide your Service Provider's signing certificate. This certificate will be used to encrypt the SAML assertion, ensuring that only your SP can decrypt and read the assertion content. | ||
::: |
This file contains 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
Binary file added
BIN
+84.9 KB
...ugin-content-blog-tutorial/build-with-logto/assets/select-your-sso-provider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Oops, something went wrong.