[midPoint] define custom schema for ldap resource

Jeria, Esteban esteban.jeria at cgi.com
Wed Jun 13 18:11:20 CEST 2018


Hi,

I'm trying to figure out how to define an auxiliary object class to overwrite or extend a ldap resource schema.
We have an old Oracle Directory Server that has some custom classes which are not properly configured or they are incomplete, so instead of try to fix them, I was wondering if there is a way to use my own schema definition and add it to the one retrieved from resource at the run-time.
I looked in your wiki page and in this forum but all that I found is how to extend the midPoint schema and not the one of a resource.

---------
I tried adding the custom-ldap-extension.xsd on midPoint directory/schema

<xsd:schema elementFormDefault="qualified"
     targetNamespace="http://midpoint.evolveum.com/xml/ns/custom/ldap-extension"
     xmlns:tns="http://midpoint.evolveum.com/xml/ns/custom/ldap-extension"
     xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-3"
     xmlns:ra="http://midpoint.evolveum.com/xml/ns/public/resource/annotation-3"
     xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:import namespace="http://prism.evolveum.com/xml/ns/public/annotation-3"/>
     <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/resource/annotation-3"/>

   <xsd:complexType name="customprofile">
      <xsd:annotation>
         <xsd:appinfo>
            <ra:resourceObject/>
            <ra:nativeObjectClass>customprofile</ra:nativeObjectClass>
         </xsd:appinfo>
      </xsd:annotation>

      <xsd:sequence>
         <xsd:element name="matricule" type="xsd:string" maxOccurs="unbounded" minOccurs="0">
            <xsd:annotation>
               <xsd:appinfo>
                  <a:displayOrder>150</a:displayOrder>
                  <ra:nativeAttributeName>matricule</ra:nativeAttributeName>
                  <ra:frameworkAttributeName>matricule</ra:frameworkAttributeName>
               </xsd:appinfo>
            </xsd:annotation>
         </xsd:element>
...

Then I restricted the schema definition to only the standard classes
...
      <schema>
         <generationConstraints>
             <generateObjectClass>ri:groupOfNames</generateObjectClass>
             <generateObjectClass>ri:inetOrgPerson</generateObjectClass>
             <generateObjectClass>ri:organizationalUnit</generateObjectClass>
             <generateObjectClass>ri:person</generateObjectClass>
         </generationConstraints>
...

And I added the reference to the namespace on the connector
           xmlns:ext="http://prism.evolveum.com/xml/ns/custom/ldap-extension"

but, I didn't find a way to make it work when trying to map the attributes from this class.


Esteban Jeria
esteban.jeria at cgi.com<mailto:esteban.jeria at cgi.com>
Conseiller CGI / CGI Consultant
Sécurité - Gestion des Identités et des Accès / Security - Identity and Access Management

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180613/c991c7fb/attachment.htm>


More information about the midPoint mailing list