Repository: syncope Updated Branches: refs/heads/2_0_X da72d30c9 -> 8f33e423f refs/heads/master 5820eb52a -> 091c74b8a
[SYNCOPE-1077] Docs Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8f33e423 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8f33e423 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8f33e423 Branch: refs/heads/2_0_X Commit: 8f33e423faa382dc32260b271246fafc8d3f6e2d Parents: da72d30 Author: Francesco Chicchiriccò <ilgro...@apache.org> Authored: Mon May 8 17:31:13 2017 +0200 Committer: Francesco Chicchiriccò <ilgro...@apache.org> Committed: Mon May 8 17:31:13 2017 +0200 ---------------------------------------------------------------------- core/rest-cxf/pom.xml | 5 ++ ext/elasticsearch/client-elasticsearch/pom.xml | 18 +++++ pom.xml | 42 ++++++++++++ .../reference-guide/concepts/extensions.adoc | 25 +++++++ .../workingwithapachesyncope/customization.adoc | 70 ++++++++++++++++++++ 5 files changed, 160 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/8f33e423/core/rest-cxf/pom.xml ---------------------------------------------------------------------- diff --git a/core/rest-cxf/pom.xml b/core/rest-cxf/pom.xml index 7ccd6d1..00d9af2 100644 --- a/core/rest-cxf/pom.xml +++ b/core/rest-cxf/pom.xml @@ -84,6 +84,11 @@ under the License. </dependency> <dependency> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + </dependency> + + <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxrs</artifactId> </dependency> http://git-wip-us.apache.org/repos/asf/syncope/blob/8f33e423/ext/elasticsearch/client-elasticsearch/pom.xml ---------------------------------------------------------------------- diff --git a/ext/elasticsearch/client-elasticsearch/pom.xml b/ext/elasticsearch/client-elasticsearch/pom.xml index 48d7f1c..09a9750 100644 --- a/ext/elasticsearch/client-elasticsearch/pom.xml +++ b/ext/elasticsearch/client-elasticsearch/pom.xml @@ -48,6 +48,24 @@ under the License. <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> </dependency> + + <dependency> + <groupId>com.fasterxml.jackson.dataformat</groupId> + <artifactId>jackson-dataformat-smile</artifactId> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.dataformat</groupId> + <artifactId>jackson-dataformat-cbor</artifactId> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.datatype</groupId> + <artifactId>jackson-datatype-joda</artifactId> + </dependency> + + <dependency> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + </dependency> </dependencies> <build> http://git-wip-us.apache.org/repos/asf/syncope/blob/8f33e423/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 2528164..282a6a7 100644 --- a/pom.xml +++ b/pom.xml @@ -393,6 +393,8 @@ under the License. <commons-collection.version>4.1</commons-collection.version> <commons-logging.version>1.1.3</commons-logging.version> + <joda.version>2.9.9</joda.version> + <h2.version>1.4.195</h2.version> <junit.version>4.12</junit.version> @@ -715,6 +717,24 @@ under the License. <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>${elasticsearch.version}</version> + <exclusions> + <exclusion> + <groupId>com.fasterxml.jackson.datatype</groupId> + <artifactId>jackson-dataformat-smile</artifactId> + </exclusion> + <exclusion> + <groupId>com.fasterxml.jackson.datatype</groupId> + <artifactId>jackson-dataformat-yaml</artifactId> + </exclusion> + <exclusion> + <groupId>com.fasterxml.jackson.datatype</groupId> + <artifactId>jackson-dataformat-cbor</artifactId> + </exclusion> + <exclusion> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> @@ -769,6 +789,12 @@ under the License. <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-joda</artifactId> <version>${jackson.version}</version> + <exclusions> + <exclusion> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> @@ -792,6 +818,16 @@ under the License. </dependency> <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> + <artifactId>jackson-dataformat-smile</artifactId> + <version>${jackson.version}</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.dataformat</groupId> + <artifactId>jackson-dataformat-cbor</artifactId> + <version>${jackson.version}</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-xml</artifactId> <version>${jackson.version}</version> <exclusions> @@ -807,6 +843,12 @@ under the License. </dependency> <dependency> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + <version>${joda.version}</version> + </dependency> + + <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> http://git-wip-us.apache.org/repos/asf/syncope/blob/8f33e423/src/main/asciidoc/reference-guide/concepts/extensions.adoc ---------------------------------------------------------------------- diff --git a/src/main/asciidoc/reference-guide/concepts/extensions.adoc b/src/main/asciidoc/reference-guide/concepts/extensions.adoc index cbff82d..4daf9be 100644 --- a/src/main/asciidoc/reference-guide/concepts/extensions.adoc +++ b/src/main/asciidoc/reference-guide/concepts/extensions.adoc @@ -115,3 +115,28 @@ endif::[] This extension adds features to all components and layers that are available, and can be taken as reference when creating <<customization-extensions,new extensions>>. ==== + +==== Elasticsearch + +[WARNING] +This extension requires the latest JDK 8 that is available. + +This extension provides an alternate internal search engine for <<users-groups-and-any-objects>>, requiring an external +https://www.elastic.co/[Elasticsearch^] cluster. + +[TIP] +As search operations are central for different aspects of the <<provisioning,provisioning process>>, the global +performances are expected to improve when using this extension. + +[NOTE] +.Extension Sources +==== +The source code of this extension is available from the Apache Syncope +ifeval::["{snapshotOrRelease}" == "release"] +https://github.com/apache/syncope/tree/syncope-{docVersion}/ext/elasticsearch[source tree^] +endif::[] +ifeval::["{snapshotOrRelease}" == "snapshot"] +https://github.com/apache/syncope/tree/2_0_X/ext/elasticsearch[source tree^] +endif::[] +. +==== http://git-wip-us.apache.org/repos/asf/syncope/blob/8f33e423/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc ---------------------------------------------------------------------- diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc index cfaf2ff..e0c09a5 100644 --- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc @@ -348,6 +348,76 @@ Copy `core/src/main/resources/all/saml2sp-logic.properties` to `core/src/main/re Setup a <<keystore,keystore>> and place it under the <<properties-files-location,configuration directory>>, then review the content of `core/src/main/resources/saml2sp-logic.properties` accordingly. +[discrete] +===== Enable the <<elasticsearch>> extension + +[WARNING] +This extension requires the latest JDK 8 that is available. + +Add the following dependencies to `core/pom.xml`: + +[source,xml,subs="verbatim,attributes"] +---- +<dependency> + <groupId>org.apache.syncope.ext.elasticsearch</groupId> + <artifactId>syncope-ext-elasticsearch-provisioning-java</artifactId> + <version>${syncope.version}</version> +</dependency> +<dependency> + <groupId>org.apache.syncope.ext.elasticsearch</groupId> + <artifactId>syncope-ext-elasticsearch-persistence-jpa</artifactId> + <version>${syncope.version}</version> +</dependency> +---- + +Download + +ifeval::["{snapshotOrRelease}" == "release"] +https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/elasticsearch/persistence-jpa/src/main/resources/persistence.properties[persistence.properties^] +endif::[] +ifeval::["{snapshotOrRelease}" == "snapshot"] +https://github.com/apache/syncope/blob/2_0_X/ext/elasticsearch/persistence-jpa/src/main/resources/persistence.properties[persistence.properties^] +endif::[] + +and + +ifeval::["{snapshotOrRelease}" == "release"] +https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/elasticsearch/client-elasticsearch/src/main/resources/elasticsearchClientContext.xml[elasticsearchClientContext.xml^] +endif::[] +ifeval::["{snapshotOrRelease}" == "snapshot"] +https://github.com/apache/syncope/blob/2_0_X/ext/elasticsearch/client-elasticsearch/src/main/resources/elasticsearchClientContext.xml[elasticsearchClientContext.xml^] +endif::[] + +then save both under `core/src/main/resources`. + +Now, adjust the parameters in `core/src/main/resources/elasticsearchClientContext.xml` to match your +Elasticsearch deployment. + +Finally, replace the following text in `core/src/main/webapp/WEB-INF/web.xml`: + +.... +classpath*:/coreContext.xml +classpath*:/securityContext.xml +classpath*:/logicContext.xml +classpath*:/restCXFContext.xml +classpath*:/persistenceContext.xml +classpath*:/provisioning*Context.xml +classpath*:/workflow*Context.xml +.... + +with + +.... + classpath*:/coreContext.xml + classpath*:/elasticsearchClientContext.xml + classpath*:/securityContext.xml + classpath*:/logicContext.xml + classpath*:/restCXFContext.xml + classpath*:/persistenceContext.xml + classpath*:/provisioning*Context.xml + classpath*:/workflow*Context.xml +.... + [[customization-console]] ==== Console