http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/PlainSchemaValidator.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/PlainSchemaValidator.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/PlainSchemaValidator.java index 4bbb240..2817795 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/PlainSchemaValidator.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/PlainSchemaValidator.java @@ -20,7 +20,6 @@ package org.apache.syncope.core.persistence.jpa.validation.entity; import javax.validation.ConstraintValidatorContext; import org.apache.commons.lang3.StringUtils; -import org.apache.syncope.common.lib.EntityTOUtils; import org.apache.syncope.common.lib.types.AttrSchemaType; import org.apache.syncope.common.lib.types.EntityViolationType; import org.apache.syncope.core.persistence.api.entity.PlainSchema; @@ -29,37 +28,30 @@ public class PlainSchemaValidator extends AbstractValidator<PlainSchemaCheck, Pl @Override public boolean isValid(final PlainSchema schema, final ConstraintValidatorContext context) { - boolean isValid = schema.getKey() != null && !EntityTOUtils.ANY_FIELDS.contains(schema.getKey()); + boolean isValid = schema.getType() != AttrSchemaType.Enum + || StringUtils.isNotBlank(schema.getEnumerationValues()); if (!isValid) { + context.disableDefaultConstraintViolation(); context.buildConstraintViolationWithTemplate( - getTemplate(EntityViolationType.InvalidName, "Invalid PlainSchema name")). - addPropertyNode("name").addConstraintViolation(); + getTemplate(EntityViolationType.InvalidSchemaEnum, "Enumeration values missing")). + addPropertyNode("enumerationValues").addConstraintViolation(); } else { - isValid = schema.getType() != AttrSchemaType.Enum - || StringUtils.isNotBlank(schema.getEnumerationValues()); + isValid = schema.getType() != AttrSchemaType.Encrypted + || (schema.getSecretKey() != null && schema.getCipherAlgorithm() != null); if (!isValid) { context.disableDefaultConstraintViolation(); context.buildConstraintViolationWithTemplate( - getTemplate(EntityViolationType.InvalidSchemaEnum, "Enumeration values missing")). - addPropertyNode("enumerationValues").addConstraintViolation(); + getTemplate(EntityViolationType.InvalidSchemaEncrypted, + "SecretKey or CipherAlgorithm missing")). + addPropertyNode("secretKey").addPropertyNode("cipherAlgorithm").addConstraintViolation(); } else { - isValid = schema.getType() != AttrSchemaType.Encrypted - || (schema.getSecretKey() != null && schema.getCipherAlgorithm() != null); + isValid = !schema.isMultivalue() || !schema.isUniqueConstraint(); if (!isValid) { context.disableDefaultConstraintViolation(); context.buildConstraintViolationWithTemplate( - getTemplate(EntityViolationType.InvalidSchemaEncrypted, - "SecretKey or CipherAlgorithm missing")). - addPropertyNode("secretKey").addPropertyNode("cipherAlgorithm").addConstraintViolation(); - } else { - isValid = !schema.isMultivalue() || !schema.isUniqueConstraint(); - if (!isValid) { - context.disableDefaultConstraintViolation(); - context.buildConstraintViolationWithTemplate( - getTemplate(EntityViolationType.InvalidSchemaMultivalueUnique, - "Cannot contemporary be multivalue and have unique constraint")). - addPropertyNode("multiValue").addConstraintViolation(); - } + getTemplate(EntityViolationType.InvalidSchemaMultivalueUnique, + "Cannot contemporary be multivalue and have unique constraint")). + addPropertyNode("multiValue").addConstraintViolation(); } } }
http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RelationshipTypeValidator.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RelationshipTypeValidator.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RelationshipTypeValidator.java index 8051bda..9953859 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RelationshipTypeValidator.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RelationshipTypeValidator.java @@ -31,8 +31,8 @@ public class RelationshipTypeValidator extends AbstractValidator<RelationshipTyp if (MembershipType.getInstance().getKey().equalsIgnoreCase(object.getKey())) { context.buildConstraintViolationWithTemplate( - getTemplate(EntityViolationType.InvalidName, "Invalid RelationshipType name")). - addPropertyNode("name").addConstraintViolation(); + getTemplate(EntityViolationType.InvalidKey, "Invalid relationshipType name")). + addPropertyNode("key").addConstraintViolation(); return false; } http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RoleValidator.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RoleValidator.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RoleValidator.java index 29558a0..c1de34d 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RoleValidator.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RoleValidator.java @@ -28,10 +28,10 @@ public class RoleValidator extends AbstractValidator<RoleCheck, Role> { public boolean isValid(final Role role, final ConstraintValidatorContext context) { context.disableDefaultConstraintViolation(); - if (role.getKey() == null || !NAME_PATTERN.matcher(role.getKey()).matches()) { + if (role.getKey() == null || !KEY_PATTERN.matcher(role.getKey()).matches()) { context.buildConstraintViolationWithTemplate( - getTemplate(EntityViolationType.InvalidName, "Invalid Role name")). - addPropertyNode("name").addConstraintViolation(); + getTemplate(EntityViolationType.InvalidKey, "Invalid role key")). + addPropertyNode("key").addConstraintViolation(); return false; } http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/SchemaKeyValidator.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/SchemaKeyValidator.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/SchemaKeyValidator.java index b4d00d5..8c71620 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/SchemaKeyValidator.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/SchemaKeyValidator.java @@ -18,77 +18,37 @@ */ package org.apache.syncope.core.persistence.jpa.validation.entity; -import java.lang.reflect.Field; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; import javax.validation.ConstraintValidatorContext; -import org.apache.commons.lang3.ClassUtils; import org.apache.syncope.common.lib.types.EntityViolationType; import org.apache.syncope.core.persistence.api.entity.DerSchema; import org.apache.syncope.core.persistence.api.entity.PlainSchema; import org.apache.syncope.core.persistence.api.entity.VirSchema; -import org.apache.syncope.core.persistence.jpa.entity.anyobject.JPAAnyObject; -import org.apache.syncope.core.persistence.jpa.entity.conf.JPAConf; -import org.apache.syncope.core.persistence.jpa.entity.group.JPAGroup; -import org.apache.syncope.core.persistence.jpa.entity.user.JPAUser; +import org.apache.syncope.core.persistence.jpa.entity.JPAAnyUtils; public class SchemaKeyValidator extends AbstractValidator<SchemaKeyCheck, Object> { - private static final Set<String> UNALLOWED_SCHEMA_KEYS = new HashSet<>(); - - static { - initUnallowedSchemaKeys(JPAAnyObject.class, UNALLOWED_SCHEMA_KEYS); - initUnallowedSchemaKeys(JPAGroup.class, UNALLOWED_SCHEMA_KEYS); - initUnallowedSchemaKeys(JPAUser.class, UNALLOWED_SCHEMA_KEYS); - initUnallowedSchemaKeys(JPAConf.class, UNALLOWED_SCHEMA_KEYS); - } - - private static void initUnallowedSchemaKeys(final Class<?> entityClass, final Set<String> keys) { - List<Class<?>> classes = ClassUtils.getAllSuperclasses(entityClass); - if (!classes.contains(JPAUser.class)) { - classes.add(JPAUser.class); - } - for (Class<?> clazz : classes) { - for (Field field : clazz.getDeclaredFields()) { - if (!Collection.class.isAssignableFrom(field.getType()) - && !Map.class.isAssignableFrom(field.getType())) { - - keys.add(field.getName()); - } - } - } - } - @Override public boolean isValid(final Object object, final ConstraintValidatorContext context) { - String schemaName; - Set<String> unallowedNames = UNALLOWED_SCHEMA_KEYS; + String key = null; if (object instanceof PlainSchema) { - schemaName = ((PlainSchema) object).getKey(); + key = ((PlainSchema) object).getKey(); } else if (object instanceof DerSchema) { - schemaName = ((DerSchema) object).getKey(); + key = ((DerSchema) object).getKey(); } else if (object instanceof VirSchema) { - schemaName = ((VirSchema) object).getKey(); - } else { - schemaName = null; - unallowedNames = Collections.emptySet(); + key = ((VirSchema) object).getKey(); } - boolean isValid = NAME_PATTERN.matcher(schemaName).matches(); + boolean isValid = KEY_PATTERN.matcher(key).matches(); if (!isValid) { context.disableDefaultConstraintViolation(); context.buildConstraintViolationWithTemplate( - getTemplate(EntityViolationType.InvalidName, "Invalid Schema name")). - addPropertyNode("name").addConstraintViolation(); - } else if (unallowedNames.contains(schemaName)) { + getTemplate(EntityViolationType.InvalidKey, "Invalid schema key")). + addPropertyNode("key").addConstraintViolation(); + } else if (JPAAnyUtils.matchesFieldName(key)) { context.disableDefaultConstraintViolation(); context.buildConstraintViolationWithTemplate( - getTemplate(EntityViolationType.InvalidName, "Schema name not allowed: " + schemaName)). - addPropertyNode("name").addConstraintViolation(); + getTemplate(EntityViolationType.InvalidKey, "Schema key not allowed: " + key)). + addPropertyNode("key").addConstraintViolation(); return false; } http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/main/resources/domains/MasterContent.xml ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/resources/domains/MasterContent.xml b/core/persistence-jpa/src/main/resources/domains/MasterContent.xml index b5b4c9a..675a30c 100644 --- a/core/persistence-jpa/src/main/resources/domains/MasterContent.xml +++ b/core/persistence-jpa/src/main/resources/domains/MasterContent.xml @@ -22,6 +22,7 @@ under the License. <SyncopeConf id="cd64d66f-6fff-4008-b966-a06b1cc1436d"/> + <SyncopeSchema id="password.cipher.algorithm"/> <PlainSchema id="password.cipher.algorithm" type="String" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="56db89b9-119e-4923-a16e-f42823b90c66" @@ -33,6 +34,7 @@ under the License. + not existing: NotificationJob runs according to NotificationJob.DEFAULT_CRON_EXP + provided as empty string: NotificationJob disabled + provided as non-empty string: NotificationJob runs according to the given value --> + <SyncopeSchema id="notificationjob.cronExpression"/> <PlainSchema id="notificationjob.cronExpression" type="String" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="abd5a2d2-25ee-48b7-b5ca-76813b54a6f2" @@ -40,6 +42,7 @@ under the License. <CPlainAttrValue id="4828ea70-d151-4c16-b344-2d07b1956bee" attribute_id="abd5a2d2-25ee-48b7-b5ca-76813b54a6f2" stringValue=""/> + <SyncopeSchema id="notification.maxRetries"/> <PlainSchema id="notification.maxRetries" type="Long" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="0523d7e6-af13-4e1e-9edb-e35971aacee7" @@ -47,6 +50,7 @@ under the License. <CPlainAttrValue id="010e2bdc-0094-4918-bac3-d0d5ea17b54a" attribute_id="0523d7e6-af13-4e1e-9edb-e35971aacee7" longValue="3"/> + <SyncopeSchema id="token.length"/> <PlainSchema id="token.length" type="Long" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="58977caa-dcf7-4ae3-8591-7e3d0a395200" @@ -54,6 +58,7 @@ under the License. <CPlainAttrValue id="372e28e0-3af1-4774-b668-81aa84903b75" attribute_id="58977caa-dcf7-4ae3-8591-7e3d0a395200" longValue="256"/> + <SyncopeSchema id="token.expireTime"/> <PlainSchema id="token.expireTime" type="Long" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="01f69abd-df85-4e1b-bb88-ad570594e045" @@ -61,6 +66,7 @@ under the License. <CPlainAttrValue id="963970cf-4af6-46bb-875b-a1b758ac8d05" attribute_id="01f69abd-df85-4e1b-bb88-ad570594e045" longValue="60"/> + <SyncopeSchema id="selfRegistration.allowed"/> <PlainSchema id="selfRegistration.allowed" type="Boolean" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="7b19cefa-d606-477c-8431-c9464f53fe8b" @@ -68,6 +74,7 @@ under the License. <CPlainAttrValue id="c8b9a0f1-0168-4e2a-95b8-4819fc70e620" attribute_id="7b19cefa-d606-477c-8431-c9464f53fe8b" booleanValue="1"/> + <SyncopeSchema id="passwordReset.allowed"/> <PlainSchema id="passwordReset.allowed" type="Boolean" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="dc35cc97-6ed9-4bb2-bb3b-509f4cd8f3d3" @@ -75,6 +82,7 @@ under the License. <CPlainAttrValue id="b1ecea41-ab7c-4dd3-9e3e-b6baf0f98046" attribute_id="dc35cc97-6ed9-4bb2-bb3b-509f4cd8f3d3" booleanValue="1"/> + <SyncopeSchema id="passwordReset.securityQuestion"/> <PlainSchema id="passwordReset.securityQuestion" type="Boolean" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="e5a712ad-53fd-4102-ba55-fb45caed5f7b" @@ -82,6 +90,7 @@ under the License. <CPlainAttrValue id="b5e8e79d-8039-4318-9698-fe5e181ebe98" attribute_id="e5a712ad-53fd-4102-ba55-fb45caed5f7b" booleanValue="1"/> + <SyncopeSchema id="authentication.statuses"/> <PlainSchema id="authentication.statuses" type="String" multivalue="1" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="888ae8e1-a295-4ee2-a15e-31dbf6dfc3f9" owner_id="cd64d66f-6fff-4008-b966-a06b1cc1436d" schema_id="authentication.statuses"/> @@ -91,6 +100,7 @@ under the License. attribute_id="888ae8e1-a295-4ee2-a15e-31dbf6dfc3f9" stringValue="active"/> <!-- Save user login date upon successful authentication --> + <SyncopeSchema id="log.lastlogindate"/> <PlainSchema id="log.lastlogindate" type="Boolean" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="9891c0a7-27ee-4215-9eea-ca32e580b4e4" @@ -98,6 +108,7 @@ under the License. <CPlainAttrValue id="162dd874-0417-4bb9-9724-db1ff2952dd1" attribute_id="9891c0a7-27ee-4215-9eea-ca32e580b4e4" booleanValue="1"/> + <SyncopeSchema id="tasks.interruptMaxRetries"/> <PlainSchema id="tasks.interruptMaxRetries" type="Long" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="c2b9ca96-c6ef-433d-8287-0e0cfd0ad0db" @@ -106,6 +117,7 @@ under the License. attribute_id="c2b9ca96-c6ef-433d-8287-0e0cfd0ad0db" longValue="20"/> <!-- Return hashed password values when reading users --> + <SyncopeSchema id="return.password.value"/> <PlainSchema id="return.password.value" type="Boolean" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="bcfd7efc-0605-4b5e-b4bb-85c1d5f6493a" @@ -122,6 +134,7 @@ under the License. <AnyType_AnyTypeClass anyType_id="GROUP" anyTypeClass_id="BaseGroup"/> <!-- Actual plain schemas --> + <SyncopeSchema id="email"/> <PlainSchema id="email" type="String" anyTypeClass_id="BaseUser" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0" validatorClass="org.apache.syncope.core.persistence.jpa.attrvalue.validation.EmailAddressValidator"/> @@ -165,13 +178,13 @@ we are happy to inform you that the password request was execute successfully fo </body> </html>"/> - <Notification id="e00945b5-1184-4d43-8e45-4318a8dcdfd4" active="1" recipientAttrName="email" recipientAttrType="UserPlainSchema" selfAsRecipient="1" + <Notification id="e00945b5-1184-4d43-8e45-4318a8dcdfd4" active="1" recipientAttrName="email" selfAsRecipient="1" sender="ad...@syncope.apache.org" subject="Password Reset request" template_id="requestPasswordReset" traceLevel="FAILURES"/> <AnyAbout id="a328f2e6-25e9-4cc1-badf-7425d7be4b39" anyType_id="USER" notification_id="e00945b5-1184-4d43-8e45-4318a8dcdfd4" filter="token!=$null"/> <Notification_events notification_id="e00945b5-1184-4d43-8e45-4318a8dcdfd4" event="[CUSTOM]:[]:[]:[requestPasswordReset]:[SUCCESS]"/> - <Notification id="bef0c250-e8a7-4848-bb63-2564fc409ce2" active="1" recipientAttrName="email" recipientAttrType="UserPlainSchema" selfAsRecipient="1" + <Notification id="bef0c250-e8a7-4848-bb63-2564fc409ce2" active="1" recipientAttrName="email" selfAsRecipient="1" sender="ad...@syncope.apache.org" subject="Password Reset successful" template_id="confirmPasswordReset" traceLevel="FAILURES"/> <Notification_events notification_id="bef0c250-e8a7-4848-bb63-2564fc409ce2" event="[CUSTOM]:[]:[]:[confirmPasswordReset]:[SUCCESS]"/> http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java index c361614..511a359 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java @@ -114,7 +114,7 @@ public class ConfTest extends AbstractTest { fail(); } catch (InvalidEntityException e) { - assertTrue(e.hasViolation(EntityViolationType.InvalidName)); + assertTrue(e.hasViolation(EntityViolationType.InvalidKey)); } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java index 7907381..97764b8 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java @@ -94,7 +94,7 @@ public class DerSchemaTest extends AbstractTest { derSchemaDAO.save(schema); fail(); } catch (InvalidEntityException e) { - assertTrue(e.hasViolation(EntityViolationType.InvalidName)); + assertTrue(e.hasViolation(EntityViolationType.InvalidKey)); } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java index 94be88b..b2ef43c 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java @@ -23,7 +23,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.util.List; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO; import org.apache.syncope.core.persistence.api.dao.MailTemplateDAO; import org.apache.syncope.core.persistence.api.dao.NotificationDAO; @@ -78,7 +77,6 @@ public class NotificationTest extends AbstractTest { notification.setRecipientsFIQL("fake recipients"); notification.setRecipientAttrName("email"); - notification.setRecipientAttrType(IntMappingType.UserPlainSchema); notification.setSender("sync...@syncope.apache.org"); notification.setSubject("Test notification"); @@ -109,7 +107,6 @@ public class NotificationTest extends AbstractTest { notification.setRecipientsFIQL("fake search condition"); notification.setRecipientAttrName("email"); - notification.setRecipientAttrType(IntMappingType.UserPlainSchema); notification.getStaticRecipients().add("syncope...@syncope.apache.org"); @@ -136,7 +133,6 @@ public class NotificationTest extends AbstractTest { about.set("fake search condition"); notification.setRecipientAttrName("email"); - notification.setRecipientAttrType(IntMappingType.UserPlainSchema); notification.getStaticRecipients().add("syncope...@syncope.apache.org"); http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java index 8ded618..722eb5f 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java @@ -101,13 +101,12 @@ public class PlainSchemaTest extends AbstractTest { schema.setType(AttrSchemaType.Enum); schema.setKey("color"); - Exception ex = null; try { plainSchemaDAO.save(schema); + fail(); } catch (Exception e) { - ex = e; + assertNotNull(e); } - assertNotNull(ex); schema.setEnumerationValues("red" + SyncopeConstants.ENUM_VALUES_SEPARATOR + "yellow"); schema.setEnumerationKeys("1" + SyncopeConstants.ENUM_VALUES_SEPARATOR + "2"); @@ -146,7 +145,7 @@ public class PlainSchemaTest extends AbstractTest { plainSchemaDAO.save(schema); fail(); } catch (InvalidEntityException e) { - assertTrue(e.hasViolation(EntityViolationType.InvalidName)); + assertTrue(e.hasViolation(EntityViolationType.InvalidKey)); } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java index 19451e9..e08833f 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java @@ -26,12 +26,9 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.List; -import java.util.UUID; import org.apache.commons.collections4.IterableUtils; import org.apache.commons.collections4.Predicate; -import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.common.lib.types.EntityViolationType; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.common.lib.types.MappingPurpose; import org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntityException; import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO; @@ -120,7 +117,6 @@ public class ResourceTest extends AbstractTest { MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class); connObjectKey.setExtAttrName("username"); connObjectKey.setIntAttrName("fullname"); - connObjectKey.setIntMappingType(IntMappingType.UserKey); connObjectKey.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(connObjectKey); @@ -157,7 +153,6 @@ public class ResourceTest extends AbstractTest { MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class); connObjectKey.setConnObjectKey(true); - connObjectKey.setIntMappingType(IntMappingType.UserPlainSchema); mapping.add(connObjectKey); // save the resource @@ -184,7 +179,6 @@ public class ResourceTest extends AbstractTest { MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class); connObjectKey.setConnObjectKey(true); - connObjectKey.setIntMappingType(IntMappingType.UserVirtualSchema); mapping.setConnObjectKeyItem(connObjectKey); // save the resource @@ -212,12 +206,10 @@ public class ResourceTest extends AbstractTest { MappingItem item = entityFactory.newEntity(MappingItem.class); item.setConnObjectKey(true); item.setIntAttrName("fullname"); - item.setIntMappingType(IntMappingType.UserPlainSchema); mapping.add(item); item = entityFactory.newEntity(MappingItem.class); item.setIntAttrName("userId"); - item.setIntMappingType(IntMappingType.UserPlainSchema); mapping.add(item); resourceDAO.save(resource); @@ -241,7 +233,6 @@ public class ResourceTest extends AbstractTest { MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class); connObjectKey.setExtAttrName("username"); connObjectKey.setIntAttrName("fullname"); - connObjectKey.setIntMappingType(IntMappingType.UserKey); connObjectKey.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(connObjectKey); @@ -277,12 +268,10 @@ public class ResourceTest extends AbstractTest { MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class); connObjectKey.setExtAttrName("username"); connObjectKey.setIntAttrName("fullname"); - connObjectKey.setIntMappingType(IntMappingType.UserKey); connObjectKey.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(connObjectKey); MappingItem virtualMapItem = entityFactory.newEntity(MappingItem.class); - virtualMapItem.setIntMappingType(IntMappingType.UserVirtualSchema); virtualMapItem.setIntAttrName("virtualReadOnly"); virtualMapItem.setExtAttrName("TEST"); virtualMapItem.setPurpose(MappingPurpose.BOTH); @@ -324,21 +313,18 @@ public class ResourceTest extends AbstractTest { MappingItem item = entityFactory.newEntity(MappingItem.class); item.setIntAttrName("fullname"); item.setExtAttrName("fullname"); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(item); item = entityFactory.newEntity(MappingItem.class); item.setIntAttrName("icon"); item.setExtAttrName("icon"); - item.setIntMappingType(IntMappingType.GroupPlainSchema); item.setPurpose(MappingPurpose.BOTH); mapping.add(item); item = entityFactory.newEntity(MappingItem.class); item.setIntAttrName("mderiveddata"); item.setExtAttrName("mderiveddata"); - item.setIntMappingType(IntMappingType.AnyObjectDerivedSchema); item.setPurpose(MappingPurpose.PROPAGATION); mapping.add(item); @@ -346,18 +332,7 @@ public class ResourceTest extends AbstractTest { ExternalResource actual = resourceDAO.save(resource); assertNotNull(actual); - int items = 0; - for (MappingItem mapItem : actual.getProvision(anyTypeDAO.findUser()).getMapping().getItems()) { - items++; - - if ("icon".equals(mapItem.getIntAttrName())) { - assertTrue(IntMappingType.contains(AnyTypeKind.GROUP, mapItem.getIntMappingType().toString())); - } - if ("mderiveddata".equals(mapItem.getIntAttrName())) { - assertTrue(IntMappingType.contains(AnyTypeKind.ANY_OBJECT, mapItem.getIntMappingType().toString())); - } - } - assertEquals(3, items); + assertEquals(3, actual.getProvision(anyTypeDAO.findUser()).getMapping().getItems().size()); } @Test @@ -380,7 +355,7 @@ public class ResourceTest extends AbstractTest { resourceDAO.save(resource); fail(); } catch (InvalidEntityException e) { - assertTrue(e.hasViolation(EntityViolationType.InvalidName)); + assertTrue(e.hasViolation(EntityViolationType.InvalidKey)); } } @@ -405,7 +380,6 @@ public class ResourceTest extends AbstractTest { final MappingItem item = entityFactory.newEntity(MappingItem.class); item.setIntAttrName("icon"); item.setExtAttrName("icon"); - item.setIntMappingType(IntMappingType.GroupPlainSchema); item.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(item); http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java index 19193dd..192ef0f 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java @@ -107,7 +107,7 @@ public class VirSchemaTest extends AbstractTest { virSchemaDAO.save(schema); fail(); } catch (InvalidEntityException e) { - assertTrue(e.hasViolation(EntityViolationType.InvalidName)); + assertTrue(e.hasViolation(EntityViolationType.InvalidKey)); } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java index 1c3ad04..b93acbb 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java @@ -23,11 +23,15 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.util.HashSet; import java.util.Set; import java.util.UUID; +import javax.persistence.EntityExistsException; +import org.apache.syncope.common.lib.types.AttrSchemaType; import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO; +import org.apache.syncope.core.persistence.api.dao.DerSchemaDAO; import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO; import org.apache.syncope.core.persistence.api.dao.PlainAttrDAO; import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO; @@ -54,12 +58,32 @@ public class PlainSchemaTest extends AbstractTest { private PlainSchemaDAO plainSchemaDAO; @Autowired + private DerSchemaDAO derSchemaDAO; + + @Autowired private PlainAttrDAO plainAttrDAO; @Autowired private ExternalResourceDAO resourceDAO; @Test + public void checkIdUniqueness() { + assertNotNull(derSchemaDAO.find("cn")); + + PlainSchema schema = entityFactory.newEntity(PlainSchema.class); + schema.setKey("cn"); + schema.setType(AttrSchemaType.String); + plainSchemaDAO.save(schema); + + try { + plainSchemaDAO.flush(); + fail(); + } catch (Exception e) { + assertTrue(e instanceof EntityExistsException); + } + } + + @Test public void deleteFullname() { // fullname is mapped as ConnObjectKey for ws-target-resource-2, need to swap it otherwise validation errors // will be raised http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java index a8540bd..efe2349 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java @@ -29,7 +29,6 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.common.lib.types.MappingPurpose; import org.apache.syncope.common.lib.types.TaskType; import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO; @@ -132,7 +131,6 @@ public class ResourceTest extends AbstractTest { MappingItem item = entityFactory.newEntity(MappingItem.class); item.setExtAttrName("test" + i); item.setIntAttrName("nonexistent" + i); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setMandatoryCondition("false"); item.setPurpose(MappingPurpose.PULL); mapping.add(item); @@ -141,7 +139,6 @@ public class ResourceTest extends AbstractTest { MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class); connObjectKey.setExtAttrName("username"); connObjectKey.setIntAttrName("username"); - connObjectKey.setIntMappingType(IntMappingType.UserKey); connObjectKey.setPurpose(MappingPurpose.PROPAGATION); mapping.setConnObjectKeyItem(connObjectKey); connObjectKey.setMapping(mapping); @@ -151,7 +148,6 @@ public class ResourceTest extends AbstractTest { derived.setConnObjectKey(false); derived.setExtAttrName("fullname"); derived.setIntAttrName("cn"); - derived.setIntMappingType(IntMappingType.UserDerivedSchema); derived.setPurpose(MappingPurpose.PROPAGATION); mapping.add(derived); derived.setMapping(mapping); @@ -299,7 +295,6 @@ public class ResourceTest extends AbstractTest { int origMapItems = csv.getProvision(anyTypeDAO.findUser()).getMapping().getItems().size(); MappingItem newMapItem = entityFactory.newEntity(MappingItem.class); - newMapItem.setIntMappingType(IntMappingType.Username); newMapItem.setExtAttrName("TEST"); newMapItem.setPurpose(MappingPurpose.PROPAGATION); csv.getProvision(anyTypeDAO.findUser()).getMapping().add(newMapItem); http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/VirSchemaTest.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/VirSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/VirSchemaTest.java index 7a5b12e..7b00f82 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/VirSchemaTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/VirSchemaTest.java @@ -23,7 +23,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO; import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO; import org.apache.syncope.core.persistence.api.dao.VirSchemaDAO; @@ -74,7 +73,6 @@ public class VirSchemaTest extends AbstractTest { MappingItem item = virSchema.asLinkingMappingItem(); assertNotNull(item); - assertEquals(IntMappingType.UserVirtualSchema, item.getIntMappingType()); assertEquals(virSchema.getKey(), item.getIntAttrName()); } } http://git-wip-us.apache.org/repos/asf/syncope/blob/85dd9063/core/persistence-jpa/src/test/resources/domains/MasterContent.xml ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/resources/domains/MasterContent.xml b/core/persistence-jpa/src/test/resources/domains/MasterContent.xml index e956a90..2ff3310 100644 --- a/core/persistence-jpa/src/test/resources/domains/MasterContent.xml +++ b/core/persistence-jpa/src/test/resources/domains/MasterContent.xml @@ -22,6 +22,7 @@ under the License. <SyncopeConf id="cd64d66f-6fff-4008-b966-a06b1cc1436d"/> + <SyncopeSchema id="password.cipher.algorithm"/> <PlainSchema id="password.cipher.algorithm" type="String" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="56db89b9-119e-4923-a16e-f42823b90c66" @@ -33,6 +34,7 @@ under the License. + not existing: NotificationJob runs according to NotificationJob.DEFAULT_CRON_EXP + provided as empty string: NotificationJob disabled + provided as non-empty string: NotificationJob runs according to the given value --> + <SyncopeSchema id="notificationjob.cronExpression"/> <PlainSchema id="notificationjob.cronExpression" type="String" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="abd5a2d2-25ee-48b7-b5ca-76813b54a6f2" @@ -40,6 +42,7 @@ under the License. <CPlainAttrValue id="4828ea70-d151-4c16-b344-2d07b1956bee" attribute_id="abd5a2d2-25ee-48b7-b5ca-76813b54a6f2" stringValue="0/20 * * * * ?"/> + <SyncopeSchema id="notification.maxRetries"/> <PlainSchema id="notification.maxRetries" type="Long" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="0523d7e6-af13-4e1e-9edb-e35971aacee7" @@ -47,6 +50,7 @@ under the License. <CPlainAttrValue id="010e2bdc-0094-4918-bac3-d0d5ea17b54a" attribute_id="0523d7e6-af13-4e1e-9edb-e35971aacee7" longValue="3"/> + <SyncopeSchema id="token.length"/> <PlainSchema id="token.length" type="Long" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="58977caa-dcf7-4ae3-8591-7e3d0a395200" @@ -54,6 +58,7 @@ under the License. <CPlainAttrValue id="372e28e0-3af1-4774-b668-81aa84903b75" attribute_id="58977caa-dcf7-4ae3-8591-7e3d0a395200" longValue="256"/> + <SyncopeSchema id="token.expireTime"/> <PlainSchema id="token.expireTime" type="Long" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="01f69abd-df85-4e1b-bb88-ad570594e045" @@ -61,6 +66,7 @@ under the License. <CPlainAttrValue id="963970cf-4af6-46bb-875b-a1b758ac8d05" attribute_id="01f69abd-df85-4e1b-bb88-ad570594e045" longValue="60"/> + <SyncopeSchema id="selfRegistration.allowed"/> <PlainSchema id="selfRegistration.allowed" type="Boolean" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="7b19cefa-d606-477c-8431-c9464f53fe8b" @@ -68,6 +74,7 @@ under the License. <CPlainAttrValue id="c8b9a0f1-0168-4e2a-95b8-4819fc70e620" attribute_id="7b19cefa-d606-477c-8431-c9464f53fe8b" booleanValue="1"/> + <SyncopeSchema id="passwordReset.allowed"/> <PlainSchema id="passwordReset.allowed" type="Boolean" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="dc35cc97-6ed9-4bb2-bb3b-509f4cd8f3d3" @@ -75,6 +82,7 @@ under the License. <CPlainAttrValue id="b1ecea41-ab7c-4dd3-9e3e-b6baf0f98046" attribute_id="dc35cc97-6ed9-4bb2-bb3b-509f4cd8f3d3" booleanValue="1"/> + <SyncopeSchema id="passwordReset.securityQuestion"/> <PlainSchema id="passwordReset.securityQuestion" type="Boolean" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="e5a712ad-53fd-4102-ba55-fb45caed5f7b" @@ -82,6 +90,7 @@ under the License. <CPlainAttrValue id="b5e8e79d-8039-4318-9698-fe5e181ebe98" attribute_id="e5a712ad-53fd-4102-ba55-fb45caed5f7b" booleanValue="1"/> + <SyncopeSchema id="authentication.statuses"/> <PlainSchema id="authentication.statuses" type="String" multivalue="1" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="888ae8e1-a295-4ee2-a15e-31dbf6dfc3f9" owner_id="cd64d66f-6fff-4008-b966-a06b1cc1436d" schema_id="authentication.statuses"/> @@ -91,6 +100,7 @@ under the License. attribute_id="888ae8e1-a295-4ee2-a15e-31dbf6dfc3f9" stringValue="active"/> <!-- Save user login date upon successful authentication --> + <SyncopeSchema id="log.lastlogindate"/> <PlainSchema id="log.lastlogindate" type="Boolean" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="9891c0a7-27ee-4215-9eea-ca32e580b4e4" @@ -98,6 +108,7 @@ under the License. <CPlainAttrValue id="162dd874-0417-4bb9-9724-db1ff2952dd1" attribute_id="9891c0a7-27ee-4215-9eea-ca32e580b4e4" booleanValue="1"/> + <SyncopeSchema id="tasks.interruptMaxRetries"/> <PlainSchema id="tasks.interruptMaxRetries" type="Long" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="c2b9ca96-c6ef-433d-8287-0e0cfd0ad0db" @@ -106,6 +117,7 @@ under the License. attribute_id="c2b9ca96-c6ef-433d-8287-0e0cfd0ad0db" longValue="20"/> <!-- Return hashed password values when reading users --> + <SyncopeSchema id="return.password.value"/> <PlainSchema id="return.password.value" type="Boolean" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> <CPlainAttr id="bcfd7efc-0605-4b5e-b4bb-85c1d5f6493a" @@ -339,85 +351,121 @@ under the License. <UMembership id="8cfb78fc-d0e7-4f08-a0ae-d7abf3223b6f" user_id="823074dc-d280-436d-a7dd-07399fae48ec" group_id="ece66293-8f31-4a84-8e8d-23da36e70846"/> + <SyncopeSchema id="fullname"/> <PlainSchema id="fullname" type="String" anyTypeClass_id="minimal user" mandatoryCondition="true" multivalue="0" uniqueConstraint="1" readonly="0"/> + <SyncopeSchema id="userId"/> <PlainSchema id="userId" type="String" anyTypeClass_id="minimal user" mandatoryCondition="true" multivalue="0" uniqueConstraint="1" readonly="0" validatorClass="org.apache.syncope.core.persistence.jpa.attrvalue.validation.EmailAddressValidator"/> + <SyncopeSchema id="loginDate"/> <PlainSchema id="loginDate" type="Date" anyTypeClass_id="other" mandatoryCondition="false" multivalue="1" uniqueConstraint="0" readonly="0" conversionPattern="yyyy-MM-dd"/> + <SyncopeSchema id="firstname"/> <PlainSchema id="firstname" type="String" anyTypeClass_id="minimal user" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="surname"/> <PlainSchema id="surname" type="String" anyTypeClass_id="minimal user" mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="ctype"/> <PlainSchema id="ctype" type="String" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="email"/> <PlainSchema id="email" type="String" anyTypeClass_id="minimal user" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0" validatorClass="org.apache.syncope.core.persistence.jpa.attrvalue.validation.EmailAddressValidator"/> + <SyncopeSchema id="activationDate"/> <PlainSchema id="activationDate" type="Date" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0" conversionPattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ"/> + <SyncopeSchema id="uselessReadonly"/> <PlainSchema id="uselessReadonly" type="String" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="1"/> + <SyncopeSchema id="cool"/> <PlainSchema id="cool" type="Boolean" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="gender"/> <PlainSchema id="gender" type="Enum" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0" enumerationValues="M;F"/> + <SyncopeSchema id="aLong"/> <PlainSchema id="aLong" type="Long" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="makeItDouble"/> <PlainSchema id="makeItDouble" type="Long" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="obscure"/> <PlainSchema id="obscure" type="Encrypted" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0" secretKey="7abcdefghilmnopqrstuvz9#" cipherAlgorithm="SHA"/> + <SyncopeSchema id="photo"/> <PlainSchema id="photo" type="Binary" anyTypeClass_id="other" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0" mimeType="image/jpeg"/> + <SyncopeSchema id="csvuserid"/> <DerSchema id="csvuserid" expression="firstname + ',' + surname" anyTypeClass_id="csv"/> + <SyncopeSchema id="cn"/> <DerSchema id="cn" expression="surname + ', ' + firstname" anyTypeClass_id="minimal user"/> + <SyncopeSchema id="noschema"/> <DerSchema id="noschema" expression="surname + ', ' + notfound" anyTypeClass_id="other"/> + <SyncopeSchema id="info"/> <DerSchema id="info" expression="username + ' - ' + creationDate + '[' + failedLogins + ']'" anyTypeClass_id="minimal user"/> + <SyncopeSchema id="icon"/> <PlainSchema id="icon" type="String" anyTypeClass_id="minimal group" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="show"/> <PlainSchema id="show" type="Boolean" anyTypeClass_id="minimal group" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="rderived_sx"/> <PlainSchema id="rderived_sx" type="String" anyTypeClass_id="minimal group" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="rderived_dx"/> <PlainSchema id="rderived_dx" type="String" anyTypeClass_id="minimal group" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="title"/> <PlainSchema id="title" type="String" anyTypeClass_id="minimal group" mandatoryCondition="false" multivalue="1" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="rderiveddata"/> <DerSchema id="rderiveddata" expression="rderived_sx + '-' + rderived_dx" anyTypeClass_id="minimal group"/> + <SyncopeSchema id="displayProperty"/> <DerSchema id="displayProperty" expression="icon + ': ' + show" anyTypeClass_id="minimal group"/> + <SyncopeSchema id="rderToBePropagated"/> <DerSchema id="rderToBePropagated" expression="rderived_sx + '-' + rderived_dx" anyTypeClass_id="minimal group"/> + <SyncopeSchema id="rderivedschema"/> <DerSchema id="rderivedschema" expression="rderived_sx + '-' + rderived_dx" anyTypeClass_id="minimal group"/> + <SyncopeSchema id="subscriptionDate"/> <PlainSchema id="subscriptionDate" type="Date" anyTypeClass_id="generic membership" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0" conversionPattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ"/> + <SyncopeSchema id="mderived_sx"/> <PlainSchema id="mderived_sx" type="String" anyTypeClass_id="generic membership" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="mderived_dx"/> <PlainSchema id="mderived_dx" type="String" anyTypeClass_id="generic membership" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="postalAddress"/> <PlainSchema id="postalAddress" type="String" anyTypeClass_id="generic membership" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="mderiveddata"/> <DerSchema id="mderiveddata" expression="mderived_sx + '-' + mderived_dx"/> + <SyncopeSchema id="mderToBePropagated"/> <DerSchema id="mderToBePropagated" expression="mderived_sx + '-' + mderived_dx" anyTypeClass_id="generic membership"/> + <SyncopeSchema id="model"/> <PlainSchema id="model" type="String" anyTypeClass_id="minimal printer" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> + <SyncopeSchema id="location"/> <PlainSchema id="location" type="String" anyTypeClass_id="minimal printer" mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/> @@ -708,116 +756,116 @@ under the License. <Provision id="209ea85f-f964-49c7-a498-6c9c2baa3bd8" resource_id="ws-target-resource-1" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="bc0cf27b-16b7-4e83-a4b0-09af7ea4aacc" provision_id="209ea85f-f964-49c7-a498-6c9c2baa3bd8"/> <MappingItem id="96aad4e0-2678-4903-a52f-0a7d090a2863" mapping_id="bc0cf27b-16b7-4e83-a4b0-09af7ea4aacc" extAttrName="userId" - intMappingType="Username" mandatoryCondition="true" + intAttrName="username" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <MappingItem id="7f55b09c-b573-41dc-a9eb-ccd80bd3ea7a" extAttrName="email" mapping_id="bc0cf27b-16b7-4e83-a4b0-09af7ea4aacc" - intAttrName="email" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="email" mandatoryCondition="true" connObjectKey="0" password="0" purpose="PROPAGATION"/> <MappingItem id="a9749641-0556-49e2-a519-9bec35a4e06e" extAttrName="surname" mapping_id="bc0cf27b-16b7-4e83-a4b0-09af7ea4aacc" - intAttrName="surname" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="surname" mandatoryCondition="true" connObjectKey="0" password="0" purpose="PROPAGATION"/> <MappingItem id="d118671c-2e3e-4aa3-a3dd-fde2ba4c4ded" mapping_id="bc0cf27b-16b7-4e83-a4b0-09af7ea4aacc" - extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true" + extAttrName="__PASSWORD__" intAttrName="password" mandatoryCondition="true" connObjectKey="0" password="1" purpose="PROPAGATION"/> <MappingItem id="dca9de4f-9a5a-4280-8e9a-357e321ba7a5" mapping_id="bc0cf27b-16b7-4e83-a4b0-09af7ea4aacc" - extAttrName="fullname" intAttrName="surname" intMappingType="UserPlainSchema" mandatoryCondition="true" + extAttrName="fullname" intAttrName="surname" mandatoryCondition="true" connObjectKey="0" password="0" purpose="PROPAGATION"/> <MappingItem id="471f0e2e-2bde-4442-9abf-0effb533f2ee" mapping_id="bc0cf27b-16b7-4e83-a4b0-09af7ea4aacc" - extAttrName="type" intAttrName="ctype" intMappingType="UserPlainSchema" mandatoryCondition="true" + extAttrName="type" intAttrName="ctype" mandatoryCondition="true" connObjectKey="0" password="0" purpose="PROPAGATION"/> <MappingItem id="72324cda-a66c-4ffe-b6b6-1d9b6cee9bf2" mapping_id="bc0cf27b-16b7-4e83-a4b0-09af7ea4aacc" - extAttrName="name" intAttrName="firstname" intMappingType="UserPlainSchema" mandatoryCondition="false" + extAttrName="name" intAttrName="firstname" mandatoryCondition="false" connObjectKey="0" password="0" purpose="NONE"/> <Provision id="41a53a00-0b35-4047-831a-d5238f74c7ba" resource_id="ws-target-resource-list-mappings-1" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="bf8afa4a-1522-44b9-91d0-c7b035e4fd99" provision_id="41a53a00-0b35-4047-831a-d5238f74c7ba"/> <MappingItem id="6f8d7b42-44f4-4697-aff5-1736c4b01ee4" mapping_id="bf8afa4a-1522-44b9-91d0-c7b035e4fd99" - extAttrName="email" intAttrName="email" intMappingType="UserPlainSchema" mandatoryCondition="true" + extAttrName="email" intAttrName="email" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <MappingItem id="8515e385-3bf1-4928-adc9-489dee65829a" extAttrName="surname" mapping_id="bf8afa4a-1522-44b9-91d0-c7b035e4fd99" - intAttrName="surname" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="surname" mandatoryCondition="true" connObjectKey="0" password="0" purpose="PROPAGATION"/> <Provision id="09a65250-d9de-44b1-9412-11ed996d356d" resource_id="ws-target-resource-list-mappings-2" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="b12c4fad-f0f1-406d-b143-f2d68ed28e3a" provision_id="09a65250-d9de-44b1-9412-11ed996d356d"/> <MappingItem id="55a4cf7f-ac96-4e8b-931c-2d0eab6a6bca" mapping_id="b12c4fad-f0f1-406d-b143-f2d68ed28e3a" - extAttrName="userId" intAttrName="userId" intMappingType="UserPlainSchema" mandatoryCondition="true" + extAttrName="userId" intAttrName="userId" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <Provision id="3d75991b-caee-4993-8e46-afb13d1bfbd4" resource_id="ws-target-resource-2" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="240a0291-f89d-4557-a547-2a3b9aad625b" provision_id="3d75991b-caee-4993-8e46-afb13d1bfbd4"/> <MappingItem id="d5c4d467-cd18-4148-8195-015808b4b3e6" mapping_id="240a0291-f89d-4557-a547-2a3b9aad625b" - extAttrName="fullname" intAttrName="fullname" intMappingType="UserPlainSchema" mandatoryCondition="true" + extAttrName="fullname" intAttrName="fullname" mandatoryCondition="true" connObjectKey="1" password="0" purpose="BOTH"/> <MappingItem id="370a8673-f3f7-4328-a9ce-acd946f687c5" mapping_id="240a0291-f89d-4557-a547-2a3b9aad625b" - extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true" + extAttrName="__PASSWORD__" intAttrName="password" mandatoryCondition="true" connObjectKey="0" password="1" purpose="BOTH"/> <MappingItem id="c8d1a47a-1846-47b8-9f68-30aa21e94dcc" extAttrName="type" mapping_id="240a0291-f89d-4557-a547-2a3b9aad625b" - intAttrName="ctype" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="ctype" mandatoryCondition="true" connObjectKey="0" password="0" purpose="BOTH"/> <MappingItem id="f0a06b24-7d4d-480e-8188-e53045885569" extAttrName="surname" mapping_id="240a0291-f89d-4557-a547-2a3b9aad625b" - intAttrName="surname" intMappingType="UserPlainSchema" mandatoryCondition="type == 'F'" + intAttrName="surname" mandatoryCondition="type == 'F'" connObjectKey="0" password="0" purpose="BOTH"/> <MappingItem id="adc3c628-27b3-4740-be01-2f83c210ace9" extAttrName="name" mapping_id="240a0291-f89d-4557-a547-2a3b9aad625b" - intAttrName="virtualdata" intMappingType="UserVirtualSchema" mandatoryCondition="type == 'F'" + intAttrName="virtualdata" mandatoryCondition="type == 'F'" connObjectKey="0" password="0" purpose="PROPAGATION"/> <MappingItem id="6972a78b-2570-45d9-bc0b-31d2f2f9c860" extAttrName="fullname" mapping_id="240a0291-f89d-4557-a547-2a3b9aad625b" - intAttrName="cn" intMappingType="UserDerivedSchema" mandatoryCondition="true" + intAttrName="cn" mandatoryCondition="true" connObjectKey="0" password="0" purpose="PROPAGATION"/> <Provision id="9ebc3237-49fa-4dce-9a4c-3070e931812f" resource_id="ws-target-resource-update" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="c17813c0-4e90-4118-bb28-cd36ad6d5a4d" provision_id="9ebc3237-49fa-4dce-9a4c-3070e931812f"/> <MappingItem id="cc973ed6-d031-4790-adab-fc059ac0c818" extAttrName="email" mapping_id="c17813c0-4e90-4118-bb28-cd36ad6d5a4d" - intAttrName="email" intMappingType="UserPlainSchema" mandatoryCondition="false" + intAttrName="email" mandatoryCondition="false" connObjectKey="0" password="0" purpose="PROPAGATION"/> <MappingItem id="7a72c812-1897-4db0-bed4-4e7e8ea51afe" extAttrName="userId" mapping_id="c17813c0-4e90-4118-bb28-cd36ad6d5a4d" - intAttrName="userId" intMappingType="UserPlainSchema" mandatoryCondition="false" + intAttrName="userId" mandatoryCondition="false" connObjectKey="1" password="0" purpose="PROPAGATION"/> <MappingItem id="946a3c7f-6359-4ab7-8a5f-adb08bdb4b5b" extAttrName="test3" mapping_id="c17813c0-4e90-4118-bb28-cd36ad6d5a4d" - intAttrName="fullname" intMappingType="UserPlainSchema" mandatoryCondition="false" + intAttrName="fullname" mandatoryCondition="false" connObjectKey="0" password="0" purpose="PROPAGATION"/> <Provision id="8680bc79-dfa1-4719-9886-1d582bf1124f" resource_id="ws-target-resource-nopropagation" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="63ddd4c8-efed-4a22-a4b4-1f4e6f47c8d0" provision_id="8680bc79-dfa1-4719-9886-1d582bf1124f"/> <MappingItem id="ffcfbb5e-7bbd-489a-a69e-2dd84f00731a" mapping_id="63ddd4c8-efed-4a22-a4b4-1f4e6f47c8d0" extAttrName="fullname" - intAttrName="fullname" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="fullname" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <Provision id="0bfa7c3e-2bb3-43d7-ac0e-d57cff7a18c8" resource_id="ws-target-resource-nopropagation2" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="3f636292-6edb-4d20-ab24-fe0c5fc3dec3" provision_id="0bfa7c3e-2bb3-43d7-ac0e-d57cff7a18c8"/> <MappingItem id="e34928b8-ca57-4b6c-81c1-70bc87ff3fdc" mapping_id="3f636292-6edb-4d20-ab24-fe0c5fc3dec3" extAttrName="fullname" - intAttrName="fullname" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="fullname" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <Provision id="5bd76fec-f8d7-4ab9-acd7-89e099d534e8" resource_id="ws-target-resource-nopropagation3" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="c2a0cec1-32c4-4493-8f01-d1176e557fc1" provision_id="5bd76fec-f8d7-4ab9-acd7-89e099d534e8"/> <MappingItem id="f3ba0859-b0f0-44a5-abfd-4a1a5ca29fbf" mapping_id="c2a0cec1-32c4-4493-8f01-d1176e557fc1" extAttrName="fullname" - intAttrName="fullname" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="fullname" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <Provision id="18de6376-7051-4216-96f0-26629076abb9" resource_id="ws-target-resource-nopropagation4" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="906452d9-3eeb-4ef7-ac90-5ffc14513fbf" provision_id="18de6376-7051-4216-96f0-26629076abb9"/> <MappingItem id="118" mapping_id="906452d9-3eeb-4ef7-ac90-5ffc14513fbf" - extAttrName="fullname" intAttrName="fullname" intMappingType="UserPlainSchema" mandatoryCondition="true" + extAttrName="fullname" intAttrName="fullname" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <Provision id="779fefb5-dd25-4078-915d-3c199ee32158" resource_id="resource-testdb" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="cb624b93-874b-40a0-8021-3b8116b781ab" provision_id="779fefb5-dd25-4078-915d-3c199ee32158"/> <MappingItem id="1e0d30cd-2569-4a80-b9dc-af1467bd1c0b" mapping_id="cb624b93-874b-40a0-8021-3b8116b781ab" - extAttrName="ID" intMappingType="Username" mandatoryCondition="true" + extAttrName="ID" intAttrName="username" mandatoryCondition="true" connObjectKey="1" password="0" purpose="BOTH"/> <MappingItem id="7fd1a178-77a1-4c4c-aca2-3c3f1834b77b" mapping_id="cb624b93-874b-40a0-8021-3b8116b781ab" - extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true" + extAttrName="__PASSWORD__" intAttrName="password" mandatoryCondition="true" connObjectKey="0" password="1" purpose="BOTH"/> <Provision id="0359084d-68fe-4bf8-b42b-2ebe4f578ae7" resource_id="resource-testdb2" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="935a0fc2-4a0b-4d82-9931-3c5ce44a33c1" provision_id="0359084d-68fe-4bf8-b42b-2ebe4f578ae7"/> <MappingItem id="6d90658a-f470-4450-912d-6fe7d3bcda46" mapping_id="935a0fc2-4a0b-4d82-9931-3c5ce44a33c1" extAttrName="ID" - intMappingType="Username" mandatoryCondition="true" + intAttrName="username" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <MappingItem id="2fb9eb01-50df-456e-86c1-b55f68cde2da" mapping_id="935a0fc2-4a0b-4d82-9931-3c5ce44a33c1" extAttrName="__PASSWORD__" - intMappingType="Password" mandatoryCondition="true" + intAttrName="password" mandatoryCondition="true" connObjectKey="0" password="1" purpose="PROPAGATION"/> <Provision id="2adb6537-e207-4d9b-804f-90bf18cd6f48" resource_id="resource-csv" anyType_id="USER" objectClass="__ACCOUNT__"/> @@ -826,44 +874,44 @@ under the License. <Provision_AnyTypeClass provision_id="2adb6537-e207-4d9b-804f-90bf18cd6f48" anyTypeClass_id="minimal group"/> <Mapping id="538c27dc-d260-4c53-9fc8-bf02ee226911" provision_id="2adb6537-e207-4d9b-804f-90bf18cd6f48"/> <MappingItem id="517dc983-99a2-43c9-b4b4-78fd838e5ad1" extAttrName="id" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intMappingType="Username" mandatoryCondition="true" + intAttrName="username" mandatoryCondition="true" connObjectKey="0" password="0" purpose="BOTH"/> <MappingItem id="ba6fb125-466e-4109-8e5d-133936437674" extAttrName="id" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intAttrName="fullname" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="fullname" mandatoryCondition="true" connObjectKey="0" password="0" purpose="BOTH"/> <MappingItem id="c426b070-0290-42be-9ee1-4046c7649635" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true" + extAttrName="__PASSWORD__" intAttrName="password" mandatoryCondition="true" connObjectKey="0" password="1" purpose="BOTH"/> <MappingItem id="20dbe358-5b71-4edd-8670-2bbde982e5c4" extAttrName="name" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intAttrName="firstname" intMappingType="UserPlainSchema" mandatoryCondition="false" + intAttrName="firstname" mandatoryCondition="false" connObjectKey="0" password="0" purpose="BOTH"/> <MappingItem id="4d70850e-9fc5-4e75-83ea-432fe090e1c0" extAttrName="surname" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intAttrName="surname" intMappingType="UserPlainSchema" mandatoryCondition="false" + intAttrName="surname" mandatoryCondition="false" connObjectKey="0" password="0" purpose="BOTH"/> <MappingItem id="4b2f4292-d8ab-4948-a341-3f8c9e23e72d" extAttrName="email" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intAttrName="userId" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="userId" mandatoryCondition="true" connObjectKey="0" password="0" purpose="PULL"/> <MappingItem id="20d6c914-54e7-4968-b1fc-685ae9c2c4a4" extAttrName="email" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intAttrName="email" intMappingType="UserPlainSchema" mandatoryCondition="true" + intAttrName="email" mandatoryCondition="true" connObjectKey="0" password="0" purpose="PULL"/> <MappingItem id="09237f39-0d45-4258-a7cc-2400f7536b72" extAttrName="__NAME__" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intAttrName="csvuserid" intMappingType="UserDerivedSchema" mandatoryCondition="true" + intAttrName="csvuserid" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <MappingItem id="63151b89-2eb3-4980-a682-0215d54ab4a2" extAttrName="theirgroup" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intAttrName="rderToBePropagated" intMappingType="GroupDerivedSchema" mandatoryCondition="false" + intAttrName="rderToBePropagated" mandatoryCondition="false" connObjectKey="0" password="0" purpose="PROPAGATION"/> <MappingItem id="b6079a7b-ac40-481d-81c9-2a292bab0092" extAttrName="membership" mapping_id="538c27dc-d260-4c53-9fc8-bf02ee226911" - intAttrName="mderToBePropagated" intMappingType="AnyObjectDerivedSchema" mandatoryCondition="false" + intAttrName="mderToBePropagated" mandatoryCondition="false" connObjectKey="0" password="0" purpose="PROPAGATION"/> <Provision id="1b53c74e-6a63-49ef-b2f1-96eeb7f1bbb8" resource_id="ws-target-resource-update-resetsynctoken" anyType_id="USER" objectClass="__ACCOUNT__" serializedSyncToken='{"value":null}'/> <Mapping id="23e20ce6-1ff9-495e-aa59-a58e5127a008" provision_id="1b53c74e-6a63-49ef-b2f1-96eeb7f1bbb8"/> <MappingItem id="608f01c5-eb7c-462a-b4d6-b7c3c9632a50" mapping_id="23e20ce6-1ff9-495e-aa59-a58e5127a008" - extAttrName="userId" intAttrName="userId" intMappingType="UserPlainSchema" mandatoryCondition="false" + extAttrName="userId" intAttrName="userId" mandatoryCondition="false" connObjectKey="1" password="0" purpose="BOTH"/> <MappingItem id="79ada054-5f8b-4e77-b405-bfec58b06e7b" mapping_id="23e20ce6-1ff9-495e-aa59-a58e5127a008" - extAttrName="__PASSWORD__" intAttrName="fullname" intMappingType="UserPlainSchema" mandatoryCondition="false" + extAttrName="__PASSWORD__" intAttrName="fullname" mandatoryCondition="false" connObjectKey="0" password="1" purpose="BOTH"/> <Provision id="8b938d63-aa92-448c-89a8-a685fc0a67c8" resource_id="resource-ldap" anyType_id="USER" objectClass="__ACCOUNT__"/> @@ -872,36 +920,37 @@ under the License. <Mapping id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" provision_id="8b938d63-aa92-448c-89a8-a685fc0a67c8" connObjectLink="'uid=' + username + ',ou=people,o=isp'"/> <MappingItem id="9ff7d686-452c-4cec-a475-c1137c5d88c7" connObjectKey="1" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="cn" intAttrName="Username" intMappingType="Username" + extAttrName="cn" intAttrName="Username" intAttrName="username" mandatoryCondition="true" purpose="BOTH"/> <MappingItem id="73d97083-cfda-44e6-be62-3f9ac558b5eb" connObjectKey="0" password="1" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="__PASSWORD__" intAttrName="Password" intMappingType="Password" + extAttrName="__PASSWORD__" intAttrName="Password" intAttrName="password" mandatoryCondition="true" purpose="BOTH"/> <MappingItem id="cf0a222c-36ea-41e6-987c-7908614ccd23" connObjectKey="0" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="sn" intAttrName="surname" intMappingType="UserPlainSchema" + extAttrName="sn" intAttrName="surname" mandatoryCondition="true" purpose="BOTH"/> <MappingItem id="b3a12364-e471-4e37-83ad-476c33a43617" connObjectKey="0" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="cn" intAttrName="fullname" intMappingType="UserPlainSchema" + extAttrName="cn" intAttrName="fullname" mandatoryCondition="true" purpose="BOTH"/> <MappingItem id="aad2b7d7-3201-4bba-b496-f6587b4b7518" connObjectKey="0" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="mail" intAttrName="email" intMappingType="UserPlainSchema" + extAttrName="mail" intAttrName="email" mandatoryCondition="false" purpose="BOTH"/> <MappingItem id="81b83c98-127b-469b-a497-412ba50acbeb" connObjectKey="0" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="title" intAttrName="title" intMappingType="GroupPlainSchema" + extAttrName="title" intAttrName="title" mandatoryCondition="false" purpose="BOTH"/> <MappingItem id="318e92a1-3acb-49c5-b2fd-dba819c40ef1" connObjectKey="0" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="postalAddress" intAttrName="postalAddress" intMappingType="UserPlainSchema" + extAttrName="postalAddress" intAttrName="postalAddress" mandatoryCondition="false" purpose="BOTH"/> <MappingItem id="78fa504f-213c-41ac-a922-7c9f98e5ce11" connObjectKey="0" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="mail" intAttrName="userId" intMappingType="UserPlainSchema" + extAttrName="mail" intAttrName="userId" mandatoryCondition="false" purpose="BOTH"/> <MappingItem id="af6085cb-d0e8-47c9-b5f9-4b7d491a9750" connObjectKey="0" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="registeredAddress" intAttrName="obscure" intMappingType="UserPlainSchema" + extAttrName="registeredAddress" intAttrName="obscure" mandatoryCondition="false" purpose="BOTH"/> <MappingItem id="5bb62bd2-5007-4eb8-b4f9-9df8917dc767" connObjectKey="0" password="0" mapping_id="ae1c77c3-2f1d-4258-ad06-710bb09041a9" - extAttrName="jpegPhoto" intAttrName="photo" intMappingType="UserPlainSchema" + extAttrName="jpegPhoto" intAttrName="photo" mandatoryCondition="false" purpose="BOTH"/> + <SyncopeSchema id="virtualReadOnly"/> <VirSchema id="virtualReadOnly" READONLY="1" anyTypeClass_id="minimal user" provision_id="8b938d63-aa92-448c-89a8-a685fc0a67c8" extAttrName="givenname"/> @@ -909,68 +958,70 @@ under the License. <Mapping id="128412c8-be4f-4d7b-8bed-5ab89134f718" provision_id="20a75199-3f2e-4b9a-9510-c68dd7fc7b3d" connObjectLink="'cn=' + name + ',ou=groups,o=isp'"/> <MappingItem id="1" connObjectKey="1" password="0" mapping_id="128412c8-be4f-4d7b-8bed-5ab89134f718" - extAttrName="cn" intAttrName="groupName" intMappingType="GroupName" + extAttrName="cn" intAttrName="name" mandatoryCondition="true" purpose="BOTH"/> <MappingItem id="2" connObjectKey="0" password="0" mapping_id="128412c8-be4f-4d7b-8bed-5ab89134f718" - extAttrName="owner" intAttrName="groupOwnerSchema" intMappingType="GroupOwnerSchema" + extAttrName="owner" intAttrName="owner" mandatoryCondition="false" purpose="BOTH"/> <MappingItem id="3" connObjectKey="0" password="0" mapping_id="128412c8-be4f-4d7b-8bed-5ab89134f718" - extAttrName="description" intAttrName="title" intMappingType="GroupPlainSchema" + extAttrName="description" intAttrName="title" mandatoryCondition="false" purpose="BOTH"/> + <SyncopeSchema id="rvirtualdata"/> <VirSchema id="rvirtualdata" anyTypeClass_id="minimal group" provision_id="20a75199-3f2e-4b9a-9510-c68dd7fc7b3d" extAttrName="businessCategory"/> <Provision id="46b54e2a-e43e-4cd7-8c13-1af1bd65c3d3" resource_id="resource-db-pull" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="cda910bd-fc28-4f63-890e-66edc62d428b" provision_id="46b54e2a-e43e-4cd7-8c13-1af1bd65c3d3"/> <MappingItem id="1a345706-a498-41bb-a948-820307a4365e" connObjectKey="0" mapping_id="cda910bd-fc28-4f63-890e-66edc62d428b" - extAttrName="EMAIL" intAttrName="email" intMappingType="UserPlainSchema" + extAttrName="EMAIL" intAttrName="email" mandatoryCondition="false" password="0" purpose="BOTH"/> <MappingItem id="a234bde8-b431-408c-8ec9-c986c5b7f98d" connObjectKey="0" mapping_id="cda910bd-fc28-4f63-890e-66edc62d428b" - extAttrName="SURNAME" intAttrName="fullname" intMappingType="UserPlainSchema" + extAttrName="SURNAME" intAttrName="fullname" mandatoryCondition="false" password="0" purpose="BOTH"/> <MappingItem id="51a856de-ae25-41cd-967a-86920c834b70" connObjectKey="1" mapping_id="cda910bd-fc28-4f63-890e-66edc62d428b" - extAttrName="ID" intAttrName="firstname" intMappingType="UserPlainSchema" + extAttrName="ID" intAttrName="firstname" mandatoryCondition="false" password="0" purpose="BOTH"/> <MappingItem id="f4e5178e-ef37-4949-933a-7ec7eaea64c6" connObjectKey="0" mapping_id="cda910bd-fc28-4f63-890e-66edc62d428b" - extAttrName="SURNAME" intAttrName="surname" intMappingType="UserPlainSchema" + extAttrName="SURNAME" intAttrName="surname" mandatoryCondition="false" password="0" purpose="BOTH"/> <MappingItem id="3ac0ecaf-d9a1-4fc1-9ae9-84dc34576810" connObjectKey="0" mapping_id="cda910bd-fc28-4f63-890e-66edc62d428b" - extAttrName="USERNAME" intAttrName="Username" intMappingType="Username" + extAttrName="USERNAME" intAttrName="Username" intAttrName="username" mandatoryCondition="false" password="0" purpose="BOTH"/> <MappingItem id="e7215305-93c9-460b-b862-46f7b60de72d" connObjectKey="0" mapping_id="cda910bd-fc28-4f63-890e-66edc62d428b" - extAttrName="EMAIL" intAttrName="userId" intMappingType="UserPlainSchema" + extAttrName="EMAIL" intAttrName="userId" mandatoryCondition="false" password="0" purpose="BOTH"/> <Provision id="6d7cb60a-c4ad-4a70-94ae-e5b88eb24930" resource_id="resource-db-virattr" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="45280585-308f-4571-9788-c7a4734b3614" provision_id="6d7cb60a-c4ad-4a70-94ae-e5b88eb24930"/> <MappingItem id="6cb2f9f0-5fb4-4686-a375-31e2c34a6cd8" mapping_id="45280585-308f-4571-9788-c7a4734b3614" connObjectKey="1" password="0" - extAttrName="ID" intMappingType="UserKey" + extAttrName="ID" intAttrName="key" mandatoryCondition="true" purpose="BOTH"/> + <SyncopeSchema id="virtualdata"/> <VirSchema id="virtualdata" anyTypeClass_id="minimal user" provision_id="6d7cb60a-c4ad-4a70-94ae-e5b88eb24930" extAttrName="USERNAME"/> <Provision id="cfa86cbe-94b6-4712-a40a-a4861be1d425" resource_id="ws-target-resource-timeout" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="c71d690a-3dd9-48a5-b76f-32805186c4dc" provision_id="cfa86cbe-94b6-4712-a40a-a4861be1d425"/> <MappingItem id="321bc904-e1fc-4a54-bf7c-74c8cbcc0815" mapping_id="c71d690a-3dd9-48a5-b76f-32805186c4dc" connObjectKey="1" password="0" - extAttrName="fullname" intAttrName="fullname" intMappingType="UserPlainSchema" + extAttrName="fullname" intAttrName="fullname" mandatoryCondition="true" purpose="PROPAGATION"/> <Provision id="ac1659dc-3ea3-45eb-8ae6-626e3d916492" resource_id="ws-target-resource-delete" anyType_id="USER" objectClass="__ACCOUNT__"/> <Mapping id="72f590ae-2754-456b-aabb-eda7d8459dd3" provision_id="ac1659dc-3ea3-45eb-8ae6-626e3d916492"/> <MappingItem id="4c98536f-10df-4953-b2df-59d7cd057fd2" mapping_id="72f590ae-2754-456b-aabb-eda7d8459dd3" extAttrName="userId" - intMappingType="Username" mandatoryCondition="true" + intAttrName="username" mandatoryCondition="true" connObjectKey="1" password="0" purpose="PROPAGATION"/> <Provision id="f1b55b66-eb13-4a93-a49c-448e93756eb6" resource_id="resource-db-scripted" anyType_id="PRINTER" objectClass="__PRINTER__"/> <Mapping id="16439b5f-50c3-4604-97e9-f4004933abd8" provision_id="f1b55b66-eb13-4a93-a49c-448e93756eb6"/> <MappingItem id="23aa0299-ddbb-4e59-8918-0ab2a32465fa" mapping_id="16439b5f-50c3-4604-97e9-f4004933abd8" extAttrName="ID" - intMappingType="AnyObjectKey" mandatoryCondition="true" + intAttrName="key" mandatoryCondition="true" connObjectKey="1" password="0" purpose="BOTH"/> <MappingItem id="3dc96af0-5d0a-4ec1-be84-244716d88401" mapping_id="16439b5f-50c3-4604-97e9-f4004933abd8" extAttrName="PRINTERNAME" - intMappingType="AnyObjectName" mandatoryCondition="true" + intAttrName="name" mandatoryCondition="true" connObjectKey="0" password="0" purpose="BOTH"/> <MappingItem id="f3ef9f8b-e667-4b18-969f-ba98c3d78bc0" mapping_id="16439b5f-50c3-4604-97e9-f4004933abd8" extAttrName="LOCATION" - intAttrName="location" intMappingType="AnyObjectPlainSchema" + intAttrName="location" mandatoryCondition="false" connObjectKey="0" password="0" purpose="BOTH"/> <Task DTYPE="PropagationTask" id="1e697572-b896-484c-ae7f-0c8f63fcbc6c" operation="UPDATE" @@ -1171,7 +1222,7 @@ $$ } " <p> This message was sent to the following recipients: <ul> -$$ for (recipient: recipients) { +$$ for (recipient: recipients) { Na <li>${recipient.plainAttrMap["email"].values[0]}</li> $$ } </ul> @@ -1195,7 +1246,7 @@ $$ } </body> </html>"/> - <Notification id="e00945b5-1184-4d43-8e45-4318a8dcdfd4" active="1" recipientAttrName="email" recipientAttrType="UserPlainSchema" selfAsRecipient="1" + <Notification id="e00945b5-1184-4d43-8e45-4318a8dcdfd4" active="1" recipientAttrName="email" selfAsRecipient="1" sender="ad...@syncope.apache.org" subject="Password Reset request" template_id="requestPasswordReset" traceLevel="FAILURES"/> <AnyAbout id="a328f2e6-25e9-4cc1-badf-7425d7be4b39" anyType_id="USER" notification_id="e00945b5-1184-4d43-8e45-4318a8dcdfd4" filter="token!=$null"/> @@ -1205,7 +1256,7 @@ $$ } textBody="NOTIFICATION-81" htmlBody="NOTIFICATION-81" traceLevel="ALL"/> <NotificationTask_recipients notificationTask_id="e1e520f0-2cbd-4e11-9a89-ea58a0f957e7" address="recipi...@prova.org"/> - <Notification id="bef0c250-e8a7-4848-bb63-2564fc409ce2" active="1" recipientAttrName="email" recipientAttrType="UserPlainSchema" selfAsRecipient="1" + <Notification id="bef0c250-e8a7-4848-bb63-2564fc409ce2" active="1" recipientAttrName="email" selfAsRecipient="1" sender="ad...@syncope.apache.org" subject="Password Reset successful" template_id="confirmPasswordReset" traceLevel="FAILURES"/> <Notification_events notification_id="bef0c250-e8a7-4848-bb63-2564fc409ce2" event="[CUSTOM]:[]:[]:[confirmPasswordReset]:[SUCCESS]"/> @@ -1213,7 +1264,7 @@ $$ } <Notification id="9e2b911c-25de-4c77-bcea-b86ed9451050" sender="t...@syncope.apache.org" subject="Test subject" template_id="test" selfAsRecipient="0" traceLevel="FAILURES" recipientsFIQL="$groups==7" - recipientAttrType="UserPlainSchema" recipientAttrName="email" active="1"/> + recipientAttrName="email" active="1"/> <AnyAbout id="2e2ee845-2abf-43c6-b543-49243a84e2f1" anyType_id="USER" notification_id="9e2b911c-25de-4c77-bcea-b86ed9451050" filter="fullname==*o*;fullname==*i*"/> <Notification_events notification_id="9e2b911c-25de-4c77-bcea-b86ed9451050" event="[CUSTOM]:[]:[]:[unexisting1]:[FAILURE]"/> <Notification_events notification_id="9e2b911c-25de-4c77-bcea-b86ed9451050" event="[CUSTOM]:[]:[]:[unexisting2]:[SUCCESS]"/>