midPoint connectors for databases and custom applications

Connecting an in-house application that stores users in SQL tables to midPoint means choosing between the supported DatabaseTable connector and the ScriptedSQL connector, then proving the mapping and failure handling before go-live.

On this page

How midPoint connects to a custom application's SQL user tables

When an in-house application keeps its users in SQL tables, midPoint has to create, update and disable those rows without taking over the application itself. The supported path is the DatabaseTable connector for simple table layouts and the ScriptedSQL connector for custom SQL, both built on the ConnId framework. The Oracle database account connector has unknown status in the Evolveum catalog, so do not plan a production dependency on it until you have confirmed its status with Evolveum. Both supported connectors run from midPoint as a resource definition, so the work sits in mapping your table columns to midPoint attributes, not in changing the application.

midPoint sits above the application as the governance layer: it decides who should have an account, which roles and attributes that account carries, and when it must be disabled. The application database stays the system of record for that application's users, so the application's own login, session and password logic keeps working as before. Decide early which side owns each attribute, such as name, status or role flags, because two systems writing the same column is the most common source of drift. Confirm with your application team whether they read the status column directly or only through application code, since a disable that midPoint writes may not take effect until the application checks it.

Before you choose between the two connectors, list the operations you need (create, update, disable, delete, group membership) and check whether each can be expressed as a plain table write. If they can, the DatabaseTable connector keeps the configuration small and easier to review. If you need joins, stored procedures, multi-table writes or non-standard status handling, plan for ScriptedSQL and budget time for script review and testing against a non-production copy of the database. Ask the connector's documentation which operations each one implements in your midPoint version, and test a disable and a re-enable on a copy before any production run.

What you need in place before the connector is configured

Four pieces must be settled before anyone opens the resource wizard: a midPoint release that matches your Java runtime, a repository on PostgreSQL, a least-privilege database account, and a documented table model. Each one has a different owner, so confirm them in that order with the people who hold them.

Confirm the midPoint release and Java runtime

midPoint recommends Java 25 for version 4.11 and later, with Java 21 supported, and Java 21 for 4.10 and older, with Java 17 supported. The connector behavior you test must match the release you run in production, so record the exact version before you choose a connector bundle. Ask the midPoint team to confirm the release against the system requirements page, including whether your release is still in support. A connector tested on one release and run on another is a common source of late surprises.

System requirements

Working midPoint repository on PostgreSQL

midPoint uses PostgreSQL as its native repository, ideally on a separate database server from the application. The connector itself does not write to this repository, but every resource definition, shadow account and reconciliation result depends on it. The midPoint team should confirm the repository is healthy, backed up and on a PostgreSQL version still under community support before adding a new resource. Clarify who can restore it if a connector run corrupts shadow data.

midPoint requirements

Dedicated least-privilege database account

Create a separate database user for midPoint instead of reusing an application or DBA account. The DBA should grant only the reads and writes the target tables need for the attributes you map, such as select on the identity table and insert, update or delete on the account columns you manage. Ask the DBA to document each grant, the schema it applies to and how the password is rotated. Broad grants like database owner make a compromised midPoint server a compromised application database.

Network path and TLS for the JDBC connection

Plan the route from the midPoint host to the database port before configuration, including firewall rules, any load balancer or pooler in between and whether the midPoint node or a connector server makes the call. Require TLS on the JDBC connection and have the network team confirm the certificate chain that midPoint will trust. Test the path from the exact host that runs midPoint, because a successful test from a workstation proves little about the production firewall.

Application table schema and business rules

The application owner should provide a current schema export for every table midPoint will read or write, with column types, primary keys, nullable fields and the meaning of status codes. Also capture the business rules that decide when a user is active, which field is the unique identifier and what happens to rows when a person leaves. Without these, the midPoint team will guess at correlation and deprovisioning logic, and those guesses are hard to unwind once accounts have changed.

Test database and change window

Agree on a non-production copy of the application database with realistic row counts and the same schema version as production. The application owner and DBA should confirm who approves writes to that copy and when the first production synchronization may run. Keep a documented rollback plan that names the person who can disable the resource in midPoint. A connector that updates the wrong table at scale is easier to prevent with a test copy than to repair afterward.

DatabaseTable or ScriptedSQL: which connector fits your application

