Je vous propose de faire un inventaire des objets de configuration du domaine Master de l'instance Embedded et de faire le parallèle avec les APIs qui permettent d'éditer ces objets le cas échéants. C'est assez superficiel et l'étude détaillée du fichier xml met aussi en évidences des dépendances entre plusieurs objets que nous examinerons plus tard.
La configuration d'une instance peut-être exportée directement par la console.
<PasswordPolicy name="a password policy" historyLength="1" allowNullPassword="1" />
/policies/PASSWORD {
"_class": "org.apache.syncope.common.lib.policy.PasswordPolicyTO",
"key": "ce93fcda-dc3a-4369-a7b0-a6108c261c85","name": "a password policy","usedByRealms": ["/even/two"],
"allowNullPassword": true,"historyLength": 1, "rules": [
"DefaultPasswordRuleConf1"
]
}
<Implementation id="DefaultPasswordRuleConf1" type="PASSWORD_RULE" engine="JAVA" body="{"_class":"org.apache.syncope.common.lib.policy.DefaultPasswordRuleConf","maxLength":0,"minLength":8,"wordsNotPermitted":["notpermitted1","notpermitted2"]}"/>
/implementations/PASSWORD_RULE/DefaultPasswordRuleConf1 {"key":"DefaultPasswordRuleConf1", "engine":"JAVA", "type":"PASSWORD_RULE", "body": {"_class":"org.apache.syncope.common.lib.policy.DefaultPasswordRuleConf","maxLength":0,"minLength":8,"wordsNotPermitted":["notpermitted1","notpermitted2"]}}
<PasswordPolicyRule policy_id="ce93fcda-dc3a-4369-a7b0-a6108c261c85" implementation_id="DefaultPasswordRuleConf1"/>
pas vu en tant qu'API mais on trouve des relations entre plusieurs objets à partir des ids (voir les objets précédents)
<AccountPolicy name="an account policy" propagateSuspension="0" maxAuthenticationAttempts="0"/>
/policies/ACCOUNT/xxxx {"name":"a account policy", "propagateSuspension":"0", "maxAuthenticationAttempts":"0"}
<PropagationPolicy name="sample propagation policy" fetchAroundProvisioning="1" updateDelta="0" maxAttempts="5" backOffStrategy="FIXED" backOffParams="10000"/>
pas vu en tant qu'API mais en rapport avec l'objet ExternalResource
<AuthPolicy name="MyDefaultAuthPolicyConf" jsonConf="{"_class":"org.apache.syncope.common.lib.policy.DefaultAuthPolicyConf","authModules":["LdapAuthenticationTest"]}"/>
/policies/AUTH/MyDefaultAuthPolicyConf {
"_class": "org.apache.syncope.common.lib.policy.AuthPolicyTO",
"name": "MyDefaultAuthPolicyConf",
"conf": {"_class":"org.apache.syncope.common.lib.policy.DefaultAuthPolicyConf",
"tryAll": false,"bypassEnabled": false,"forceMfaExecution": true, "bypassTrustedDeviceEnabled": true,
"authModules": ["LdapAuthenticationTest"]}}
<AttrRepo id="DefaultLDAPAttrRepo" attrRepoState="ACTIVE" description="LDAP attr repo" jsonConf="{"_class":"org.apache.syncope.common.lib.attr.LDAPAttrRepoConf","searchFilter":"cn={user}","subtreeSearch":true,"ldapUrl":"ldap://localhost:1389","bindDn":"uid=admin,ou=system","bindCredential":"secret","baseDn":"ou=People,o=isp","useAllQueryAttributes":true,"queryAttributes":{}}"/>
/policies/attrRepos/DefaultLDAPAttrRepo {
"key": "DefaultLDAPAttrRepo","description": "LDAP attr repo", "state": "ACTIVE", "order": 0,"conf": {
"_class": "org.apache.syncope.common.lib.attr.LDAPAttrRepoConf","searchFilter": "cn={user}", "subtreeSearch": true,"baseDn": "ou=People,o=isp","ldapUrl": "ldap://localhost:1389","ldapType": "GENERIC","bindDn": "uid=admin,ou=system","bindCredential": "secret","binaryAttributes": ["objectGUID","objectSid" ], "useAllQueryAttributes": true, "queryAttributes": {}}}
<AuthModule id="DefaultSyncopeAuthModule" authModuleState="ACTIVE" description="Syncope auth module" jsonConf="{"_class":"org.apache.syncope.common.lib.auth.SyncopeAuthModuleConf","domain":"Master"}" items="[{"intAttrName":"syncopeUserAttr_surname","extAttrName":"family_name","connObjectKey":false,"password":false,"mandatoryCondition":"false","purpose":"NONE","propagationJEXLTransformer":null,"pullJEXLTransformer":null,"transformers":[]},{"intAttrName":"syncopeUserAttr_fullname","extAttrName":"name","connObjectKey":false,"password":false,"mandatoryCondition":"false","purpose":"NONE","propagationJEXLTransformer":null,"pullJEXLTransformer":null,"transformers":[]},{"intAttrName":"syncopeUserAttr_firstname","extAttrName":"given_name","connObjectKey":false,"password":false,"mandatoryCondition":"false","purpose":"NONE","propagationJEXLTransformer":null,"pullJEXLTransformer":null,"transformers":[]},{"intAttrName":"syncopeUserAttr_email","extAttrName":"email","connObjectKey":false,"password":false,"mandatoryCondition":"false","purpose":"NONE","propagationJEXLTransformer":null,"pullJEXLTransformer":null,"transformers":[]},{"intAttrName":"memberships","extAttrName":"groups","connObjectKey":false,"password":false,"mandatoryCondition":"false","purpose":"NONE","propagationJEXLTransformer":null,"pullJEXLTransformer":null,"transformers":[]}]"/>
/authModules/DefaultSyncopeAuthModule {
"key": "DefaultSyncopeAuthModule","description": "Syncope auth module","state": "ACTIVE","order": 0,"items": [{
"intAttrName": "syncopeUserAttr_surname","extAttrName": "family_name","connObjectKey": false,"password": false,"mandatoryCondition": "false", "purpose": "NONE", "propagationJEXLTransformer": null,"pullJEXLTransformer": null,"transformers": []},
{"intAttrName": "syncopeUserAttr_fullname", "extAttrName": "name", "connObjectKey": false, "password": false, "mandatoryCondition": "false","purpose": "NONE", "propagationJEXLTransformer": null,"pullJEXLTransformer": null, "transformers": [] },
{ "intAttrName": "syncopeUserAttr_firstname","extAttrName": "given_name", "connObjectKey": false,"password": false, "mandatoryCondition": "false","purpose": "NONE", "propagationJEXLTransformer": null,"pullJEXLTransformer": null,"transformers": [] },
{"intAttrName": "syncopeUserAttr_email","extAttrName": "email", "connObjectKey": false,"password": false,"mandatoryCondition": "false","purpose": "NONE","propagationJEXLTransformer": null,"pullJEXLTransformer": null,"transformers": []},
{"intAttrName": "memberships","extAttrName": "groups","connObjectKey": false,"password": false,"mandatoryCondition": "false", "purpose": "NONE", "propagationJEXLTransformer": null,"pullJEXLTransformer": null,"transformers": []} ],
"conf": {
"_class": "org.apache.syncope.common.lib.auth.SyncopeAuthModuleConf",
"domain": "Master", "credentialCriteria": null, "maxRetryAttempts": 1}
}
<RelationshipType id="neighborhood" description="Models the act that an object is near another" leftEndAnyType_id="USER" rightEndAnyType_id="PRINTER"/>
/relationshipTypes/neighborhood {
"key": "neighborhood", "description": "Models the act that an object is near another", "leftEndAnyType": "USER","rightEndAnyType": "PRINTER"}}
<AnyObject id="fc6dbc3a-6c07-4965-8781-921e7401a4a5" name="HP LJ 1300n" realm_id="e4c28e7a-9dbf-4ee7-9441-93812a0d4a28" type_id="PRINTER" creator="admin" lastModifier="admin" creationDate="2010-10-20 11:00:00" lastChangeDate="2010-10-20 11:00:00" plainAttrs="[{"values":[{"stringValue":"Canon MFC8030"}],"schema":"model"},{"values":[{"stringValue":"1st floor"}],"schema":"location"}]"/>
/anyObjects/fc6dbc3a-6c07-4965-8781-921e7401a4a5 {
"_class": "org.apache.syncope.common.lib.to.AnyObjectTO","key": "fc6dbc3a-6c07-4965-8781-921e7401a4a5", "type": "PRINTER","realm": "/","name": "HP LJ 1300n","creator": "admin","creationDate": "2010-10-20T10:00:00Z","creationContext": null,"lastModifier": "admin","lastChangeDate": "2010-10-20T10:00:00Z","lastChangeContext": null,"dynRealms": [],"status": null,
"auxClasses": [],"plainAttrs": [{"schema": "location", "values": ["1st floor"]},{"schema": "model","values": ["Canon MFC8030"]}],"derAttrs": [],"resources": [],
"relationships": [{"type": "inclusion","end": "LEFT","otherEndType": "PRINTER","otherEndKey": "8559d14d-58c2-46eb-a2d4-a7d35161e8f8","otherEndName": "Canon MF 8030cn"},
{"type": "neighborhood", "end": "RIGHT","otherEndType": "USER",
"otherEndKey": "c9b2dec2-00a7-4855-97c0-d854842b4b24","otherEndName": "bellini"}
],"memberships": [],"dynMemberships": []}
<SyncopeUser mustChangePassword="0" id="c9b2dec2-00a7-4855-97c0-d854842b4b24" status="active" password="5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" cipherAlgorithm="SHA1" realm_id="e4c28e7a-9dbf-4ee7-9441-93812a0d4a28" username="bellini" creator="admin" lastModifier="admin" creationDate="2010-10-20 11:00:00" lastChangeDate="2010-10-20 11:00:00" lastLoginDate="2016-03-03 15:21:22" suspended="0" plainAttrs="[{"values":[{"stringValue":"Vincenzo"}],"schema":"firstname"},{"values":[{"stringValue":"Bellini"}],"schema":"surname"},{"values":[{"dateValue":"2009-06-24T00:00:00+02:00"}],"schema":"loginDate"},{"values":[{"booleanValue":true}],"schema":"cool"},{"values":[{"stringValue":"M"}],"schema":"gender"},{"uniqueValue":{"stringValue":"Vincenzo Bellini"},"schema":"fullname"},{"uniqueValue":{"stringValue":"bellini@apache.org"},"schema":"userId"}]"/>
/users/bellini {
"_class": "org.apache.syncope.common.lib.to.UserTO","key": "c9b2dec2-00a7-4855-97c0-d854842b4b24","type": "USER","realm": "/","username": "bellini",
"creator": "admin", "creationDate": "2010-10-20T10:00:00Z","creationContext": null,"lastModifier": "admin","lastChangeDate": "2010-10-20T10:00:00Z","lastChangeContext": null,"dynRealms": [],"status": "active","auxClasses": [],"plainAttrs": [
{"schema": "cool","values": [ "true"]},
{"schema": "firstname", "values": ["Vincenzo"]},
{"schema": "fullname","values": [ "Vincenzo Bellini"]},
{"schema": "gender","values": ["M"]},
{"schema": "loginDate","values": ["2009-06-23"]},
{"schema": "surname","values": ["Bellini"]},
{"schema": "userId","values": ["bellini@apache.org"]}
],"derAttrs": [
{"schema": "cn","values": ["Bellini, Vincenzo"]},
{"schema": "info","values": ["bellini - 2010-10-20T10:00:00Z[0]"]},
{"schema": "noschema","values": ["Bellini, "]}],
"resources": ["ws-target-resource-nopropagation"],
"relationships": [{"type": "neighborhood","end": "LEFT","otherEndType": "PRINTER","otherEndKey": "fc6dbc3a-6c07-4965-8781-921e7401a4a5", "otherEndName": "HP LJ 1300n"}],
"password": null, "token": null,"tokenExpireTime": null,"lastLoginDate": "2016-03-03T14:21:22Z","changePwdDate": null,"failedLogins": 0,"securityQuestion": null,"securityAnswer": null,"suspended": false,"mustChangePassword": false,
"memberships": [
{ "groupKey": "bf825fe1-7320-4a54-bd64-143b5c18ab97","groupName": "managingDirector","plainAttrs": [],"derAttrs": []}],
"dynMemberships": [],
"roles": ["User manager","User reviewer"],
"dynRoles": [],"linkedAccounts": [],"delegatingDelegations":[],"delegatedDelegations": []}
<SyncopeGroup id="bf825fe1-7320-4a54-bd64-143b5c18ab97" name="managingDirector" realm_id="e4c28e7a-9dbf-4ee7-9441-93812a0d4a28" creator="admin" lastModifier="admin" creationDate="2010-10-20 11:00:00" lastChangeDate="2010-10-20 11:00:00"/>
/groups/managingDirector {
"_class": "org.apache.syncope.common.lib.to.GroupTO","key": "bf825fe1-7320-4a54-bd64-143b5c18ab97","type": "GROUP","realm": "/",
"name": "managingDirector","creator": "admin","creationDate": "2010-10-20T10:00:00Z","creationContext": null,"lastModifier": "admin","lastChangeDate": "2010-10-20T10:00:00Z","lastChangeContext": null,"dynRealms": [],"status": null,
"auxClasses": [],"plainAttrs": [],"derAttrs": [
{"schema": "displayProperty","values": [": "]},
{"schema": "rderToBePropagated","values": ["-"]},
{"schema": "rderiveddata","values": ["-"]},
{"schema": "rderivedschema","values": ["-"]}],
"resources": ["ws-target-resource-nopropagation"],
"relationships": [],"userOwner": null,"groupOwner": null,"udynMembershipCond": null,"staticUserMembershipCount": 1,"dynamicUserMembershipCount": 0,"staticAnyObjectMembershipCount": 0,"dynamicAnyObjectMembershipCount": 0, "adynMembershipConds": {},"typeExtensions": []}