lsc icon indicating copy to clipboard operation
lsc copied to clipboard

require createValues, defaultValues and forceValues in xsd

Open davidcoutadeur opened this issue 1 year ago • 4 comments

In a LSC synchronization DB -> DB, I noticed that defaultValues, forceValues and createValues are mandatory, else we get a generic nullPointerException. (which is hard to understand)

For example, this one is ok:

        <dataset>
          <name>userPassword</name>
          <policy>KEEP</policy>
          <defaultValues>
            <string>"changethis"</string>
          </defaultValues>
          <forceValues></forceValues>
          <createValues></createValues>
        </dataset>

This one is ko:

        <dataset>
          <name>userPassword</name>
          <policy>KEEP</policy>
          <defaultValues>
            <string>"changethis"</string>
          </defaultValues>
        </dataset>

I think it could be a good idea to fail fast when the tags are absent

Maybe we could make the default/force/createValues to be mandatory in the XSD verification?

davidcoutadeur avatar May 31 '23 12:05 davidcoutadeur

I think we should not require them, as they are not mandatory for a DB -> LDAP or LDAP -> LDAP connector. There is no reason that a dataset has to be specific to source or destination type.

coudot avatar May 31 '23 12:05 coudot

Ok, if it is not mandatory for DB -> LDAP or LDAP -> LDAP.

By the way, it can be interesting to give a look to the code to understand why it is required for DB -> DB.

davidcoutadeur avatar May 31 '23 13:05 davidcoutadeur

Indeed, I consider this is a bug and has to be fixed.

coudot avatar May 31 '23 13:05 coudot

I don't reproduce with a hsqldb -> ldap connector.

Maybe this is specific to a special database. The bug was found on a DB2 -> LDAP connector

davidcoutadeur avatar Oct 06 '23 17:10 davidcoutadeur