A single table where each row is one account and its columns map directly to midPoint attributes is the situation the DatabaseTable connector is built for. The Evolveum catalog lists this connector as supported, so the support scope is defined by Evolveum rather than by your own scripts. You configure the table, key column, and attribute mappings in midPoint without writing SQL.

  • Direct column mapping: each midPoint attribute corresponds to one column on one table, with no joins needed to read or write an account.
  • Supported status: the catalog lists the connector as supported, which matters when you check what a subscription covers.
  • Limited write logic: creating, updating, and deleting rows follows the statements the connector generates from its configuration, so multi-table writes do not fit.
  • Password handling: confirm with Evolveum how the connector stores or hashes passwords before relying on it for credential storage.
  • Reconciliation: check whether the connector's search and sync behavior covers your deletion and change detection needs.

Before committing, ask the application owner whether the user table will stay flat for the life of the integration, because adding a join later moves the work to ScriptedSQL.

Configuring the database resource in midPoint, step by step

This sequence takes a database table or SQL-backed application from a dedicated database account to a reconciled midPoint resource, with a check at each stage so that problems surface before any production account is touched.

  1. Create a least-privilege database account

    A database administrator creates a dedicated account for midPoint on the database that holds the user table. Grant only the statements the chosen connector needs, typically read and update on the account table and the columns midPoint will manage, and no schema-change or administrative rights. Record the account, its host and the allowed client addresses in your own configuration inventory. The step is done when a login with that account succeeds from the midPoint host and a query against the account table returns rows, while an attempt to alter a table is refused.

  2. Create the resource with the chosen connector

    Choose the connector before building the resource. The DatabaseTable connector is listed by Evolveum as supported and fits simple tables that map one row to one account. The ScriptedSQL connector for generic SQL databases is listed as supportable and suits logic that needs custom SQL scripts. The Oracle database account connector is listed with unknown status, so confirm its support position with Evolveum before you depend on it. In midPoint, create the resource with the connection URL, driver, service account and password, and store the password as a protected value rather than in plain text. The step is done when the resource object saves without validation errors.

  3. Test the connection

    Run the connection test from the resource page in the midPoint administration interface. Confirm that the test reaches the database from the midPoint node that will run tasks, not only from your workstation, because firewall rules often differ between them. If the test fails, check the driver version, the network path, the TLS settings and the account's host restrictions on the database side. The step is done when the connection test reports success and the same result appears from the midPoint node that runs synchronization.

  4. Define the schema and object classes

    Map the table to the account object class in the resource schema. Confirm which column is the native identifier, which column is the login name, and which attributes are read-only, multivalued or required. Keep the attribute list to what midPoint must govern, because every extra attribute adds mapping work and reconciliation load. The step is done when the schema view lists the expected attributes and a known row, looked up by its key, returns the attribute values you expect.

  5. Configure correlation and immutable identifiers

    Decide how midPoint links an existing database row to a person. Use an attribute that is stable and unique, such as an employee number or an immutable key, and define the correlation rule in the synchronization configuration. Mark the native identifier as one that must not change, because a changed key creates a new account instead of updating the existing one. Document the rule and the owner who approves changes to it. The step is done when a test correlation of a sample identity matches exactly one row and no row matches more than one identity.

  6. Run a test-only search and a single-account create

    Run a search on the resource with a restricted query to confirm that midPoint reads the expected rows. Then, in a non-production copy of the database, create one test account through midPoint, check the row that appears, and delete it through midPoint. Keep the test identity clearly labeled so it cannot be mistaken for a real user. The step is done when the search returns the known row, and the test account is created and then removed with no leftover row in the copy.

  7. Enable reconciliation with a safety threshold

    Create a reconciliation task for the resource and set a safety threshold that stops the run if the number of unexpected changes exceeds a limit you agree in advance with the application owner. Schedule the task only after the first manual run has finished. Review the first report line by line with the application owner. The step is done when a manual reconciliation on production data reports zero unexpected changes, and the threshold has been tested by a deliberate, controlled change that the task halts on.

How data moves between HR, midPoint, the connector and the application table

The flow starts with the authoritative HR source, which feeds midPoint. midPoint applies its mappings and policies, then the ConnId connector runs SQL against the application database using a dedicated service account. The application reads the same table through its own path. Reconciliation is the return loop: the connector reads the table back into midPoint so it can detect drift. Check that the service account's rights are limited to the columns and operations the connector needs, and that the application's admin path stays outside the midPoint zone.

Data flows from HR through midPoint and the connector into the application table, with reconciliation reading back.

Mapping table columns to midPoint attributes and roles

