Le 12/03/2015 15:00, Jephte Clain a écrit :
for instance, I'm looking for a way to DISABLE the delimiter. some users
have a ";" in their passwords. I cannot know in advance what
characters may
be used, so I'd like to disable the feature entirely
is this even possible? the doc says about defaultDelimiter:
"This is the value used to split multiple values when are provided as a
single one. Each attribute definition (see below) can define its own
delimiter, but this attribute define the default one : "
- it says "see below": where exactly? I don't find any info about
delimiter
in attribute definition
- it doesn't tell how to disable it
You can't disable it.
how unfortunate :-(
I'm seriously considering if LSC is the right tool for us...
Are we really the first ones to have this kind of problems?
hello,
I took the time to somewhat dive into LSC 2.1.3 source
Value splitting is done *only* for MERGE and CREATE policies. With
FORCE, the value is copied as is. So initially setting the password with
<createValues> triggers (what I consider) the bug
I guess very few people initialize password with <createValue>. This
would explain why we are the first to hit this bug.
- I consider it a bug because delimiter is ignored for forceValues,
contrary to what the doc says
- But I still think that one should be allowed to disable delimiter or
defaultDelimiter. BeanComparator is already designed to handle this
situation because it checks delimiter != null
I attach two simple patches. They are based on LSC 2.1.3 source tree
- the first one allows defaultDelimiter to be null (i.e.
<defaultDelimiter></defaultDelimiter> or <defaultDelimiter/>)
When both defaultDelimiter and delimiter are null, they are ignored,
i.e. there is no delimiter.
A quick test shows no evident problem and solve my problem. If you
consider it worthy, I will submit it to the forge
note: the patch only updates src/main/resources/schemas/lsc-core-2.1.xsd
the dependent file
src/main/java/org/lsc/configuration/PropertiesBasedSyncOptionsType.java
is regenerated with mvn package
- The second one enable value splitting with <forceValues>. I didn't
test it, so it needs reviews before considered worthy
Best regards,
--
Jephté CLAIN | Développeur / Intégrateur d'applications
Service Systèmes d'Information http://dsiun.univ-reunion.fr
Tel: +262 262 93 86 31 || Mobile: +262 692 29 58 24 ||
http://www.univ-reunion.fr
From c59afaff5c3795aa21e6607e7ab3214e070dade8 Mon Sep 17 00:00:00 2001
From: Jephte CLAIN <[email protected]>
Date: Fri, 13 Mar 2015 13:44:57 +0400
Subject: [PATCH] Allows defaultDelimiter to be null
When defaultDelimiter or delimiter are null, they are ignored
---
src/main/resources/schemas/lsc-core-2.1.xsd | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/schemas/lsc-core-2.1.xsd b/src/main/resources/schemas/lsc-core-2.1.xsd
index 4c0d279..e452440 100644
--- a/src/main/resources/schemas/lsc-core-2.1.xsd
+++ b/src/main/resources/schemas/lsc-core-2.1.xsd
@@ -301,7 +301,7 @@
<xsd:extension base="syncOptionsType">
<xsd:sequence>
<xsd:element name="defaultDelimiter" type="xsd:string"
- default=";" />
+ />
<xsd:element name="defaultPolicy" type="policyType"
default="FORCE" />
<xsd:element name="conditions" type="conditionsType"
--
1.7.2.5
>From baad9f6ed22662cd85804e2e4c50ed059f971927 Mon Sep 17 00:00:00 2001
From: Jephte CLAIN <[email protected]>
Date: Fri, 13 Mar 2015 13:58:01 +0400
Subject: [PATCH] Enable value splitting with forceValues
---
src/main/java/org/lsc/beans/BeanComparator.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/lsc/beans/BeanComparator.java b/src/main/java/org/lsc/beans/BeanComparator.java
index 094043b..4ee77aa 100644
--- a/src/main/java/org/lsc/beans/BeanComparator.java
+++ b/src/main/java/org/lsc/beans/BeanComparator.java
@@ -605,7 +605,7 @@ public final class BeanComparator {
}
}
- return attrValues;
+ return splitValues(task, attrName, attrValues);
}
// No force values
--
1.7.2.5
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users