[midPoint] Custom Schema and ProtectedString

Paul Heaney lists at pheaney.co.uk
Tue Oct 1 21:11:25 CEST 2013


Hi Radovan,

Many thanks for this, I'm now trying to synchronise the ProtectedString 
though it is not synchronising.  I have the following attribute map:

<c:attribute>
<c:ref 
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-2">ri:carLicense</c:ref>
<c:displayName>Car License</c:displayName>
<c:access>create</c:access>
<c:access>read</c:access>
<c:access>update</c:access>
<c:outbound>
<c:source>
<c:path xmlns:jim="http://justidm.salfordsoftware.co.uk/xml/ns/justIDM"
                           
xmlns:gen859="http://midpoint.evolveum.com/xml/ns/fake/sqlRepository-1.xsd"
                           xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                           
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-2"
                           
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">$user/extension/jim:topSecret</c:path>
</c:source>
<c:expression>
<c:script>
<c:language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</c:language>
<c:returnType>scalar</c:returnType>
<c:code xmlns:jim="http://justidm.salfordsoftware.co.uk/xml/ns/justIDM"
                              
xmlns:gen859="http://midpoint.evolveum.com/xml/ns/fake/sqlRepository-1.xsd"
                              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                              
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-2"
                              
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                           topSecret.getClearValue()
</c:code>
</c:script>
</c:expression>
</c:outbound>
</c:attribute>

though this never appears to attempt to synchronise the value, (if I 
leave of the getClearValue I get an exception about a type mismatch 
between String and ProtectedStringType which is what I would expect).

Also I suspect this is inteded behaviour though via the UI two text 
entry boxes appear for protected strings as if it was a password.

Thanks
Paul

On 01/10/13 15:49, Radovan Semancik wrote:
> Hi Paul,
>
> Yes, it should work. However midPoint schema extension is XSD schema 
> as any other. If you want to use datatypes from other schema you have 
> to import it. Therefore use proper <xsd:import>:
>
> <xsd:schema elementFormDefault="qualified"
>             
> targetNamespace="http://justidm.salfordsoftware.co.uk/xml/ns/justIDM"
>             
> xmlns:tns="http://justidm.salfordsoftware.co.uk/xml/ns/justIDM"
>             
> xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-2"
>             
> xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> <xsd:import 
> namespace="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"/>
>
> <xsd:complexType name="UserExtensionType">
>
> ................
>




More information about the midPoint mailing list