This table lists the database columns a custom application typically exposes and the midPoint attribute, focus, direction and correlation role each one needs. Read it as a starting checklist to confirm with the application owner, since the exact column names, storage rules and enable semantics come from your own schema. Keep the finished mapping sheet as a controlled artifact, reviewed and signed off with the application owner before the connector is configured.

Column or itemmidPoint sideDirection and correlationWhat to confirm with the application owner
Unique account identifierFocus: user or account, shadow identifier attributeInbound and outbound; drives correlation and link matchingConfirm the column is immutable, unique and never reused after deletion
Login nameFocus: name (username), account identifier or naming attributeOutbound at creation; inbound for reconciliation; may drive correlationConfirm the naming rule, case sensitivity and whether renames are allowed
Email addressFocus: emailAddressUsually inbound from HR or outbound to the table; secondary correlation onlyConfirm uniqueness and whether changes should flow in both directions
Status or enabled flagActivation attribute of the account shadowOutbound for joiner, mover and leaver actions; inbound for drift detectionConfirm the allowed values, what disabled means and whether deletion is a soft or hard delete
Display name or full nameFocus: givenName and familyName, or fullNameInbound or outbound per the authoritative source; not used for correlationConfirm which name fields the application stores and any length limits
Group or role membership columnsAssociations or roles assigned through midPoint role assignmentsOutbound from midPoint roles; inbound only where the table is authoritativeConfirm whether membership is a join table, a delimited list or a single column, and who may write it
Password or credential columnCredential attribute of the account, with password policyOutbound only; never correlated onConfirm the hash algorithm, salt handling and whether the application accepts plain text or pre-hashed values
Ownership or organization codeFocus: organizational unit or extension attributeInbound from the authoritative source; may drive correlation with HR dataConfirm code values and how changes are recorded in the application

Securing the connection and the database account

A connector is only as safe as the database account and network path behind it. The cards below cover the controls that keep midPoint's access to in-house SQL tables narrow, encrypted and reviewable, and each one names the team that should own it.

Scope the service account tightly

Create a dedicated database role for midPoint that can read and write only the tables and stored procedures the connector uses. Do not reuse a DBA or application owner account, and do not grant schema-level or superuser rights for convenience. Ask the application owner to list each object the mappings touch, then check the grants against that list. Illustrative check: a role that can alter tables it never reads is out of scope and should be removed.

Split read and write accounts

Where the design allows, use one account for reading identities during reconciliation and a separate account for create, update and delete operations. A read-only account limits the damage from a compromised discovery run, and the write account can be restricted to the specific procedures that change records. Confirm with the application team whether the source tables support this split before the resource is designed.

Require TLS with certificate validation

Configure the JDBC connection so traffic between midPoint and the database is encrypted, and make certificate validation mandatory rather than accepting any server certificate. Confirm the exact driver parameters with your database vendor's JDBC documentation, because the required settings differ by product. Owner: platform engineering, with the database team confirming the server certificate chain.

Keep credentials out of scripts and Git

Store the database password in midPoint's protected configuration, which encrypts sensitive values, and never inline it in a ScriptedSQL script, a resource XML file or a version control repository. Review the midPoint security guidance on encryption keys before go-live, because the protection depends on how those keys are managed. Owner: security engineering, who should confirm that repository scans cover resource files.

Choose SCRAM for PostgreSQL authentication

If the application database runs on PostgreSQL, set password authentication to SCRAM and disable MD5 in the host-based authentication file. PostgreSQL 18 deprecated MD5 password authentication in favor of SCRAM, so new clusters should not depend on it. Where the platform supports them, evaluate certificate or LDAP authentication for the midPoint role, and document which method each account uses. Owner: database team.

PostgreSQL auth methods

Audit writes on the application side

midPoint keeps its own audit trail of provisioning, but it cannot prove what a database procedure changed unless the application records it too. Ask the application owner to log each insert, update and delete made through the midPoint account, including the database user, timestamp and affected key. Test that these entries appear during a reconciliation run before accepting the design.

Change-control ScriptedSQL scripts

Treat every ScriptedSQL script as production code. Keep scripts in version control, require peer review for each change, and link each release to a test run against a non-production copy of the database. Record who approved the change, because a modified script can alter what midPoint writes without any change in the resource configuration. Owner: the midPoint engineering lead with the application owner as approver.

How to test a database connector before production

Test the connector against a copy of the application database before it touches production, and treat the test as a written plan with expected results for every case. Restore the copy with representative users, including the mix of departments, contractors, shared or service-style accounts and users who have several rows, so the tests reflect the data the connector will actually read. Confirm that the copy is isolated from production systems and that the midPoint test environment uses its own connector configuration, service account and database credentials, so a mistake in testing cannot write to the live table.

