You can secure an MDriven Server installation by serving it over HTTPS, requiring identification for administration and services, assigning a recovery-capable administrator, and disabling public registration when setup is complete.
Secure a new MDriven Server
When you first install MDriven Server, you register a user so that you can sign in and administer the server. Treat this first account as a setup account: before you restrict access, make sure that at least one account has the SuperAdmin role and that you know its password.
Use the following sequence when moving a server from initial setup or prototyping to a restricted installation:
- Configure the server and its hosting environment to use HTTPS.
- Sign in to the MDriven Server web interface with an account you control.
- Open UserAdmin.
- Assign SuperAdmin to the user or users who must administer the server.
- Enable Admin require Identification.
- Enable Services require identification.
- Enable Turn off registration.
- Test sign-in and the required application connections before treating the configuration as complete.
For an IIS-hosted Turnkey installation, see Training:Set up MDriven Turnkey on premise for the installation flow and HTTPS requirement.
Use HTTPS before requiring credentials
Use HTTPS for every browser and application connection to MDriven Server. HTTPS protects passwords and other data sent between the client and server from being exposed on the network.
This is also a functional security boundary in MDriven Server: when the server runs in HTTP mode, security limitations are not enforced. Enforcing them would require passwords to be sent over an unprotected connection. Do not regard an HTTP endpoint as a protected deployment.
For example, a local development server reachable only as http://localhost:5000 can be suitable for an isolated local exercise. A server reached by other users or systems must use HTTPS before you rely on authentication settings.
Configure identification requirements
In UserAdmin, MDriven Server provides settings that control whether the administration user interface and exposed services require a user to identify themselves.
| Setting | What it controls | Recommended use |
|---|---|---|
| Admin require Identification | Requires identification to use the MDriven Server administration user interface. | Enable after a SuperAdmin account exists. |
| Services require identification | Requires identification for services exposed by MDriven Server through its web interfaces. | Enable when the users and applications that need the services have been configured. |
| Turn off registration | Prevents new users from registering themselves. | Enable when you no longer need open registration during setup or prototyping. |
| SuperAdmin | Identifies a user that can administer the server. | Assign to the administrators responsible for maintaining access. Keep credentials available through your approved administrative process. |
During early prototyping, you may temporarily leave service identification less restrictive to reduce setup work for test users. This does not replace HTTPS, and it must not be the final configuration for a server that exposes protected data or services.
Avoid administrative lockout
Enable restrictions only after you have verified that a known user is a SuperAdmin. If you enable Admin require Identification without a usable SuperAdmin account, you can lock yourself out of the administration interface. If you then also enable Turn off registration, you cannot create a replacement account through normal registration.
Before changing these settings:
- Record which account is the SuperAdmin.
- Verify that you can sign in with that account.
- Keep the account password available to the responsible administrator.
- Make one change at a time and verify access before continuing.
If registration has been turned off and you are locked out, the documented recovery approach is to open the MDriven Server administration database with SQL Server Compact tools and set admin_GlobalSettings.TurnOffRegistration to 0 (false). You can then register a user and regain control. In the described on-premise installation, the database is located at __MDrivenServer\App_Data\DatabaseCompact.sdf. Follow HowTos:Configure and Maintain MDriven Server for maintenance guidance.
Secure the application, not only the server endpoint
MDriven Server authentication settings protect access to its administration interface and exposed services. They do not define which business data an authenticated application user may see. In MDriven Turnkey, a ViewModel defines the data slice available for a use case; the reduction is performed on the server and is expressed with OCL. Define authorization rules in the model so that access control is enforced on the server rather than filtered in a browser client.
For example, requiring identification for services prevents anonymous use of those services. A signed-in user must still receive only the customers, orders, or other objects allowed by the ViewModel and its access-control rules.
Read Training:Information security for the access-control model and its server-side enforcement.
Deployment checklist
Before making an MDriven Server available beyond isolated local development, confirm the following:
- The server is accessed through HTTPS.
- At least one tested SuperAdmin account exists.
- Admin require Identification is enabled.
- Services require identification is enabled where services are not intended for anonymous access.
- Turn off registration is enabled after required accounts have been created.
- The application ViewModels and OCL-based rules expose only the data intended for each authenticated use case.
- Administrators know the documented recovery path for a lost password or lockout.
See also
- HowTos:Configure and Maintain MDriven Server
- Training:Set up MDriven Turnkey on premise
- Training:Information security
- Training:MDrivenServer Summarized
- Documentation:MDriven Server - Connecting To
Production security configuration
Production security configuration
Use HTTPS for all communication with MDriven Server. The server documentation states that no security limitations are enforced while the server runs in HTTP mode, because sending passwords over an open connection is unsafe.
Require identification
In UserAdmin, configure the administration UI to require identification. Ensure that at least one responsible administrator has the SuperAdmin role before enabling this setting, or administrative access can be lost.
You can also configure whether services exposed through MDriven Server web interfaces require authentication. For a restricted deployment, enable Services require identification.
Disable registration when appropriate
After creating the required users, enable Turn off registration if users must not be able to create accounts themselves. Keep credentials for existing administrative users available: disabling registration without a usable administrative account can lock administrators out.
If registration was disabled accidentally and no administrator can regain access, the on-premise setup guidance describes a recovery procedure: open the administration database with SqlServerCompact tools, set admin_GlobalSettings.TurnOffRegistration to 0, and register a new user. In the documented IIS layout, the database is located at __MDrivenServer\App_Data\DatabaseCompact.sdf.
IIS-hosted deployments
For the documented on-premise IIS deployment, configure HTTPS for the application. HTTPS is also described as necessary for the internal WCF communication used by MDriven Turnkey.
The __MDrivenServer/logs directory should be accessible to the application. The on-premise setup guidance instructs administrators to grant read/write access to IIS AppPool\NameOfTheAppPool for that directory.
Verify the configuration
After changing security settings:
- Confirm that MDriven Server is accessed through HTTPS.
- Confirm that a designated SuperAdmin can sign in to the administration UI.
- Confirm that the intended services require identification.
- Confirm that registration is disabled if self-registration is not intended.
- Retain the documented recovery procedure for administrators responsible for the installation.
