Project: DolphinScheduler (Orchestration & Management / Scheduling & Orchestration)
File: authentication-type.md

So far we support four authentication types, Apache DolphinScheduler password, LDAP, Casdoor SSO and OAuth2the OAuth2 authorization login mode can be used with other authentication modes. dolphinscheduler-api/src/main/resources/application.yaml ```yaml security: authentication: type: PASSWORD ldap: urls: ldap://ldap.forumsys.com:389/ base-dn: dc=example,dc=com username: cn=read-only-admin,dc=example,dc=com password: password user: admin: read-only-admin identity-attribute: uid email-attribute: mail not-exist-action: CREATE ssl: enable: false trust-store: "/ldapkeystore.jks" trust-store-password: "password" casdoor: user: admin: "" oauth2: enable: false provider: github: authorizationUri: "" redirectUri: "" clientId: "" clientSecret: "" tokenUri: "" userInfoUri: "" callbackUrl: "" iconUri: "" provider: github google: authorizationUri: "" redirectUri: "" clientId: "" clientSecret: "" tokenUri: "" userInfoUri: "" callbackUrl: "" iconUri: "" provider: google casdoor: endpoint: "" client-id: "" client-secret: "" certificate: "" organization-name: "" application-name: "" redirect-url: "" ``` For detailed explanation of specific fields, please see: We offer you a unit-test class while you can test the integration of DolphinScheduler with LDAP without running the service. dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapServiceTest.java You can follow guide below Change`TestPropertySource`configuration to your LDAP information. Change userId && userPwd to your information in the `ldapLogin` method. Change the expected email to the return value you expect in the `ldapLogin` method. Run`ldapLogin`method and determine whether the LDAP login result is expected. If you want to enable ssl, please change configuration in `TestPropertySource` like below: ``` security.authentication.ldap.ssl.enable=false // absolute path security.authentication.ldap.ssl.trust-store=/ldapkeystore.jks security.authentication.ldap.ssl.trust-store-password=yourpassword ``` Then run`ldapLoginSSL`method and determine whether the LDAP login result is expected. is a UI-first Identity Access Management (IAM) / Single-Sign-On (SSO) platform based on OAuth 2.0, OIDC, SAML and CAS. You can add SSO capability to Dolphinscheduler through Casdoor by following these steps: Firstly, the Casdoor should be deployed. You can refer to the Casdoor official documentation for the . After a successful deployment, you need to ensure: The Casdoor server is successfully running on http://localhost:8000. Open your favorite browser and visit http://localhost:7001, you will see the login page of Casdoor. Input admin and 123 to test login functionality is working fine. Then you can quickly implement a Casdoor based login page in your own app with the following steps. Create or use an existing Casdoor application. Add Your redirect url (You can see more details about how to get redirect url in the next section) Add provider you want and supplement other settings. Not surprisingly, you can get two values on the application settings page: `Client ID` and `Client secret` like the picture above. We will use them in next step. Open your favorite browser and visit: http://`CASDOOR_HOSTNAME`/.well-known/openid-configuration, you will see the OIDC configure of Casdoor. dolphinscheduler-api/src/main/resources/application.yaml ```yaml security: authentication: type: CASDOOR_SSO casdoor: endpoint: client-id: client-secret: certificate: organization-name: application-name: redirect-url: http://localhost:5173/login ``` Dolphinscheduler can support multiple OAuth2 providers. ```yaml security: authentication: oauth2: enable: true provider: github: authorizationUri: "" redirectUri: "" clientId: "" clientSecret: "" tokenUri: "" userInfoUri: "" callbackUrl: "" iconUri: "" provider: github google: authorizationUri: "" redirectUri: "" clientId: "" clientSecret: "" tokenUri: "" userInfoUri: "" callbackUrl: "" iconUri: "" provider: google gitee: authorizationUri: "https://gitee.com/oauth/authorize" redirectUri: "http://127.0.0.1:12345/dolphinscheduler/redirect/login/oauth2" clientId: "" clientSecret: "" tokenUri: "https://gitee.com/oauth/token?granttype=authorizationcode" userInfoUri: "https://gitee.com/api/v5/user" callbackUrl: "http://127.0.0.1:5173/login" iconUri: "" provider: gitee ```