Build a test set that covers joiner, mover and leaver cases. Add a joiner row with complete attributes, a mover row whose department or manager changes, and a leaver row whose status changes to inactive. Add a disabled-account case, where the source row says the account should be off but the target account exists, and a case where the table holds a duplicate or missing key, because the correlation and uniqueness rules you configure decide whether midPoint links, creates or skips the record. Record the expected outcome for each row before you run the test, and note which configuration keys (for example, the key attribute and the status column mapping in your resource definition) produced it.

After each run, check the row content in the target system, the midPoint audit trail for the operations it attempted, and whether any account exists without a matching source record. Then run a reconciliation with a deliberate drift, such as an account changed directly in the target table, and confirm that midPoint reports it and corrects it as configured. Verify that you can roll back the change by restoring the copy or reverting the resource configuration, and keep the evidence: the test cases, expected and actual results, configuration version and midPoint version. Store these results so the same tests run again after each midPoint upgrade and connector change, because a version change can alter behavior that worked before.

Common database connector failures and how to fix them

This table maps common failures in midPoint database connectors to their likely causes and fixes. Read it when a DatabaseTable, ScriptedSQL or Oracle resource misbehaves, and start with the application database logs and the midPoint task logs before changing any configuration.

SymptomLikely causeFix
Connection refused or TLS handshake error on the resource testWrong host or port, database listener not reachable from the midPoint server, or the client requires TLS settings the driver does not matchConfirm host, port and network path from the midPoint server, then check the database server TLS configuration and the JDBC URL parameters the connector passes
Insufficient privileges on a table or stored procedureThe service account lacks SELECT, INSERT, UPDATE or DELETE on the table, or EXECUTE on the procedure used by a scriptGrant only the object privileges the connector configuration uses, then rerun the resource test and a single-account search before a full reconciliation
Duplicate identifiers causing wrong correlationThe chosen account identifier or correlation attribute is not unique in the SQL table, so midPoint links an identity to the wrong accountChoose a unique key column, enforce a unique constraint in the application database, and clean existing duplicates before enabling correlation rules
ScriptedSQL script fails on NULL or unexpected column typesScripts assume non-null values or a fixed type, so a NULL, a numeric string or a date value breaks the expression or the SQL callAdd explicit null checks and type conversion in the script, test with records that contain NULLs and edge values, and log the input values on failure
Reconciliation disables or deletes more accounts than expectedA filter or query returns fewer rows than the source data, often from a changed view, an empty export or a wrong WHERE clause, so midPoint treats missing accounts as removedVerify the row count from the source before the run, set safety thresholds for mass deletion or disablement, and run a dry review of affected accounts first
Time zone or character encoding mismatchDates shift by an offset between the database and midPoint, or accented names are stored or compared incorrectly because client and database encodings differConfirm the database and JDBC session time zone and character set, store timestamps in a documented zone, and test with non-ASCII names
Connection pool exhaustion when many tasks run at onceParallel reconciliation, import and live sync tasks open more connections than the database or the pool allowsReduce concurrent task schedules, set the pool size against the database connection limit, and consider a connection pooler such as PgBouncer where PostgreSQL is the target

When to generate a connector instead of writing SQL scripts

The decision to generate a connector should turn on how stable the application's data model is, not on how quickly a script can be written. A custom application with a stable API or a well-defined schema is often better served by a generated ConnId connector than by a long ScriptedSQL script that the team has to keep working as the application changes. Scripts that read and write tables directly couple midPoint to the application's internal layout, so every schema change becomes a change to the provisioning logic. If the application already exposes a documented interface, ask first whether that interface can carry the provisioning calls, because a connector built on it usually breaks less often than one built on raw SQL.

The connector generator is described for midPoint 4.11 in the sibling topic on building a custom midPoint connector with ConnId. Confirm the generator's current capabilities, supported inputs and the exact output for your target application against the Evolveum connectors documentation and the release notes for your midPoint version before you plan around it. Do not assume that generated output is production ready. Generated code, like any hand-written connector, needs code review, functional testing against a non-production copy of the application, and negative tests for failed or partial operations such as a disabled account that cannot be deleted.

