Oracle Ecosystem Integration (OID & OUD)
Relevant source files
The following files were used as context for generating this wiki page:
The Oracle Ecosystem Integration module provides specialized handling for Oracle Internet Directory (OID) and Oracle Unified Directory (OUD) within the flext-ldif library. This integration ensures that Oracle-specific LDIF extensions, such as unique attribute types, objectClasses, and Access Control Lists (ACLs), are correctly parsed, normalized to RFC standards, and preserved during round-trip operations.
The system employs a server-based architecture where OID and OUD implementations wrap base RFC parsers to apply specific transformations. This includes handling Oracle's 2.16.840.1.113894.* OID namespace, specialized boolean attribute mapping, and normalization of non-standard schema syntax (e.g., "AUXILLARY" typo correction).
Sources: src/flext_ldif/servers/_oid/schema.py:317-328, src/flext_ldif/constants.py:108-112, tests/integration/test_oid_integration.py:1-12
Architecture and Components
The integration is built upon specialized server classes that implement normalization hooks during the LDIF lifecycle. The FlextLdifServersOidSchema class serves as the primary engine for OID-specific schema transformations.
The diagram above illustrates how Oracle-specific server implementations wrap the base RFC parser to produce compliant LDIF output while preserving original metadata.
Sources: src/flext_ldif/servers/_oid/schema.py:20-55, src/README.md:20-35
Core Components Table
| Component | Responsibility | Relevant Files |
|---|---|---|
FlextLdifServersOidSchema | Handles OID schema parsing, normalization of matching rules, and SUP values. | src/flext_ldif/servers/_oid/schema.py |
FlextLdifConstants.Ldif | Defines Oracle-specific OIDs, boolean attributes, and attribute transformation maps. | src/flext_ldif/constants.py |
LdifClient | The public API facade used to invoke Oracle-specific parsing via server_type. | tests/integration/test_oid_integration.py |
Schema Normalization Logic
Oracle schema definitions often deviate from strict RFC 4512 standards. The library implements several "hooks" to automatically correct these deviations during ingestion.
Attribute Normalization
The _normalize_oid_attribute method handles the translation of Oracle-specific matching rules and syntax OIDs to their RFC equivalents. For instance, it moves caseIgnoreSubstringsMatch from the EQUALITY field to the SUBSTR field where appropriate.
Sources: src/flext_ldif/servers/_oid/schema.py:102-125, src/flext_ldif/servers/_oid/schema.py:270-295
ObjectClass Normalization
The library corrects common Oracle-specific non-standard formatting in ObjectClasses:
- Typo Correction: Automatically transforms the non-standard "AUXILLARY" to the RFC-compliant "AUXILIARY".
- SUP Normalization: Normalizes variations of the "top" superior class (e.g.,
( top ),'top') to a cleantopstring. - Case Mapping: Applies specific case mappings for attribute names within
MUSTandMAYlists.
Sources: src/flext_ldif/servers/_oid/schema.py:145-165, src/flext_ldif/servers/_oid/schema.py:183-205
Data Flow: Parsing and Transformation
The data flow follows a "Phase 1: Normalization" (Parsing) and "Phase 2: Denormalization" (Writing) pattern to ensure that Oracle-specific details are not lost when converting to RFC format.
This sequence ensures that while the internal model remains RFC-compliant, the library can regenerate the original Oracle-specific formatting when writing back to LDIF.
Sources: src/flext_ldif/servers/_oid/schema.py:228-255, src/flext_ldif/servers/_oid/schema.py:297-315
Attribute and Access Control Mapping
The integration maps various Oracle-specific attributes to RFC counterparts and identifies boolean attributes that require special "1/0" vs "TRUE/FALSE" handling.
Key Mappings Table
| Oracle Attribute/Constant | RFC Counterpart / Description | Type |
|---|---|---|
orclguid | entryUUID | Attribute Transformation |
orclaci | aci | ACL Transformation |
orclentrylevelaci | aci | ACL Transformation |
OID_TRUE ("1") | TRUE | Boolean Mapping |
OID_FALSE ("0") | FALSE | Boolean Mapping |
| Sources: src/flext_ldif/constants.py:145-155, src/flext_ldif/constants.py:133-143 |
Boolean Attribute Handling
Oracle directories use 1 and 0 for boolean values. The library tracks a specific set of attributes (e.g., orclisenabled, orclaccountlocked, pwdlockout) to apply these conversions automatically.
Sources: src/flext_ldif/constants.py:114-132
Integration and Validation
The library provides comprehensive integration tests to ensure that Oracle-specific structures are preserved. This includes:
- ACL Preservation: Verifying that
orclaciandorclentrylevelaciare preserved during round-trips. - Metadata Tracking: Attaching
SCHEMA_ORIGINAL_FORMATandSCHEMA_SOURCE_SERVERmetadata to parsed entries. - Detection Patterns: Using the
2.16.840.1.113894.*namespace to automatically identify OID/OUD content.
Sources: tests/integration/test_oid_integration.py:84-95, src/flext_ldif/constants.py:168-180, tests/integration/test_oud_integration.py:125-145
Summary
The Oracle Ecosystem Integration module enables the FLEXT-LDIF library to function as a bridge between legacy Oracle Directory environments (OID/OUD) and modern RFC-compliant systems. By implementing specialized normalization hooks and metadata preservation, it allows developers to migrate, transform, and validate Oracle LDIF data without losing server-specific characteristics like ACLs or proprietary schema extensions.