This project provides a custom connector for MidPoint that enables secure management of local accounts and groups on Windows hosts.
It consists of three integrated components working together to deliver end-to-end encryption, certificate-based trust, and provisioning capabilities.
- Built on Identity Connector Framework (ICF).
- Acts as the bridge between MidPoint and Windows machines through ZeroMQ.
- Responsibilities:
- Defines the schema for users and groups.
- Executes queries for accounts (
allAccounts) and groups (allGroups). - Handles
ping/testoperations for health checks. - Translates Windows user/group attributes into MidPoint objects:
- Users: password policy, login scripts, flags, storage limits, last login, group memberships, etc.
- Groups: SID, type, description, schema name
- Located in
midpoint-idmext-ca. - Implements a lightweight CA server with PostgreSQL and ZeroMQ.
- Responsibilities:
- Generates and signs certificates:
CA_IDMEXT(root CA)MIDPOINT_IDMEXT(connector identity)- Certificates for Windows hosts/users
- Stores certificates securely in PostgreSQL (
certificatestable). - Provides ZeroMQ API for:
- Returning CA, MidPoint, or user certificates
- Signing CSRs (Certificate Signing Requests)
- Distributing RESOURCE_ID and RESOURCE_SECRET credentials
- Generates and signs certificates:
- Security:
config.iniis encrypted with Fernet.- Runs as a systemd service for persistence.
- Implemented as
MidPointWindowsConnectorService. - Runs as a Windows Service using .NET Core.
- Responsibilities:
- ZeroMQ server that listens for connector requests.
- Secure messaging:
- Messages encrypted with AES-GCM.
- AES keys wrapped with RSA.
- Data compressed with Brotli.
- Certificate management:
- Retrieves CA and connector certificates from the CA server.
- Generates host CSRs and stores signed certificates in Windows Certificate Store.
- Auto-renews certificates before expiration.
- Local account/group management:
- Enumerates local users (
allAccounts). - Enumerates groups (
allGroups). - Fetches users or groups by name, or groups from a given user.
- Enumerates local users (
- Authentication:
- Validates
RESOURCE_IDandRESOURCE_SECRETstored in Windows Registry. - Values are encrypted with the machine’s private key.
- Validates
-
CA Service (Python)
- Initializes the CA (
CA_IDMEXT) and issues the MidPoint connector certificate (MIDPOINT_IDMEXT). - Provides secure distribution of credentials and certificates.
- Initializes the CA (
-
Windows Service (C#)
- Requests certificates from the CA.
- Registers machine credentials.
- Answers connector queries (users, groups, memberships).
-
Connector (Java)
- Connects to Windows Service via ZeroMQ.
- Executes provisioning/search requests.
- Relays results back to MidPoint.
- Java → ICF, Unirest, Brotli4j
- Python → cryptography, psycopg2, ZeroMQ
- .NET (C#) → NetMQ, BouncyCastle, DirectoryServices
- PostgreSQL → Certificate storage
-
Linux (CA Server)
- Runs the Python CA service (
midpoint-idmext-ca). - Manages PostgreSQL and certificates.
- Runs the Python CA service (
-
Windows (Target Machines)
- Runs the
MidPointWindowsConnectorServiceas a Windows Service. - Manages local users/groups and handles encrypted communication.
- Runs the
-
MidPoint (Identity Manager)
- Uses the Java connector to integrate with Windows machines.