Whichever route you choose, name one owner for the connector and its version. Record which midPoint version it was built and tested against, how the connector bundle is identified and versioned, and who approves a change to it. Connector trust also applies: a generated connector runs with the privileges of the account midPoint uses to reach the database, so review what it can read and write before it goes into production. Ask the implementation partner to state in the written scope who reviews the generated code, who maintains it after go-live and how it is retested after each midPoint upgrade.

Questions buyers ask about midPoint database connectors

What drives the effort of a midPoint database connector project?

The main drivers are the number of tables and views midPoint must read or write, how many business rules live in SQL rather than in midPoint, how passwords are stored and verified, and how many applications the same pattern must cover. A single table with clean keys and a plain password column is a small job. A set of normalized tables with status codes, history rows and vendor-specific password hashing takes more mapping, more testing and more review time. Ask any partner to list each table, each attribute and each lifecycle state in writing before quoting, because that list is what the work is priced and scheduled against.

Can our own team build a midPoint database connector without outside help?

Yes, a team can do it alone if it has solid SQL skills, working knowledge of midPoint resources, mappings and synchronization, and a test copy of the application database. The first connector is usually the slowest, because the team must learn how the DatabaseTable and ScriptedSQL connectors behave against its schema. Most teams underestimate reconciliation testing, which needs realistic data and repeatable cases for joiners, movers and leavers. An outside partner adds value mainly when those skills are thin or the deadline is fixed, and the written scope should say which part each side owns.

What do we need to provide for a database connector engagement?

You need named owners for each source table, read access to the schema and sample data, and a DBA who can create or review a dedicated service account with the minimum privileges the connector needs. A test environment that mirrors production table structure is essential, along with someone who can confirm business meaning for each status column. You also need a sign-off step for the mapping sheet, which lists each midPoint attribute, its source column, its transformation and its owner. Without that sheet approved before build, changes tend to arrive late and expensive.

Does midPoint support Oracle database accounts through a catalog connector?

The Evolveum connector catalog lists an Oracle connector for database accounts, but its support status is unknown in the material available to us. Do not assume it is supported for your Oracle version, licensing or account model until Evolveum confirms it in writing. Ask whether the connector is covered by a Product Support subscription, which versions of Oracle it has been tested against, and whether a ScriptedSQL approach is the fallback they recommend. Your written scope should record the answer, because it affects who owns defects and how the connector is maintained.

What recurring work follows a database connector after go-live?

Reconciliation runs continue on a schedule, so someone must review discrepancy reports, decide which side is wrong and fix the cause. Upgrades of midPoint, the database driver and the source application can change behavior, so each one needs regression tests against the connector. Custom scripts in ScriptedSQL need maintenance whenever the schema changes, and the password handling must be rechecked after any change to hashing or authentication policy. Plan a named owner and a change process for these tasks before go-live, since they continue for as long as the connector runs.

How is a fixed-scope database connector engagement agreed?

DeployOpen works on most engagements under a fixed scope, with scope, deliverables and timelines agreed in writing before work starts. For this topic, that document should list the applications and tables in scope, the attributes and mappings, the test cases, the acceptance criteria, the client responsibilities described above and the handling of any change requests. The quote follows from that written scope, and DeployOpen does not publish a price list. Ongoing support, upgrades and continuous testing can be added as a retainer once the connector is live.

How DeployOpen scopes and delivers a midPoint database integration

DeployOpen plans, builds, tests and documents midPoint connectors for database-backed and custom applications inside your own infrastructure. Each engagement starts from a written, fixed scope that names the source tables, the connector choice and the systems that will consume the accounts.

How we scope

  • We inventory the in-house applications, their SQL tables and who owns each schema before choosing a connector.
  • We document whether a DatabaseTable or ScriptedSQL connector fits each application and confirm its support status with you.
  • The written scope lists resources, attributes, correlation rules, deliverables and timelines, and engagements are fixed-scope.

How we build

  • We configure resources, mappings and a dedicated low-privilege database account in a non-production midPoint environment first.
  • We test create, update, disable and delete flows against copies of production-like tables, including reconciliation and safety thresholds.
  • We write any custom script or generated connector code under version control so your team can review, test and reproduce it.

How we hand over

  • You receive configuration exports, connector versions, database account permissions and a runbook for the integration.
  • We document the expected table structure, failure handling, and the steps for rotating the database credential.
  • Knowledge transfer sessions walk your administrators through monitoring, troubleshooting and restoring the connector configuration.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Retainers can cover midPoint and connector upgrades, including re-testing the database integration after each release.
  • We can retest the integration after schema changes in the source application, using the same written scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.