Configuration Options
Relevant source files
The following files were used as context for generating this wiki page:
Casdoor provides a comprehensive set of configuration options managed through its web UI and backend API. These options define the behavior of Identity and Access Management (IAM) entities, including Organizations, Applications, Syncers, Webhooks, and Certificates. Configuration is hierarchical, where Organizations serve as the top-level container for users and applications, and Applications define the specific authentication protocols and UI behaviors for end-users.
Sources: README.md, swagger/swagger.yml, web/src/ApplicationEditPage.js
Organization Configuration
Organizations are the primary administrative units in Casdoor. They manage user pools, password policies, and multi-factor authentication (MFA) requirements.
Security and Password Policy
Organizations define how user credentials are encrypted and validated. Key options include passwordType (e.g., bcrypt, argon2id), passwordSalt, and passwordOptions for complexity (e.g., length, special characters).
The diagram shows the relationship between an organization and its security-related configuration parameters.
Sources: web/src/OrganizationEditPage.js:287-347, swagger/swagger.yml:definitions/object.Organization
Account and UI Customization
Organizations can customize the user experience via themeData, navItems, and accountItems. They also control soft deletion and whether user profiles are public.
| Option | Type | Description |
|---|---|---|
enableSoftDeletion | boolean | If enabled, deleting users marks them as deleted without physical removal. |
isProfilePublic | boolean | Controls if user profile pages are accessible by others. |
masterPassword | string | An administrative password usable for all users in the organization. |
defaultApplication | string | The default application used for users registered at the organization level. |
Sources: web/src/OrganizationEditPage.js:464-533, swagger/swagger.yml:definitions/object.Organization
Application Configuration
Applications represent the clients (Web, Mobile, etc.) that use Casdoor for authentication. They support multiple protocols including OIDC, SAML, and CAS.
OIDC and OAuth 2.0 Settings
Applications manage OIDC/OAuth credentials and token behaviors.
- Grant Types: Supported types include
authorization_code,password,client_credentials, andrefresh_token. - Token Customization:
tokenFormat(JWT, Standard, etc.) andtokenFields(user attributes to include in the token). - Expiration:
expireInHoursandrefreshExpireInHours.
Sources: web/src/ApplicationEditPage.js:379-450, swagger/swagger.yml:definitions/object.Application
UI and Frontend Experience
Applications allow granular control over the login/signup forms, including custom CSS and HTML.
The sequence diagram illustrates how an application uses its configuration to render a customized frontend for the user.
Sources: web/src/ApplicationEditPage.js:560-660, web/src/locales/en/data.json:application
Syncer Configuration
Syncers are used to automate user data migration and synchronization from external sources like Databases, Active Directory, or Google Workspace.
| Option | Description | Supported Values / Examples |
|---|---|---|
type | The external system type | Database, Keycloak, Azure AD, Okta, SCIM |
databaseType | SQL driver if type is Database | mysql, postgres, mssql, oracle |
syncInterval | Interval between sync tasks | Integer (seconds) |
tableColumns | Mapping of external columns to Casdoor user fields | Array of {name, casdoorName, isHashed} |
Sources: web/src/SyncerEditPage.js:100-340, swagger/swagger.yml:definitions/object.Syncer
Webhook Configuration
Webhooks enable integration with external systems by subscribing to Casdoor events.
Payload and Trigger Logic
Webhooks are triggered by specific API paths (events) such as /api/signup or /api/login.
- Method:
POST,GET,PUT,DELETE. - Content Type:
application/jsonorapplication/x-www-form-urlencoded. - Object Fields: Specific fields of the triggered object (e.g., User, Application) to include in the notification.
Sources: web/src/WebhookEditPage.js:150-250, swagger/swagger.yml:definitions/object.Webhook
Certificate Configuration
Certificates are used for JWT signing and SAML assertions. Casdoor supports several crypto algorithms and bit sizes.
The graph summarizes the classification of certificates based on algorithms and functional types.
Sources: web/src/CertEditPage.js:130-220, swagger/swagger.yml:definitions/object.Cert
Summary
Casdoor's configuration ecosystem allows for deep customization of the IAM experience. By configuring Organizations, administrators establish the security baseline and user management rules. Applications extend this by defining the protocol-specific endpoints and UI skins. Syncers and Webhooks provide the necessary hooks for data lifecycle management and external systems integration, while Certificates ensure the integrity of the authentication tokens issued.