diff --git a/archetype/src/main/resources/archetype-resources/core/pom.xml b/archetype/src/main/resources/archetype-resources/core/pom.xml index 6d0b2de0e32..39282e92af6 100644 --- a/archetype/src/main/resources/archetype-resources/core/pom.xml +++ b/archetype/src/main/resources/archetype-resources/core/pom.xml @@ -47,10 +47,6 @@ under the License. org.apache.syncope.core syncope-core-starter - - org.apache.syncope.core.cache - syncope-core-cache-caffeine - org.apache.syncope.core.idm syncope-core-idm-rest-cxf diff --git a/archetype/src/main/resources/archetype-resources/pom.xml b/archetype/src/main/resources/archetype-resources/pom.xml index 33cb9e1b050..1e663ab13bf 100644 --- a/archetype/src/main/resources/archetype-resources/pom.xml +++ b/archetype/src/main/resources/archetype-resources/pom.xml @@ -67,11 +67,6 @@ under the License. syncope-core-starter ${syncope.version} - - org.apache.syncope.core.cache - syncope-core-cache-caffeine - ${syncope.version} - org.apache.syncope.core.idm syncope-core-idm-rest-cxf diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainDirectoryPanel.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainDirectoryPanel.java index b7b07aa0c99..e8a24462ba8 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainDirectoryPanel.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainDirectoryPanel.java @@ -87,7 +87,7 @@ public DomainDirectoryPanel(final String id, final PageReference pageRef) { try { JsonNode info = SyncopeConsoleSession.get().getAnonymousClient().info(); if (info.has("persistence") && info.get("persistence").has("vendor") - && "Hibernate.org".equals(info.get("persistence").get("vendor").asString())) { + && "OpenJPA".equals(info.get("persistence").get("vendor").asString())) { domainClass = JPADomain.class; } else { diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainWizardBuilder.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainWizardBuilder.java index 1e62ecd860e..cff90be8ac7 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainWizardBuilder.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainWizardBuilder.java @@ -57,11 +57,13 @@ public class DomainWizardBuilder extends BaseAjaxWizardBuilder { "org.h2.Driver"); private static final List DATABASE_PLATFORMS = List.of( - "org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect", - "org.hibernate.dialect.MySQLDialect", - "org.hibernate.dialect.MariaDBDialect", - "org.hibernate.dialect.OracleDialect", - "org.hibernate.dialect.H2Dialect"); + "org.apache.openjpa.jdbc.sql.PostgresDictionary", + "org.apache.openjpa.jdbc.sql.MySQLDictionary" + + "(blobTypeName=LONGBLOB,dateFractionDigits=3,useSetStringForClobs=true)", + "org.apache.openjpa.jdbc.sql.MariaDBDictionary" + + "(blobTypeName=LONGBLOB,dateFractionDigits=3)", + "org.apache.openjpa.jdbc.sql.OracleDictionary", + "org.apache.openjpa.jdbc.sql.H2Dictionary"); private final DomainOps domainOps; diff --git a/common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperDomainOpsITCase.java b/common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperDomainOpsITCase.java index b52249e8cec..a3e9af1e90a 100644 --- a/common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperDomainOpsITCase.java +++ b/common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperDomainOpsITCase.java @@ -51,7 +51,7 @@ public void crud() { jdbcURL("jdbc:h2:mem:syncopetest;DB_CLOSE_DELAY=-1"). dbUsername("sa"). dbPassword(""). - databasePlatform("org.hibernate.dialect.H2Dialect"). + databasePlatform("org.apache.openjpa.jdbc.sql.H2Dictionary"). transactionIsolation(JPADomain.TransactionIsolation.TRANSACTION_READ_UNCOMMITTED). adminPassword("password"). adminCipherAlgorithm(CipherAlgorithm.BCRYPT). diff --git a/core/cache/caffeine/pom.xml b/core/cache/caffeine/pom.xml deleted file mode 100644 index b773865f588..00000000000 --- a/core/cache/caffeine/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - 4.0.0 - - - org.apache.syncope.core - syncope-core-cache - 4.2.0-SNAPSHOT - - - Apache Syncope Core Cache Caffeine - Apache Syncope Core Cache Caffeine - org.apache.syncope.core.cache - syncope-core-cache-caffeine - jar - - - ${basedir}/../../.. - - - - - com.github.ben-manes.caffeine - jcache - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - - diff --git a/core/cache/ehcache/pom.xml b/core/cache/ehcache/pom.xml deleted file mode 100644 index 01e71fe1fd8..00000000000 --- a/core/cache/ehcache/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - 4.0.0 - - - org.apache.syncope.core - syncope-core-cache - 4.2.0-SNAPSHOT - - - Apache Syncope Core Cache Ehcache - Apache Syncope Core Cache Ehcache - org.apache.syncope.core.cache - syncope-core-cache-ehcache - jar - - - ${basedir}/../../.. - - - - - org.ehcache - ehcache - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - - diff --git a/core/cache/hazelcast/pom.xml b/core/cache/hazelcast/pom.xml deleted file mode 100644 index 56fc44935f0..00000000000 --- a/core/cache/hazelcast/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - 4.0.0 - - - org.apache.syncope.core - syncope-core-cache - 4.2.0-SNAPSHOT - - - Apache Syncope Core Cache Hazelcast - Apache Syncope Core Cache Hazelcast - org.apache.syncope.core.cache - syncope-core-cache-hazelcast - jar - - - ${basedir}/../../.. - - - - - com.hazelcast - hazelcast - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - - diff --git a/core/cache/infinispan/pom.xml b/core/cache/infinispan/pom.xml deleted file mode 100644 index 6b01d40942b..00000000000 --- a/core/cache/infinispan/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - 4.0.0 - - - org.apache.syncope.core - syncope-core-cache - 4.2.0-SNAPSHOT - - - Apache Syncope Core Cache Infinispan - Apache Syncope Core Cache Infinispan - org.apache.syncope.core.cache - syncope-core-cache-infinispan - jar - - - ${basedir}/../../.. - - - - - org.infinispan - infinispan-jcache - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - - diff --git a/core/cache/pom.xml b/core/cache/pom.xml deleted file mode 100644 index 8a9b9773fa4..00000000000 --- a/core/cache/pom.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - 4.0.0 - - - org.apache.syncope - syncope-core - 4.2.0-SNAPSHOT - - - Apache Syncope Core Cache - Apache Syncope Core Cache - org.apache.syncope.core - syncope-core-cache - pom - - - ${basedir}/../.. - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - - wrap - - zip - - false - - - / - false - false - runtime - - - - - ${rootpom.basedir}/LICENSE - META-INF - - - ${rootpom.basedir}/NOTICE - META-INF - - - - - - - - - - - - - - caffeine - hazelcast - ehcache - infinispan - - diff --git a/core/persistence-jpa/pom.xml b/core/persistence-jpa/pom.xml index 8dd4045af51..7b3257ee60b 100644 --- a/core/persistence-jpa/pom.xml +++ b/core/persistence-jpa/pom.xml @@ -48,9 +48,10 @@ under the License. org.springframework.boot spring-boot-starter-data-jpa + - org.hibernate.orm - hibernate-jcache + org.apache.openjpa + openjpa @@ -129,25 +130,17 @@ under the License. - org.hibernate.orm - hibernate-maven-plugin + org.apache.openjpa + openjpa-maven-plugin + true - - - ${project.build.outputDirectory}/org/apache/syncope/core/persistence/jpa/entity/ - - + ${project.basedir}/src/main/resources/persistence-enhance.xml + org/apache/syncope/core/persistence/jpa/entity/**/*.class - - - org.apache.syncope.core - syncope-core-persistence-common - ${project.version} - - - enhance + enhancer + process-classes enhance @@ -217,6 +210,40 @@ under the License. ojdbc11 + + + openjpa-maven-plugin + + + + sql + + true + + + + clean verify + + + + org.apache.openjpa + openjpa-maven-plugin + true + + org.postgresql.Driver + + + + process-classes + + ${action} + + + + + + + diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/ConnectorManagerCacheEntryListener.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/ConnectorManagerCacheEntryListener.java deleted file mode 100644 index c5a02d16247..00000000000 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/ConnectorManagerCacheEntryListener.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.core.persistence.jpa; - -import jakarta.persistence.EntityManagerFactory; -import java.io.Serializable; -import javax.cache.event.CacheEntryCreatedListener; -import javax.cache.event.CacheEntryEvent; -import javax.cache.event.CacheEntryListenerException; -import javax.cache.event.CacheEntryRemovedListener; -import javax.cache.event.CacheEntryUpdatedListener; -import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO; -import org.apache.syncope.core.persistence.jpa.entity.JPAConnInstance; -import org.apache.syncope.core.persistence.jpa.entity.JPAExternalResource; -import org.apache.syncope.core.provisioning.api.ConnectorManager; -import org.apache.syncope.core.spring.security.AuthContextUtils; -import org.hibernate.cache.spi.CacheImplementor; -import org.hibernate.internal.SessionFactoryImpl; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Takes care of connectors' Spring beans (un)registration in case HA is set up and the actual change is performed by - * another node in the Hibernate cluster. - */ -public class ConnectorManagerCacheEntryListener - implements CacheEntryCreatedListener, - CacheEntryUpdatedListener, - CacheEntryRemovedListener, - Serializable { - - private static final long serialVersionUID = 5260753255454140460L; - - protected static final Logger LOG = LoggerFactory.getLogger(ConnectorManagerCacheEntryListener.class); - - protected final EntityManagerFactory entityManagerFactory; - - protected final ConnectorManager connectorManager; - - protected final ExternalResourceDAO resourceDAO; - - protected final String domain; - - public ConnectorManagerCacheEntryListener( - final EntityManagerFactory entityManagerFactory, - final ConnectorManager connectorManager, - final ExternalResourceDAO resourceDAO, - final String domain) { - - this.entityManagerFactory = entityManagerFactory; - this.connectorManager = connectorManager; - this.resourceDAO = resourceDAO; - this.domain = domain; - } - - protected void registerForExternalResource(final String resourceKey) { - AuthContextUtils.runAsAdmin(domain, () -> resourceDAO.findById(resourceKey).ifPresentOrElse( - resource -> { - try { - connectorManager.registerConnector(resource); - } catch (Exception e) { - LOG.error("While registering connector for resource {}", resourceKey, e); - } - }, - () -> LOG.debug("No resource found for '{}', ignoring", resourceKey))); - } - - protected void registerForConnInstance(final String connInstanceKey) { - AuthContextUtils.runAsAdmin(domain, () -> resourceDAO.findByConnInstance(connInstanceKey).forEach(resource -> { - try { - connectorManager.registerConnector(resource); - } catch (Exception e) { - LOG.error("While registering connector {} for resource {}", connInstanceKey, resource, e); - } - })); - } - - protected void unregister(final String resourceKey) { - AuthContextUtils.runAsAdmin(domain, () -> resourceDAO.findById(resourceKey).ifPresentOrElse( - resource -> { - try { - connectorManager.unregisterConnector(resource); - } catch (Exception e) { - LOG.error("While unregistering connector for resource {}", resourceKey, e); - } - }, - () -> LOG.debug("No resource found for '{}', ignoring", resourceKey))); - } - - @Override - public void onCreated(final Iterable> events) - throws CacheEntryListenerException { - - CacheImplementor l1Cache = entityManagerFactory.unwrap(SessionFactoryImpl.class).getCache(); - - for (CacheEntryEvent event : events) { - String[] split = event.getKey().toString().split("#"); - if (split.length > 1) { - if (JPAExternalResource.class.getName().equals(split[0]) - && !l1Cache.contains(JPAExternalResource.class, split[1])) { - - registerForExternalResource(split[1]); - } else if (JPAConnInstance.class.getName().equals(split[0]) - && !l1Cache.contains(JPAConnInstance.class, split[1])) { - - registerForConnInstance(split[1]); - } - } - } - } - - @Override - public void onUpdated(final Iterable> events) - throws CacheEntryListenerException { - - for (CacheEntryEvent event : events) { - String[] split = event.getKey().toString().split("#"); - if (split.length > 1) { - if (JPAExternalResource.class.getName().equals(split[0])) { - registerForExternalResource(split[1]); - } else if (JPAConnInstance.class.getName().equals(split[0])) { - registerForConnInstance(split[1]); - } - } - } - } - - @Override - public void onRemoved(final Iterable> events) - throws CacheEntryListenerException { - - for (CacheEntryEvent event : events) { - String[] split = event.getKey().toString().split("#"); - if (split.length > 1) { - if (JPAExternalResource.class.getName().equals(split[0])) { - unregister(split[1]); - } - } - } - } -} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/JPADomainRegistry.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/JPADomainRegistry.java index df1fa5e3d53..72108df484d 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/JPADomainRegistry.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/JPADomainRegistry.java @@ -21,7 +21,6 @@ import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import java.io.ByteArrayInputStream; -import javax.cache.CacheManager; import javax.sql.DataSource; import org.apache.syncope.common.keymaster.client.api.model.JPADomain; import org.apache.syncope.core.persistence.api.DomainHolder; @@ -34,12 +33,9 @@ public class JPADomainRegistry implements DomainRegistry { - protected final CacheManager cacheManager; - protected final ConfigurableApplicationContext ctx; - public JPADomainRegistry(final CacheManager cacheManager, final ConfigurableApplicationContext ctx) { - this.cacheManager = cacheManager; + public JPADomainRegistry(final ConfigurableApplicationContext ctx) { this.ctx = ctx; } @@ -82,12 +78,13 @@ public void register(final JPADomain domain) { addPropertyValue("jndiName", "java:comp/env/jdbc/syncope" + domain.getKey() + "DataSource"). addPropertyValue("defaultObject", new HikariDataSource(hikariConfig)). getBeanDefinition()); - DataSource initedDataSource = ctx.getBean(domain.getKey() + "DataSource", DataSource.class); + DataSource initedDataSource = beanFactory().getBean(domain.getKey() + "DataSource", DataSource.class); domainHolder().getDomains().put(domain.getKey(), initedDataSource); // DomainRoutingEntityManagerFactory#domain - ctx.getBean(DomainRoutingEntityManagerFactory.class).domain(domain, initedDataSource, cacheManager); + beanFactory().getBean(DomainRoutingEntityManagerFactory.class). + domain(domain, initedDataSource, ctx.getEnvironment().getProperty("openjpaMetaDataFactory")); // domainContentXML beanFactory().registerBeanDefinition(domain.getKey() + "ContentXML", @@ -113,7 +110,7 @@ public void unregister(final String domain) { beanFactory().removeBeanDefinition(domain + "ContentXML"); // DomainRoutingEntityManagerFactory#remove - ctx.getBean(DomainRoutingEntityManagerFactory.class).remove(domain); + beanFactory().getBean(DomainRoutingEntityManagerFactory.class).remove(domain); // domainDataSourceInitializer unregisterSingleton(domain.toLowerCase() + "DataSourceInitializer"); @@ -125,6 +122,6 @@ public void unregister(final String domain) { unregisterSingleton(domain + "DataSource"); beanFactory().removeBeanDefinition(domain + "DataSource"); - ctx.getBean(DomainHolder.class).getDomains().remove(domain); + beanFactory().getBean(DomainHolder.class).getDomains().remove(domain); } } diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceContext.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceContext.java index 67dd6d7ec09..c961a7e8fc6 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceContext.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceContext.java @@ -20,11 +20,9 @@ import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.PersistenceConfiguration; import jakarta.persistence.ValidationMode; import java.util.HashMap; import java.util.Map; -import javax.cache.CacheManager; import javax.sql.DataSource; import org.apache.syncope.common.keymaster.client.api.DomainOps; import org.apache.syncope.common.keymaster.client.api.model.JPADomain; @@ -180,15 +178,14 @@ import org.apache.syncope.core.persistence.jpa.dao.repo.UserRepoExtImpl; import org.apache.syncope.core.persistence.jpa.dao.repo.WAConfigRepo; import org.apache.syncope.core.persistence.jpa.entity.task.JPATaskUtilsFactory; -import org.apache.syncope.core.persistence.jpa.hibernate.DomainJCacheRegionFactory; import org.apache.syncope.core.persistence.jpa.spring.CommonEntityManagerFactoryConf; import org.apache.syncope.core.persistence.jpa.spring.DomainRoutingEntityManagerFactory; import org.apache.syncope.core.persistence.jpa.spring.MultiJarAwarePersistenceUnitPostProcessor; import org.apache.syncope.core.persistence.jpa.spring.SyncopeJPARepository; import org.apache.syncope.core.provisioning.api.ConnectorManager; import org.apache.syncope.core.spring.security.SecurityProperties; -import org.hibernate.cache.jcache.ConfigSettings; -import org.hibernate.cfg.AvailableSettings; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -213,13 +210,14 @@ @Configuration(proxyBeanMethods = false) public class PersistenceContext { + private static final Logger OPENJPA_LOG = LoggerFactory.getLogger("org.apache.openjpa"); + @ConditionalOnMissingBean @Bean public CommonEntityManagerFactoryConf commonEMFConf( final PersistenceProperties props, @Qualifier("MasterDataSource") - final JndiObjectFactoryBean masterDataSource, - final CacheManager cacheManager) { + final JndiObjectFactoryBean masterDataSource) { CommonEntityManagerFactoryConf commonEMFConf = new CommonEntityManagerFactoryConf(); commonEMFConf.setPackagesToScan("org.apache.syncope.core.persistence.jpa.entity"); @@ -227,14 +225,24 @@ public CommonEntityManagerFactoryConf commonEMFConf( commonEMFConf.setPersistenceUnitPostProcessors(new MultiJarAwarePersistenceUnitPostProcessor()); Map jpaPropertyMap = new HashMap<>(); - jpaPropertyMap.put(PersistenceConfiguration.SCHEMAGEN_DATABASE_ACTION, "update"); + jpaPropertyMap.put("openjpa.Log", "slf4j"); + if (OPENJPA_LOG.isDebugEnabled()) { + jpaPropertyMap.put("openjpa.Log", "SQL=TRACE"); + jpaPropertyMap.put("openjpa.ConnectionFactoryProperties", + "PrintParameters=true, PrettyPrint=true, PrettyPrintLineLength=120"); + } + + jpaPropertyMap.put("openjpa.NontransactionalWrite", false); + + jpaPropertyMap.put("openjpa.jdbc.MappingDefaults", + "ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict," + + "FieldStrategies='" + + "java.util.Locale=org.apache.syncope.core.persistence.jpa.openjpa.LocaleValueHandler'"); - jpaPropertyMap.put(AvailableSettings.USE_SECOND_LEVEL_CACHE, "true"); - jpaPropertyMap.put(AvailableSettings.USE_QUERY_CACHE, "true"); - jpaPropertyMap.put(AvailableSettings.CACHE_REGION_FACTORY, DomainJCacheRegionFactory.class.getName()); - jpaPropertyMap.put(ConfigSettings.CACHE_MANAGER, cacheManager); + jpaPropertyMap.put("openjpa.DataCache", "true"); + jpaPropertyMap.put("openjpa.QueryCache", "true"); - jpaPropertyMap.putAll(props.getAdditionalJPAProperties()); + jpaPropertyMap.put("openjpa.RemoteCommitProvider", props.getRemoteCommitProvider()); commonEMFConf.setJpaPropertyMap(jpaPropertyMap); @@ -251,12 +259,11 @@ public DomainRoutingEntityManagerFactory entityManagerFactory( final JndiObjectFactoryBean masterDataSource, final CommonEntityManagerFactoryConf commonEMFConf, final @Lazy ConnectorManager connectorManager, - final @Lazy ExternalResourceDAO resourceDAO, - final CacheManager cacheManager) { + final @Lazy ExternalResourceDAO resourceDAO) { DomainRoutingEntityManagerFactory emf = new DomainRoutingEntityManagerFactory( commonEMFConf, connectorManager, resourceDAO); - emf.master(props, masterDataSource, cacheManager); + emf.master(props, masterDataSource); return emf; } @@ -301,11 +308,8 @@ public XMLContentExporter xmlContentExporter( @ConditionalOnMissingBean @Bean - public DomainRegistry domainRegistry( - final CacheManager cacheManager, - final ConfigurableApplicationContext ctx) { - - return new JPADomainRegistry(cacheManager, ctx); + public DomainRegistry domainRegistry(final ConfigurableApplicationContext ctx) { + return new JPADomainRegistry(ctx); } @ConditionalOnMissingBean diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceProperties.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceProperties.java index 5c20252192d..cbee91b013b 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceProperties.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceProperties.java @@ -18,8 +18,6 @@ */ package org.apache.syncope.core.persistence.jpa; -import java.util.HashMap; -import java.util.Map; import org.apache.syncope.core.persistence.common.AbstractPersistenceProperties; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -30,23 +28,33 @@ public class PersistenceProperties extends AbstractPersistenceProperties additionalJPAProperties = new HashMap<>(); + public String getRemoteCommitProvider() { + return remoteCommitProvider; + } - public String getViewsXML() { - return viewsXML; + public void setRemoteCommitProvider(final String remoteCommitProvider) { + this.remoteCommitProvider = remoteCommitProvider; } - public void setViewsXML(final String viewsXML) { - this.viewsXML = viewsXML; + public String getMetaDataFactory() { + return metaDataFactory; } - public Map getAdditionalJPAProperties() { - return additionalJPAProperties; + public void setMetaDataFactory(final String metaDataFactory) { + this.metaDataFactory = metaDataFactory; } - public void setAdditionalJPAProperties(final Map additionalJPAProperties) { - this.additionalJPAProperties = additionalJPAProperties; + public String getViewsXML() { + return viewsXML; + } + + public void setViewsXML(final String viewsXML) { + this.viewsXML = viewsXML; } } diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAEntityCacheDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAEntityCacheDAO.java index 935f0e7f626..e95eda19c45 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAEntityCacheDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAEntityCacheDAO.java @@ -19,14 +19,20 @@ package org.apache.syncope.core.persistence.jpa.dao; import jakarta.persistence.EntityManagerFactory; -import java.util.HashMap; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; +import org.apache.openjpa.datacache.CacheStatistics; +import org.apache.openjpa.datacache.CacheStatisticsSPI; +import org.apache.openjpa.datacache.QueryKey; +import org.apache.openjpa.kernel.QueryStatistics; +import org.apache.openjpa.persistence.OpenJPAEntityManagerFactory; +import org.apache.openjpa.persistence.QueryResultCacheImpl; import org.apache.syncope.core.persistence.api.dao.EntityCacheDAO; import org.apache.syncope.core.persistence.api.entity.Entity; -import org.hibernate.Cache; -import org.hibernate.internal.SessionFactoryImpl; -import org.hibernate.stat.EntityStatistics; -import org.hibernate.stat.Statistics; +import org.apache.syncope.core.persistence.api.utils.FormatUtils; public class JPAEntityCacheDAO implements EntityCacheDAO { @@ -36,105 +42,109 @@ public JPAEntityCacheDAO(final EntityManagerFactory entityManagerFactory) { this.entityManagerFactory = entityManagerFactory; } - protected Statistics statistics() { - return entityManagerFactory.unwrap(SessionFactoryImpl.class).getStatistics(); + protected CacheStatisticsSPI cacheStatisticsSPI() { + return (CacheStatisticsSPI) entityManagerFactory.unwrap(OpenJPAEntityManagerFactory.class). + getStoreCache().getStatistics(); + } + + protected QueryStatistics queryStatistics() { + return ((QueryResultCacheImpl) entityManagerFactory.unwrap(OpenJPAEntityManagerFactory.class). + getQueryResultCache()).getDelegate().getStatistics(); } @Override public Map getStatistics() { - Statistics statistics = statistics(); - - Map general = new HashMap<>(); - general.put("start time", statistics.getStart()); - general.put("sessions opened", statistics.getSessionOpenCount()); - general.put("sessions closed", statistics.getSessionCloseCount()); - general.put("transactions", statistics.getTransactionCount()); - general.put("successful transactions", statistics.getSuccessfulTransactionCount()); - general.put("optimistic lock failures", statistics.getOptimisticFailureCount()); - general.put("flushes", statistics.getFlushCount()); - general.put("connections obtained", statistics.getConnectCount()); - general.put("statements prepared", statistics.getPrepareStatementCount()); - general.put("statements closed", statistics.getCloseStatementCount()); - general.put("second level cache puts", statistics.getSecondLevelCachePutCount()); - general.put("second level cache hits", statistics.getSecondLevelCacheHitCount()); - general.put("second level cache misses", statistics.getSecondLevelCacheMissCount()); - general.put("entities loaded", statistics.getEntityLoadCount()); - general.put("entities updated", statistics.getEntityUpdateCount()); - general.put("entities upserted", statistics.getEntityUpsertCount()); - general.put("entities inserted", statistics.getEntityInsertCount()); - general.put("entities deleted", statistics.getEntityDeleteCount()); - general.put("entities fetched", statistics.getEntityFetchCount()); - general.put("collections loaded", statistics.getCollectionLoadCount()); - general.put("collections updated", statistics.getCollectionUpdateCount()); - general.put("collections removed", statistics.getCollectionRemoveCount()); - general.put("collections recreated", statistics.getCollectionRecreateCount()); - general.put("collections fetched", statistics.getCollectionFetchCount()); - general.put("naturalId queries executed to database", statistics.getNaturalIdQueryExecutionCount()); - general.put("naturalId cache puts", statistics.getNaturalIdCachePutCount()); - general.put("naturalId cache hits", statistics.getNaturalIdCacheHitCount()); - general.put("naturalId cache misses", statistics.getNaturalIdCacheMissCount()); - general.put("naturalId max query time", statistics.getNaturalIdQueryExecutionMaxTime()); - general.put("queries executed to database", statistics.getQueryExecutionCount()); - general.put("query cache puts", statistics.getQueryCachePutCount()); - general.put("query cache hits", statistics.getQueryCacheHitCount()); - general.put("query cache misses", statistics.getQueryCacheMissCount()); - general.put("update timestamps cache puts", statistics.getUpdateTimestampsCachePutCount()); - general.put("update timestamps cache hits", statistics.getUpdateTimestampsCacheHitCount()); - general.put("update timestamps cache misses", statistics.getUpdateTimestampsCacheMissCount()); - general.put("max query time", statistics.getQueryExecutionMaxTime()); - general.put("query plan cache hits", statistics.getQueryPlanCacheHitCount()); - general.put("query plan cache misses", statistics.getQueryPlanCacheMissCount()); - - Map entities = new HashMap<>(); - for (String entityName : statistics.getEntityNames()) { - EntityStatistics es = statistics.getEntityStatistics(entityName); - - Map entity = new HashMap<>(); - entity.put("cache hits", es.getCacheHitCount()); - entity.put("cache misses", es.getCacheMissCount()); - entity.put("cache puts", es.getCachePutCount()); - entity.put("cache removes", es.getCacheRemoveCount()); - entity.put("deletes", es.getDeleteCount()); - entity.put("fetches", es.getFetchCount()); - entity.put("inserts", es.getInsertCount()); - entity.put("loads", es.getLoadCount()); - entity.put("updates", es.getUpdateCount()); - entity.put("optimistic lock failures", es.getOptimisticFailureCount()); - entities.put(entityName, entity); - } - - return Map.of("general", general, "entities", entities); + Map result = new LinkedHashMap<>(); + + CacheStatistics cacheStats = cacheStatisticsSPI(); + + Map storeCache = new LinkedHashMap<>(); + result.put("storeCache", storeCache); + + storeCache.put("enabled", cacheStats.isEnabled()); + storeCache.put("activation", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format( + cacheStats.start().toInstant().atOffset(FormatUtils.DEFAULT_OFFSET))); + storeCache.put("last_update", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format( + cacheStats.since().toInstant().atOffset(FormatUtils.DEFAULT_OFFSET))); + storeCache.put("hits", cacheStats.getHitCount()); + storeCache.put("reads", cacheStats.getReadCount()); + storeCache.put("writes", cacheStats.getWriteCount()); + storeCache.put("total_hits", cacheStats.getTotalHitCount()); + storeCache.put("total_reads", cacheStats.getTotalReadCount()); + storeCache.put("total_writes", cacheStats.getTotalWriteCount()); + + List> storeCacheDetails = new ArrayList<>(); + storeCache.put("details", storeCacheDetails); + cacheStats.classNames().forEach(className -> { + Map classMap = new LinkedHashMap<>(); + classMap.put("region", className); + classMap.put("hits", cacheStats.getHitCount(className)); + classMap.put("reads", cacheStats.getReadCount(className)); + classMap.put("writes", cacheStats.getWriteCount(className)); + storeCache.put("total_hits", cacheStats.getTotalHitCount(className)); + storeCache.put("total_reads", cacheStats.getTotalReadCount(className)); + storeCache.put("total_writes", cacheStats.getTotalWriteCount(className)); + storeCacheDetails.add(classMap); + }); + + QueryStatistics queryStats = queryStatistics(); + + Map queryCache = new LinkedHashMap<>(); + result.put("queryCache", queryCache); + + queryCache.put("activation", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format( + queryStats.start().toInstant().atOffset(FormatUtils.DEFAULT_OFFSET))); + queryCache.put("last_update", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format( + queryStats.since().toInstant().atOffset(FormatUtils.DEFAULT_OFFSET))); + queryCache.put("hits", queryStats.getHitCount()); + queryCache.put("executions", queryStats.getExecutionCount()); + queryCache.put("evictions", queryStats.getEvictionCount()); + queryCache.put("total_hits", queryStats.getTotalHitCount()); + queryCache.put("total_executions", queryStats.getTotalExecutionCount()); + queryCache.put("total_evictions", queryStats.getTotalEvictionCount()); + + List> queryCacheDetails = new ArrayList<>(); + queryCache.put("details", queryCacheDetails); + + queryStats.keys().forEach(queryKey -> { + Map queryKeyMap = new LinkedHashMap<>(); + queryKeyMap.put("query_key", queryKey.toString()); + queryCache.put("hits", queryStats.getHitCount(queryKey)); + queryCache.put("executions", queryStats.getExecutionCount(queryKey)); + queryCache.put("total_hits", queryStats.getTotalHitCount(queryKey)); + queryCache.put("total_executions", queryStats.getTotalExecutionCount(queryKey)); + queryCacheDetails.add(queryKeyMap); + }); + + return result; } @Override public void enableStatistics() { - statistics().setStatisticsEnabled(true); + cacheStatisticsSPI().enable(); } @Override public void disableStatistics() { - statistics().setStatisticsEnabled(false); + cacheStatisticsSPI().disable(); } @Override public void resetStatistics() { - statistics().clear(); - } - - protected Cache cache() { - return entityManagerFactory.unwrap(SessionFactoryImpl.class).getCache(); + cacheStatisticsSPI().reset(); + queryStatistics().reset(); } @Override public void evict(final Class entityClass, final String key) { - cache().evict(entityClass, key); + entityManagerFactory.unwrap(OpenJPAEntityManagerFactory.class).getStoreCache().evict(entityClass, key); } @Override public void clearCache() { - Cache cache = cache(); + OpenJPAEntityManagerFactory emf = entityManagerFactory.unwrap(OpenJPAEntityManagerFactory.class); - cache.evictAll(); - cache.evictQueryRegions(); + emf.getStoreCache().evictAll(); + emf.getQueryResultCache().evictAll(); } } diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAPersistenceInfoDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAPersistenceInfoDAO.java index f304792c506..e039cb13ad0 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAPersistenceInfoDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAPersistenceInfoDAO.java @@ -20,24 +20,32 @@ import jakarta.persistence.EntityManagerFactory; import java.io.Serializable; +import java.lang.reflect.Field; +import java.net.InetAddress; +import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.commons.lang3.ClassUtils; +import org.apache.commons.lang3.tuple.Triple; +import org.apache.openjpa.conf.OpenJPAConfiguration; +import org.apache.openjpa.event.RemoteCommitEventManager; +import org.apache.openjpa.event.RemoteCommitProvider; +import org.apache.openjpa.event.TCPRemoteCommitProvider; +import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI; import org.apache.syncope.core.persistence.api.dao.PersistenceInfoDAO; -import org.hibernate.Version; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.util.ClassUtils; +import org.springframework.util.ReflectionUtils; public class JPAPersistenceInfoDAO implements PersistenceInfoDAO { protected static final Logger LOG = LoggerFactory.getLogger(PersistenceInfoDAO.class); protected static final Set UNSAFE_PROPERTIES = Set.of( - "hibernate.connection.datasource", - "javax.persistence.nonJtaDataSource", - "jakarta.persistence.nonJtaDataSource"); + "openjpa.MetaDataFactory", "openjpa.EntityManagerFactory"); protected static boolean isJsonSafe(final String key, final Object value) { if (UNSAFE_PROPERTIES.contains(key)) { @@ -63,7 +71,7 @@ protected static boolean isJsonSafe(final String key, final Object value) { if (!(e.getKey() instanceof String)) { return false; // JSON object keys must be strings } - if (!isJsonSafe((String) e.getKey(), e.getValue())) { + if (!isJsonSafe(key, e.getValue())) { return false; } } @@ -82,21 +90,68 @@ public JPAPersistenceInfoDAO(final EntityManagerFactory entityManagerFactory) { public Map info() { Map result = new LinkedHashMap<>(); - result.put("vendor", Version.class.getPackage().getImplementationVendor()); - result.put("version", Version.class.getPackage().getImplementationVersion()); - result.put("title", Version.class.getPackage().getImplementationTitle()); + OpenJPAEntityManagerFactorySPI emfspi = entityManagerFactory.unwrap(OpenJPAEntityManagerFactorySPI.class); + OpenJPAConfiguration conf = emfspi.getConfiguration(); - Map properties = entityManagerFactory.getProperties(); + Map properties = emfspi.getProperties(); properties.forEach((k, v) -> { - if (k.startsWith("hibernate") || k.startsWith("jakarta.persistence")) { - if (isJsonSafe(k, v)) { - result.put(k, v); - } else { - LOG.debug("Value for {} not JSON safe", k); - } + if (isJsonSafe(k, v)) { + result.put(k, v); + } else { + LOG.debug("Value for {} not JSON safe", k); } }); + Map remoteCommitProvider = new LinkedHashMap<>(); + result.put("remoteCommitProvider", remoteCommitProvider); + + RemoteCommitEventManager rcem = conf.getRemoteCommitEventManager(); + + remoteCommitProvider.put("remoteEventsEnabled", rcem.areRemoteEventsEnabled()); + remoteCommitProvider.put("transmitPersistedObjectIds", rcem.getTransmitPersistedObjectIds()); + remoteCommitProvider.put("failFast", rcem.isFailFast()); + + RemoteCommitProvider rcp = rcem.getRemoteCommitProvider(); + List> addresses = new ArrayList<>(); + if (rcp instanceof TCPRemoteCommitProvider) { + try { + Field addressesField = ReflectionUtils.findField(TCPRemoteCommitProvider.class, "_addresses"); + addressesField.setAccessible(true); + + Class hostClass = ClassUtils.forName( + "org.apache.openjpa.event.TCPRemoteCommitProvider$HostAddress", + ClassUtils.getDefaultClassLoader()); + Field addressField = ReflectionUtils.findField(hostClass, "_address"); + addressField.setAccessible(true); + Field portField = ReflectionUtils.findField(hostClass, "_port"); + portField.setAccessible(true); + Field isAvailableField = ReflectionUtils.findField(hostClass, "_isAvailable"); + isAvailableField.setAccessible(true); + + @SuppressWarnings("unchecked") + List hosts = (List) ReflectionUtils.getField(addressesField, rcp); + hosts.forEach(host -> { + InetAddress address = (InetAddress) ReflectionUtils.getField(addressField, host); + Integer port = (Integer) ReflectionUtils.getField(portField, host); + Boolean isAvailable = (Boolean) ReflectionUtils.getField(isAvailableField, host); + + addresses.add(Triple.of(address.getHostAddress(), port, isAvailable)); + }); + } catch (Exception e) { + LOG.error("Could not fetch information about TCPRemoteCommitProvider", e); + } + } + + remoteCommitProvider.put( + "addresses", + addresses.stream().map(address -> { + Map map = new LinkedHashMap<>(); + map.put("ip", address.getLeft()); + map.put("port", address.getMiddle()); + map.put("available", address.getRight()); + return map; + }).toList()); + return result; } } diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/repo/AbstractAnyRepoExt.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/repo/AbstractAnyRepoExt.java index a7eb7234789..55e2468f92b 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/repo/AbstractAnyRepoExt.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/repo/AbstractAnyRepoExt.java @@ -18,11 +18,14 @@ */ package org.apache.syncope.core.persistence.jpa.dao.repo; +import jakarta.persistence.ConnectionFunction; import jakarta.persistence.EntityManager; +import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.time.OffsetDateTime; import java.util.Optional; +import org.apache.openjpa.persistence.OpenJPAEntityManager; import org.apache.syncope.core.persistence.api.dao.AnyChecker; import org.apache.syncope.core.persistence.api.dao.NotFoundException; import org.apache.syncope.core.persistence.api.entity.Any; @@ -32,7 +35,6 @@ import org.apache.syncope.core.persistence.jpa.entity.anyobject.JPAAnyObject; import org.apache.syncope.core.persistence.jpa.entity.group.JPAGroup; import org.apache.syncope.core.persistence.jpa.entity.user.JPAUser; -import org.hibernate.Session; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.jdbc.core.ResultSetExtractor; @@ -74,19 +76,24 @@ protected AbstractAnyRepoExt( } protected T query(final String sql, final ResultSetExtractor rse, final String... parameters) { - return entityManager.unwrap(Session.class).doReturningWork(conn -> { - try (PreparedStatement stmt = conn.prepareStatement(sql)) { - if (parameters != null) { - for (int i = 0; i < parameters.length; i++) { - stmt.setString(i + 1, parameters[i]); + return entityManager.unwrap(OpenJPAEntityManager.class). + callWithConnection(new ConnectionFunction() { + + @Override + public T apply(final Connection conn) throws Exception { + try (PreparedStatement stmt = conn.prepareStatement(sql)) { + if (parameters != null) { + for (int i = 0; i < parameters.length; i++) { + stmt.setString(i + 1, parameters[i]); + } + } + + try (ResultSet rs = stmt.executeQuery()) { + return rse.extractData(rs); + } + } } - } - - try (ResultSet rs = stmt.executeQuery()) { - return rse.extractData(rs); - } - } - }); + }); } @Transactional(readOnly = true) diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARealm.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARealm.java index 00624f44a25..98094d7f739 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARealm.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARealm.java @@ -81,7 +81,7 @@ public class JPARealm extends AbstractAttributable implements Realm { private String fullPath; @Convert(converter = PlainAttrListConverter.class) - private final List plainAttrs = new ArrayList<>(); + private List plainAttrs = new ArrayList<>(); @ManyToMany @JoinTable(joinColumns = diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/am/JPAOIDCOpEntity.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/am/JPAOIDCOpEntity.java index b452a00305f..cb23d0a8d1e 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/am/JPAOIDCOpEntity.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/am/JPAOIDCOpEntity.java @@ -30,7 +30,6 @@ import org.apache.syncope.core.persistence.api.entity.am.OIDCOpEntity; import org.apache.syncope.core.persistence.jpa.converters.String2SetOfStringMapConverter; import org.apache.syncope.core.persistence.jpa.entity.AbstractGeneratedKeyEntity; -import org.hibernate.Length; @Entity @Table(name = JPAOIDCOpEntity.TABLE) @@ -40,7 +39,7 @@ public class JPAOIDCOpEntity extends AbstractGeneratedKeyEntity implements OIDCO public static final String TABLE = "OIDCOpEntity"; - @Column(nullable = false, length = Length.LONG16) + @Column(nullable = false) @Lob private byte[] jwks; diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/am/JPASAML2IdPEntity.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/am/JPASAML2IdPEntity.java index e2f05cffb34..8c7ee55ef63 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/am/JPASAML2IdPEntity.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/am/JPASAML2IdPEntity.java @@ -25,7 +25,6 @@ import org.apache.commons.lang3.ArrayUtils; import org.apache.syncope.core.persistence.api.entity.am.SAML2IdPEntity; import org.apache.syncope.core.persistence.jpa.entity.AbstractProvidedKeyEntity; -import org.hibernate.Length; @Entity @Table(name = JPASAML2IdPEntity.TABLE) @@ -35,7 +34,7 @@ public class JPASAML2IdPEntity extends AbstractProvidedKeyEntity implements SAML private static final long serialVersionUID = 57352617217394093L; - @Column(nullable = false, length = Length.LONG16) + @Column(nullable = false) @Lob private byte[] metadata; diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/anyobject/JPAAnyObject.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/anyobject/JPAAnyObject.java index 7814485e4ac..4c774e488b2 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/anyobject/JPAAnyObject.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/anyobject/JPAAnyObject.java @@ -70,7 +70,7 @@ public class JPAAnyObject private JPAAnyType type; @Convert(converter = PlainAttrListConverter.class) - private final List plainAttrs = new ArrayList<>(); + private List plainAttrs = new ArrayList<>(); @ManyToMany(fetch = FetchType.LAZY) @JoinTable(joinColumns = diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/group/JPAGroup.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/group/JPAGroup.java index 99effe74f55..bcc6f71cfb6 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/group/JPAGroup.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/group/JPAGroup.java @@ -69,7 +69,7 @@ public class JPAGroup private String name; @Convert(converter = PlainAttrListConverter.class) - private final List plainAttrs = new ArrayList<>(); + private List plainAttrs = new ArrayList<>(); @ManyToMany(fetch = FetchType.LAZY) @JoinTable(joinColumns = diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPALinkedAccount.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPALinkedAccount.java index 7dac74619b5..312bf1e7dc9 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPALinkedAccount.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPALinkedAccount.java @@ -74,7 +74,7 @@ public class JPALinkedAccount extends AbstractAttributable implements LinkedAcco private Boolean suspended = false; @Convert(converter = PlainAttrListConverter.class) - private final List plainAttrs = new ArrayList<>(); + private List plainAttrs = new ArrayList<>(); @Override public String getConnObjectKeyValue() { @@ -153,11 +153,11 @@ protected String encode(final String value) throws Exception { value, Optional.ofNullable(cipherAlgorithm). orElseGet(() -> CipherAlgorithm.valueOf( - ApplicationContextProvider.getBeanFactory().getBean(ConfParamOps.class).get( - AuthContextUtils.getDomain(), - StandardConfParams.PASSWORD_CIPHER_ALGORITHM, - CipherAlgorithm.AES.name(), - String.class)))); + ApplicationContextProvider.getBeanFactory().getBean(ConfParamOps.class).get( + AuthContextUtils.getDomain(), + StandardConfParams.PASSWORD_CIPHER_ALGORITHM, + CipherAlgorithm.AES.name(), + String.class)))); } @Override diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/hibernate/DomainJCacheRegionFactory.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/hibernate/DomainJCacheRegionFactory.java deleted file mode 100644 index 0cdbeaf186e..00000000000 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/hibernate/DomainJCacheRegionFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.core.persistence.jpa.hibernate; - -import org.hibernate.cache.jcache.internal.JCacheRegionFactory; - -public class DomainJCacheRegionFactory extends JCacheRegionFactory { - - private static final long serialVersionUID = -6813667559684397717L; - - @Override - protected void releaseFromUse() { - // nothing to release, there might be other Domains using the cacheManager instance - } -} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/hibernate/SyncopePostgreSQLDialect.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/hibernate/SyncopePostgreSQLDialect.java deleted file mode 100644 index dfb4350853b..00000000000 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/hibernate/SyncopePostgreSQLDialect.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.core.persistence.jpa.hibernate; - -import java.sql.Types; -import org.hibernate.boot.model.TypeContributions; -import org.hibernate.dialect.PostgreSQLDialect; -import org.hibernate.service.ServiceRegistry; -import org.hibernate.type.descriptor.jdbc.ClobJdbcType; -import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry; - -public class SyncopePostgreSQLDialect extends PostgreSQLDialect { - - @Override - protected String columnType(final int sqlTypeCode) { - return switch (sqlTypeCode) { - case Types.CLOB -> - "text"; - - default -> - super.columnType(sqlTypeCode); - }; - } - - @Override - protected void contributePostgreSQLTypes( - final TypeContributions typeContributions, - final ServiceRegistry serviceRegistry) { - - super.contributePostgreSQLTypes(typeContributions, serviceRegistry); - - JdbcTypeRegistry jdbcTypeRegistry = typeContributions.getTypeConfiguration().getJdbcTypeRegistry(); - jdbcTypeRegistry.addDescriptor(Types.CLOB, ClobJdbcType.STRING_BINDING); - } -} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ConnectorManagerRemoteCommitListener.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ConnectorManagerRemoteCommitListener.java new file mode 100644 index 00000000000..30b240f28c0 --- /dev/null +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ConnectorManagerRemoteCommitListener.java @@ -0,0 +1,146 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.jpa.openjpa; + +import java.io.Serializable; +import java.util.Collection; +import java.util.List; +import org.apache.openjpa.event.RemoteCommitEvent; +import org.apache.openjpa.event.RemoteCommitListener; +import org.apache.openjpa.util.StringId; +import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO; +import org.apache.syncope.core.persistence.api.entity.ExternalResource; +import org.apache.syncope.core.persistence.jpa.entity.JPAConnInstance; +import org.apache.syncope.core.persistence.jpa.entity.JPAExternalResource; +import org.apache.syncope.core.provisioning.api.ConnectorManager; +import org.apache.syncope.core.spring.security.AuthContextUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Takes care of connectors' Spring beans (un)registration in case HA is set up and the actual change is performed by + * another node in the OpenJPA cluster. + */ +public class ConnectorManagerRemoteCommitListener implements RemoteCommitListener, Serializable { + + private static final long serialVersionUID = 5260753255454140460L; + + protected static final Logger LOG = LoggerFactory.getLogger(ConnectorManagerRemoteCommitListener.class); + + protected final ConnectorManager connectorManager; + + protected final ExternalResourceDAO resourceDAO; + + protected final String domain; + + public ConnectorManagerRemoteCommitListener( + final ConnectorManager connectorManager, + final ExternalResourceDAO resourceDAO, + final String domain) { + + this.connectorManager = connectorManager; + this.resourceDAO = resourceDAO; + this.domain = domain; + } + + protected void registerForExternalResource(final String resourceKey) { + AuthContextUtils.runAsAdmin(domain, () -> resourceDAO.findById(resourceKey).ifPresentOrElse( + resource -> { + try { + connectorManager.registerConnector(resource); + } catch (Exception e) { + LOG.error("While registering connector for resource {}", resourceKey, e); + } + }, + () -> LOG.debug("No resource found for '{}', ignoring", resourceKey))); + } + + protected void registerForConnInstance(final String connInstanceKey) { + AuthContextUtils.runAsAdmin(domain, () -> { + List resources = resourceDAO.findByConnInstance(connInstanceKey); + if (resources.isEmpty()) { + LOG.debug("No resources found for connInstance '{}', ignoring", connInstanceKey); + } + + resources.forEach(resource -> { + try { + connectorManager.registerConnector(resource); + } catch (Exception e) { + LOG.error("While registering connector {} for resource {}", connInstanceKey, resource, e); + } + }); + }); + } + + protected void unregister(final String resourceKey) { + AuthContextUtils.runAsAdmin(domain, () -> resourceDAO.findById(resourceKey).ifPresentOrElse( + resource -> { + try { + connectorManager.unregisterConnector(resource); + } catch (Exception e) { + LOG.error("While unregistering connector for resource {}", resourceKey, e); + } + }, + () -> LOG.debug("No resource found for '{}', ignoring", resourceKey))); + } + + @SuppressWarnings("unchecked") + @Override + public void afterCommit(final RemoteCommitEvent event) { + if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_OIDS_WITH_ADDS) { + ((Collection) event.getPersistedObjectIds()).stream(). + filter(StringId.class::isInstance). + map(StringId.class::cast). + forEach(id -> { + if (JPAExternalResource.class.isAssignableFrom(id.getType())) { + registerForExternalResource(id.getId()); + } else if (JPAConnInstance.class.isAssignableFrom(id.getType())) { + registerForConnInstance(id.getId()); + } + }); + } + + if (event.getPayloadType() != RemoteCommitEvent.PAYLOAD_EXTENTS) { + ((Collection) event.getUpdatedObjectIds()).stream(). + filter(StringId.class::isInstance). + map(StringId.class::cast). + forEach(id -> { + if (JPAExternalResource.class.isAssignableFrom(id.getType())) { + registerForExternalResource(id.getId()); + } else if (JPAConnInstance.class.isAssignableFrom(id.getType())) { + registerForConnInstance(id.getId()); + } + }); + + ((Collection) event.getDeletedObjectIds()).stream(). + filter(StringId.class::isInstance). + map(StringId.class::cast). + forEach(id -> { + if (JPAExternalResource.class.isAssignableFrom(id.getType())) { + unregister(id.getId()); + } + }); + } + } + + @Override + public void close() { + // nothing to do + } +} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/EntityValidationListener.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/EntityValidationListener.java new file mode 100644 index 00000000000..2c3384ff2c3 --- /dev/null +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/EntityValidationListener.java @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.jpa.openjpa; + +import jakarta.persistence.PrePersist; +import jakarta.persistence.PreUpdate; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validator; +import java.util.Set; +import org.apache.commons.lang3.ClassUtils; +import org.apache.syncope.core.persistence.api.ApplicationContextProvider; +import org.apache.syncope.core.persistence.api.attrvalue.InvalidEntityException; +import org.apache.syncope.core.persistence.api.entity.Any; +import org.apache.syncope.core.persistence.api.entity.Entity; +import org.apache.syncope.core.persistence.api.entity.Groupable; +import org.apache.syncope.core.persistence.api.entity.ProvidedKeyEntity; +import org.apache.syncope.core.persistence.api.entity.Schema; +import org.apache.syncope.core.persistence.api.entity.policy.Policy; +import org.apache.syncope.core.persistence.api.entity.task.Task; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * JPA validation listener implementing bean validation. + */ +public class EntityValidationListener { + + private static final Logger LOG = LoggerFactory.getLogger(EntityValidationListener.class); + + @PrePersist + @PreUpdate + public void validate(final Object object) { + Validator validator = ApplicationContextProvider.getBeanFactory().getBean(Validator.class); + Set> violations = validator.validate(object); + if (!violations.isEmpty()) { + LOG.warn("Bean validation errors found: {}", violations); + + Class entityInt = null; + for (Class interf : ClassUtils.getAllInterfaces(object.getClass())) { + if (!Entity.class.equals(interf) + && !ProvidedKeyEntity.class.equals(interf) + && !Schema.class.equals(interf) + && !Task.class.equals(interf) + && !Policy.class.equals(interf) + && !Groupable.class.equals(interf) + && !Any.class.equals(interf) + && Entity.class.isAssignableFrom(interf)) { + + entityInt = interf; + } + } + + throw new InvalidEntityException(entityInt == null ? "Entity" : entityInt.getSimpleName(), violations); + } + } +} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ImplementationManagerCacheEntryListener.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ImplementationManagerCacheEntryListener.java deleted file mode 100644 index 85d05aff320..00000000000 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ImplementationManagerCacheEntryListener.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.core.persistence.jpa.openjpa; - -import jakarta.persistence.EntityManagerFactory; -import java.io.Serializable; -import javax.cache.event.CacheEntryEvent; -import javax.cache.event.CacheEntryListenerException; -import javax.cache.event.CacheEntryRemovedListener; -import javax.cache.event.CacheEntryUpdatedListener; -import org.apache.syncope.core.persistence.jpa.entity.JPAImplementation; -import org.apache.syncope.core.spring.implementation.ImplementationManager; - -/** - * Takes care of Implementation classes cache removal in case HA is set up and the actual change is performed by - * another node in the Hibernate cluster. - */ -public class ImplementationManagerCacheEntryListener - implements CacheEntryUpdatedListener, - CacheEntryRemovedListener, Serializable { - - private static final long serialVersionUID = 5260753255454140460L; - - protected final EntityManagerFactory entityManagerFactory; - - protected final String domain; - - public ImplementationManagerCacheEntryListener( - final EntityManagerFactory entityManagerFactory, - final String domain) { - - this.entityManagerFactory = entityManagerFactory; - this.domain = domain; - } - - @Override - public void onUpdated(final Iterable> events) - throws CacheEntryListenerException { - - for (CacheEntryEvent event : events) { - String[] split = event.getKey().toString().split("#"); - if (split.length > 1) { - if (JPAImplementation.class.getName().equals(split[0])) { - ImplementationManager.purge(domain, split[1]); - } - } - } - } - - @Override - public void onRemoved(final Iterable> events) - throws CacheEntryListenerException { - - for (CacheEntryEvent event : events) { - String[] split = event.getKey().toString().split("#"); - if (split.length > 1) { - if (JPAImplementation.class.getName().equals(split[0])) { - ImplementationManager.purge(domain, split[1]); - } - } - } - } -} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ImplementationManagerRemoteCommitListener.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ImplementationManagerRemoteCommitListener.java new file mode 100644 index 00000000000..b5e8d47b52e --- /dev/null +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/ImplementationManagerRemoteCommitListener.java @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.jpa.openjpa; + +import java.io.Serializable; +import java.util.Collection; +import org.apache.openjpa.event.RemoteCommitEvent; +import org.apache.openjpa.event.RemoteCommitListener; +import org.apache.openjpa.util.StringId; +import org.apache.syncope.core.persistence.jpa.entity.JPAImplementation; +import org.apache.syncope.core.spring.implementation.ImplementationManager; + +/** + * Takes care of connectors' Spring beans (un)registration in case HA is set up and the actual change is performed by + * another node in the OpenJPA cluster. + */ +public class ImplementationManagerRemoteCommitListener implements RemoteCommitListener, Serializable { + + private static final long serialVersionUID = 5260753255454140460L; + + protected final String domain; + + public ImplementationManagerRemoteCommitListener(final String domain) { + this.domain = domain; + } + + @SuppressWarnings("unchecked") + @Override + public void afterCommit(final RemoteCommitEvent event) { + if (event.getPayloadType() != RemoteCommitEvent.PAYLOAD_EXTENTS) { + ((Collection) event.getUpdatedObjectIds()).stream(). + filter(StringId.class::isInstance). + map(StringId.class::cast). + forEach(id -> { + if (JPAImplementation.class.isAssignableFrom(id.getType())) { + ImplementationManager.purge(domain, id.getId()); + } + }); + + ((Collection) event.getDeletedObjectIds()).stream(). + filter(StringId.class::isInstance). + map(StringId.class::cast). + forEach(id -> { + if (JPAImplementation.class.isAssignableFrom(id.getType())) { + ImplementationManager.purge(domain, id.getId()); + } + }); + } + } + + @Override + public void close() { + // nothing to do + } +} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/LocaleValueHandler.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/LocaleValueHandler.java new file mode 100644 index 00000000000..b39646cfeb1 --- /dev/null +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/openjpa/LocaleValueHandler.java @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.jpa.openjpa; + +import java.util.Locale; +import java.util.Optional; +import org.apache.commons.lang3.LocaleUtils; +import org.apache.openjpa.jdbc.identifier.DBIdentifier; +import org.apache.openjpa.jdbc.kernel.JDBCStore; +import org.apache.openjpa.jdbc.meta.ValueMapping; +import org.apache.openjpa.jdbc.meta.strats.AbstractValueHandler; +import org.apache.openjpa.jdbc.schema.Column; +import org.apache.openjpa.jdbc.schema.ColumnIO; +import org.apache.openjpa.jdbc.sql.DBDictionary; +import org.apache.openjpa.meta.JavaTypes; + +public class LocaleValueHandler extends AbstractValueHandler { + + private static final long serialVersionUID = 487849441377630981L; + + private static final LocaleValueHandler INSTANCE = new LocaleValueHandler(); + + public static LocaleValueHandler getInstance() { + return INSTANCE; + } + + @Override + @Deprecated + public Column[] map(final ValueMapping vm, final String name, final ColumnIO io, final boolean adapt) { + DBDictionary dict = vm.getMappingRepository().getDBDictionary(); + DBIdentifier colName = DBIdentifier.newColumn( + name, Optional.ofNullable(dict).filter(DBDictionary::delimitAll).isPresent()); + return map(colName); + } + + public static Column[] map(final DBIdentifier name) { + Column col = new Column(); + col.setIdentifier(name); + col.setJavaType(JavaTypes.STRING); + return new Column[] { col }; + } + + @Override + public Object toDataStoreValue(final ValueMapping vm, final Object val, final JDBCStore store) { + return Optional.ofNullable(val).map(o -> ((Locale) o).toString()).orElse(null); + } + + @Override + public Object toObjectValue(final ValueMapping vm, final Object val) { + return Optional.ofNullable(val).map(o -> LocaleUtils.toLocale((String) o)).orElse(null); + } +} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainEntityManagerFactoryBean.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainEntityManagerFactoryBean.java index 2f6549796cf..5f9db981ef2 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainEntityManagerFactoryBean.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainEntityManagerFactoryBean.java @@ -18,16 +18,13 @@ */ package org.apache.syncope.core.persistence.jpa.spring; -import java.util.Optional; -import javax.cache.CacheManager; -import javax.cache.configuration.FactoryBuilder; -import javax.cache.configuration.MutableCacheEntryListenerConfiguration; -import org.apache.syncope.core.persistence.jpa.ConnectorManagerCacheEntryListener; -import org.apache.syncope.core.persistence.jpa.entity.JPAConnInstance; -import org.apache.syncope.core.persistence.jpa.entity.JPAExternalResource; -import org.apache.syncope.core.persistence.jpa.entity.JPAImplementation; -import org.apache.syncope.core.persistence.jpa.openjpa.ImplementationManagerCacheEntryListener; -import org.hibernate.cache.spi.support.RegionNameQualifier; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.spi.PersistenceUnitInfo; +import java.util.ArrayList; +import java.util.List; +import org.apache.openjpa.event.RemoteCommitListener; +import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI; +import org.apache.syncope.core.persistence.jpa.openjpa.ConnectorManagerRemoteCommitListener; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; /** @@ -38,51 +35,33 @@ public class DomainEntityManagerFactoryBean extends LocalContainerEntityManagerF private static final long serialVersionUID = 49152547930966545L; - protected final CacheManager cacheManager; + protected final List remoteCommitListeners = new ArrayList<>(); - public DomainEntityManagerFactoryBean(final CacheManager cacheManager) { - this.cacheManager = cacheManager; - } + protected ConnectorManagerRemoteCommitListener connectorManagerRemoteCommitListener; public void setCommonEntityManagerFactoryConf(final CommonEntityManagerFactoryConf commonEMFConf) { super.setJpaPropertyMap(commonEMFConf.getJpaPropertyMap()); - Optional.ofNullable(commonEMFConf.getPackagesToScan()). - ifPresent(super::setPackagesToScan); + if (commonEMFConf.getPackagesToScan() != null) { + super.setPackagesToScan(commonEMFConf.getPackagesToScan()); + } super.setValidationMode(commonEMFConf.getValidationMode()); - Optional.ofNullable(commonEMFConf.getPersistenceUnitPostProcessors()). - ifPresent(super::setPersistenceUnitPostProcessors); + if (commonEMFConf.getPersistenceUnitPostProcessors() != null) { + super.setPersistenceUnitPostProcessors(commonEMFConf.getPersistenceUnitPostProcessors()); + } } - public void setConnectorManagerCacheEntryListener( - final String domain, - final ConnectorManagerCacheEntryListener connectorManagerCacheEntryListener) { - - Optional.ofNullable(cacheManager.getCache( - RegionNameQualifier.INSTANCE.qualify(domain, JPAConnInstance.class.getName()))). - ifPresent(cache -> cache.registerCacheEntryListener( - new MutableCacheEntryListenerConfiguration( - FactoryBuilder.factoryOf(connectorManagerCacheEntryListener), - null, false, false))); - Optional.ofNullable(cacheManager.getCache( - RegionNameQualifier.INSTANCE.qualify(domain, JPAExternalResource.class.getName()))). - ifPresent(cache -> cache.registerCacheEntryListener( - new MutableCacheEntryListenerConfiguration( - FactoryBuilder.factoryOf(connectorManagerCacheEntryListener), - null, false, false))); + public void addRemoteCommitListener(final RemoteCommitListener remoteCommitListener) { + remoteCommitListeners.add(remoteCommitListener); } - public void setImplementationManagerCacheEntryListener( - final String domain, - final ImplementationManagerCacheEntryListener implementationManagerCacheEntryListener) { + @Override + protected void postProcessEntityManagerFactory(final EntityManagerFactory emf, final PersistenceUnitInfo pui) { + super.postProcessEntityManagerFactory(emf, pui); - Optional.ofNullable(cacheManager.getCache( - RegionNameQualifier.INSTANCE.qualify(domain, JPAImplementation.class.getName()))). - ifPresent(cache -> cache.registerCacheEntryListener( - new MutableCacheEntryListenerConfiguration( - FactoryBuilder.factoryOf(implementationManagerCacheEntryListener), - null, false, false))); + OpenJPAEntityManagerFactorySPI emfspi = emf.unwrap(OpenJPAEntityManagerFactorySPI.class); + remoteCommitListeners.forEach(rcl -> emfspi.getConfiguration().getRemoteCommitEventManager().addListener(rcl)); } } diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainRoutingEntityManagerFactory.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainRoutingEntityManagerFactory.java index 10f155eaadc..2d71651551a 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainRoutingEntityManagerFactory.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainRoutingEntityManagerFactory.java @@ -31,35 +31,26 @@ import jakarta.persistence.criteria.CriteriaBuilder; import jakarta.persistence.metamodel.Metamodel; import java.io.Closeable; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Consumer; import java.util.function.Function; -import javax.cache.CacheManager; import javax.sql.DataSource; import org.apache.syncope.common.keymaster.client.api.model.JPADomain; import org.apache.syncope.common.lib.SyncopeConstants; import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO; -import org.apache.syncope.core.persistence.jpa.ConnectorManagerCacheEntryListener; import org.apache.syncope.core.persistence.jpa.PersistenceProperties; -import org.apache.syncope.core.persistence.jpa.openjpa.ImplementationManagerCacheEntryListener; +import org.apache.syncope.core.persistence.jpa.openjpa.ConnectorManagerRemoteCommitListener; +import org.apache.syncope.core.persistence.jpa.openjpa.ImplementationManagerRemoteCommitListener; import org.apache.syncope.core.provisioning.api.ConnectorManager; import org.apache.syncope.core.spring.security.AuthContextUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.jndi.JndiObjectFactoryBean; -import org.springframework.orm.jpa.JpaVendorAdapter; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; -public class DomainRoutingEntityManagerFactory implements EntityManagerFactory, Closeable, Serializable { - - private static final long serialVersionUID = 9013192242319940958L; +public class DomainRoutingEntityManagerFactory implements EntityManagerFactory, Closeable { protected static final Logger LOG = LoggerFactory.getLogger(DomainRoutingEntityManagerFactory.class); @@ -83,47 +74,45 @@ public DomainRoutingEntityManagerFactory( protected void addToJpaPropertyMap( final DomainEntityManagerFactoryBean emf, - final JpaVendorAdapter vendorAdapter, + final OpenJpaVendorAdapter vendorAdapter, final String dbSchema, - final String domain) { + final String orm, + final String metadataFactory) { emf.getJpaPropertyMap().putAll(vendorAdapter.getJpaPropertyMap()); Optional.ofNullable(dbSchema). - ifPresent(s -> emf.getJpaPropertyMap().put("hibernate.default_schema", s)); + ifPresent(s -> emf.getJpaPropertyMap().put("openjpa.jdbc.Schema", s)); - emf.getJpaPropertyMap().put("hibernate.cache.region_prefix", domain); + Optional.ofNullable(metadataFactory). + ifPresent(m -> emf.getJpaPropertyMap().put("openjpa.MetaDataFactory", m.replace("##orm##", orm))); } public void master( final PersistenceProperties props, - final JndiObjectFactoryBean dataSource, - final CacheManager cacheManager) { + final JndiObjectFactoryBean dataSource) { - HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); + OpenJpaVendorAdapter vendorAdapter = new OpenJpaVendorAdapter(); vendorAdapter.setShowSql(false); vendorAdapter.setGenerateDdl(true); vendorAdapter.setDatabasePlatform(props.getDomain().getFirst().getDatabasePlatform()); - DomainEntityManagerFactoryBean emf = new DomainEntityManagerFactoryBean(cacheManager); + DomainEntityManagerFactoryBean emf = new DomainEntityManagerFactoryBean(); emf.setPersistenceUnitName(SyncopeConstants.MASTER_DOMAIN); emf.setMappingResources(props.getDomain().getFirst().getOrm()); emf.setDataSource(Objects.requireNonNull((DataSource) dataSource.getObject())); emf.setJpaVendorAdapter(vendorAdapter); emf.setCommonEntityManagerFactoryConf(commonEMFConf); - emf.setConnectorManagerCacheEntryListener( - SyncopeConstants.MASTER_DOMAIN, - new ConnectorManagerCacheEntryListener( - this, connectorManager, resourceDAO, SyncopeConstants.MASTER_DOMAIN)); - emf.setImplementationManagerCacheEntryListener( - SyncopeConstants.MASTER_DOMAIN, - new ImplementationManagerCacheEntryListener(this, SyncopeConstants.MASTER_DOMAIN)); + emf.addRemoteCommitListener(new ConnectorManagerRemoteCommitListener( + connectorManager, resourceDAO, SyncopeConstants.MASTER_DOMAIN)); + emf.addRemoteCommitListener(new ImplementationManagerRemoteCommitListener(SyncopeConstants.MASTER_DOMAIN)); addToJpaPropertyMap( emf, vendorAdapter, props.getDomain().getFirst().getDbSchema(), - SyncopeConstants.MASTER_DOMAIN); + props.getDomain().getFirst().getOrm(), + props.getMetaDataFactory()); emf.afterPropertiesSet(); @@ -133,27 +122,24 @@ public void master( public void domain( final JPADomain domain, final DataSource dataSource, - final CacheManager cacheManager) { + final String metadataFactory) { - HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); + OpenJpaVendorAdapter vendorAdapter = new OpenJpaVendorAdapter(); vendorAdapter.setShowSql(false); vendorAdapter.setGenerateDdl(true); vendorAdapter.setDatabasePlatform(domain.getDatabasePlatform()); - DomainEntityManagerFactoryBean emf = new DomainEntityManagerFactoryBean(cacheManager); + DomainEntityManagerFactoryBean emf = new DomainEntityManagerFactoryBean(); emf.setPersistenceUnitName(domain.getKey()); emf.setMappingResources(domain.getOrm()); emf.setDataSource(dataSource); emf.setJpaVendorAdapter(vendorAdapter); emf.setCommonEntityManagerFactoryConf(commonEMFConf); - emf.setConnectorManagerCacheEntryListener( - domain.getKey(), - new ConnectorManagerCacheEntryListener(this, connectorManager, resourceDAO, domain.getKey())); - emf.setImplementationManagerCacheEntryListener( - domain.getKey(), - new ImplementationManagerCacheEntryListener(this, domain.getKey())); + emf.addRemoteCommitListener(new ConnectorManagerRemoteCommitListener( + connectorManager, resourceDAO, domain.getKey())); + emf.addRemoteCommitListener(new ImplementationManagerRemoteCommitListener(domain.getKey())); - addToJpaPropertyMap(emf, vendorAdapter, domain.getDbSchema(), domain.getKey()); + addToJpaPropertyMap(emf, vendorAdapter, domain.getDbSchema(), domain.getOrm(), metadataFactory); emf.afterPropertiesSet(); @@ -286,12 +272,4 @@ public void runInTransaction(final Consumer cnsmr) { public R callInTransaction(final Function fnctn) { return delegate().callInTransaction(fnctn); } - - private void writeObject(final ObjectOutputStream oos) throws IOException { - // prevents unwanted serialization by JCache provider - } - - private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException { - // prevents unwanted deserialization by JCache provider - } } diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/OpenJpaDialect.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/OpenJpaDialect.java new file mode 100644 index 00000000000..83d4a5b6f01 --- /dev/null +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/OpenJpaDialect.java @@ -0,0 +1,155 @@ +/* + * Copyright 2002-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.syncope.core.persistence.jpa.spring; + +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceException; +import java.sql.Connection; +import org.apache.commons.logging.LogFactory; +import org.apache.openjpa.persistence.FetchPlan; +import org.apache.openjpa.persistence.OpenJPAEntityManager; +import org.apache.openjpa.persistence.OpenJPAPersistence; +import org.apache.openjpa.persistence.jdbc.IsolationLevel; +import org.apache.openjpa.persistence.jdbc.JDBCFetchPlan; +import org.springframework.jdbc.datasource.ConnectionHandle; +import org.springframework.jdbc.datasource.ConnectionHolder; +import org.springframework.jdbc.support.JdbcUtils; +import org.springframework.orm.jpa.DefaultJpaDialect; +import org.springframework.transaction.SavepointManager; +import org.springframework.transaction.TransactionDefinition; +import org.springframework.transaction.TransactionException; + +/** + * {@link org.springframework.orm.jpa.JpaDialect} implementation for Apache OpenJPA. + * Developed and tested against OpenJPA 2.2. + * + * @author Juergen Hoeller + * @author Costin Leau + * @since 2.0 + */ +public class OpenJpaDialect extends DefaultJpaDialect { + + private static final long serialVersionUID = 2099118508988476959L; + + @Override + public Object beginTransaction(final EntityManager entityManager, final TransactionDefinition definition) + throws PersistenceException, TransactionException { + + OpenJPAEntityManager openJpaEntityManager = getOpenJPAEntityManager(entityManager); + + if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) { + // Pass custom isolation level on to OpenJPA's JDBCFetchPlan configuration + FetchPlan fetchPlan = openJpaEntityManager.getFetchPlan(); + if (fetchPlan instanceof JDBCFetchPlan jDBCFetchPlan) { + IsolationLevel isolation = IsolationLevel.fromConnectionConstant(definition.getIsolationLevel()); + jDBCFetchPlan.setIsolation(isolation); + } + } + + entityManager.getTransaction().begin(); + + if (!definition.isReadOnly()) { + // Like with EclipseLink, make sure to start the logic transaction early so that other + // participants using the connection (such as JdbcTemplate) run in a transaction. + openJpaEntityManager.beginStore(); + } + + // Custom implementation for OpenJPA savepoint handling + return new OpenJpaTransactionData(openJpaEntityManager); + } + + @Override + public ConnectionHandle getJdbcConnection(final EntityManager entityManager, final boolean readOnly) + throws PersistenceException { + + return new OpenJpaConnectionHandle(getOpenJPAEntityManager(entityManager)); + } + + /** + * Return the OpenJPA-specific variant of {@code EntityManager}. + * + * @param em the generic {@code EntityManager} instance + * @return the OpenJPA-specific variant of {@code EntityManager} + */ + protected static OpenJPAEntityManager getOpenJPAEntityManager(final EntityManager em) { + return OpenJPAPersistence.cast(em); + } + + /** + * Transaction data Object exposed from {@code beginTransaction}, + * implementing the {@link SavepointManager} interface. + */ + private static class OpenJpaTransactionData implements SavepointManager { + + private final OpenJPAEntityManager entityManager; + + private int savepointCounter = 0; + + OpenJpaTransactionData(final OpenJPAEntityManager entityManager) { + this.entityManager = entityManager; + } + + @Override + public Object createSavepoint() throws TransactionException { + this.savepointCounter++; + String savepointName = ConnectionHolder.SAVEPOINT_NAME_PREFIX + this.savepointCounter; + this.entityManager.setSavepoint(savepointName); + return savepointName; + } + + @Override + public void rollbackToSavepoint(final Object savepoint) throws TransactionException { + this.entityManager.rollbackToSavepoint((String) savepoint); + } + + @Override + public void releaseSavepoint(final Object savepoint) throws TransactionException { + try { + this.entityManager.releaseSavepoint((String) savepoint); + } catch (Throwable ex) { + LogFactory.getLog(OpenJpaTransactionData.class).debug( + "Could not explicitly release OpenJPA savepoint", ex); + } + } + } + + /** + * {@link ConnectionHandle} implementation that fetches a new OpenJPA-provided + * Connection for every {@code getConnection} call and closes the Connection on + * {@code releaseConnection}. This is necessary because OpenJPA requires the + * fetched Connection to be closed before continuing EntityManager work. + * + * @see org.apache.openjpa.persistence.OpenJPAEntityManager#getConnection() + */ + private static class OpenJpaConnectionHandle implements ConnectionHandle { + + private final OpenJPAEntityManager entityManager; + + OpenJpaConnectionHandle(final OpenJPAEntityManager entityManager) { + this.entityManager = entityManager; + } + + @Override + public Connection getConnection() { + return (Connection) this.entityManager.getConnection(); + } + + @Override + public void releaseConnection(final Connection con) { + JdbcUtils.closeConnection(con); + } + } +} diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/OpenJpaVendorAdapter.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/OpenJpaVendorAdapter.java new file mode 100644 index 00000000000..deaa696a3b9 --- /dev/null +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/OpenJpaVendorAdapter.java @@ -0,0 +1,131 @@ +/* + * Copyright 2002-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.syncope.core.persistence.jpa.spring; + +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.spi.PersistenceProvider; +import java.util.HashMap; +import java.util.Map; +import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI; +import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI; +import org.apache.openjpa.persistence.PersistenceProviderImpl; +import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter; +import org.springframework.orm.jpa.vendor.Database; + +/** + * {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for Apache OpenJPA. + * Developed and tested against OpenJPA 3.0. + * + * Exposes OpenJPA's persistence provider and EntityManager extension interface, + * and adapts {@link AbstractJpaVendorAdapter}'s common configuration settings. + * No support for the detection of annotated packages (through + * {@link org.springframework.orm.jpa.persistenceunit.SmartPersistenceUnitInfo#getManagedPackages()}) + * since OpenJPA doesn't use package-level metadata. + * + * @author Juergen Hoeller + * @author Costin Leau + * @since 2.0 + * @see OpenJpaDialect + * @see org.apache.openjpa.persistence.PersistenceProviderImpl + * @see org.apache.openjpa.persistence.OpenJPAEntityManager + */ +public class OpenJpaVendorAdapter extends AbstractJpaVendorAdapter { + + private final PersistenceProvider persistenceProvider = new PersistenceProviderImpl(); + + private final OpenJpaDialect jpaDialect = new OpenJpaDialect(); + + @Override + public PersistenceProvider getPersistenceProvider() { + return this.persistenceProvider; + } + + @Override + public String getPersistenceProviderRootPackage() { + return "org.apache.openjpa"; + } + + @Override + public Map getJpaPropertyMap() { + Map jpaProperties = new HashMap<>(); + + if (getDatabasePlatform() != null) { + jpaProperties.put("openjpa.jdbc.DBDictionary", getDatabasePlatform()); + } else if (getDatabase() != null) { + String databaseDictonary = determineDatabaseDictionary(getDatabase()); + if (databaseDictonary != null) { + jpaProperties.put("openjpa.jdbc.DBDictionary", databaseDictonary); + } + } + + if (isGenerateDdl()) { + jpaProperties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)"); + } + if (isShowSql()) { + // Taken from the OpenJPA 0.9.6 docs ("Standard OpenJPA Log Configuration + All SQL Statements") + jpaProperties.put("openjpa.Log", "DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"); + } + + return jpaProperties; + } + + /** + * Determine the OpenJPA database dictionary name for the given database. + * + * @param database the specified database + * @return the OpenJPA database dictionary name, or {@code null} if none found + */ + protected static String determineDatabaseDictionary(final Database database) { + return switch (database) { + case DB2 -> + "db2"; + case DERBY -> + "derby"; + case HSQL -> + "hsql(SimulateLocking=true)"; + case INFORMIX -> + "informix"; + case MYSQL -> + "mysql"; + case ORACLE -> + "oracle"; + case POSTGRESQL -> + "postgres"; + case SQL_SERVER -> + "sqlserver"; + case SYBASE -> + "sybase"; + default -> + null; + }; + } + + @Override + public OpenJpaDialect getJpaDialect() { + return this.jpaDialect; + } + + @Override + public Class getEntityManagerFactoryInterface() { + return OpenJPAEntityManagerFactorySPI.class; + } + + @Override + public Class getEntityManagerInterface() { + return OpenJPAEntityManagerSPI.class; + } +} diff --git a/core/persistence-jpa/src/main/resources/persistence-enhance.xml b/core/persistence-jpa/src/main/resources/persistence-enhance.xml new file mode 100644 index 00000000000..8983bae5d1b --- /dev/null +++ b/core/persistence-jpa/src/main/resources/persistence-enhance.xml @@ -0,0 +1,31 @@ + + + + + + META-INF/spring-orm.xml + NONE + + + diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java index 8d901c874cd..3f7cff474bb 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java @@ -96,7 +96,7 @@ private static boolean classExists(final String name) { if (classExists("org.postgresql.Driver")) { JDBC_DRIVER = "org.postgresql.Driver"; - DATABASE_PLATFORM = "org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect"; + DATABASE_PLATFORM = "org.apache.openjpa.jdbc.sql.PostgresDictionary"; ORM = "META-INF/spring-orm.xml"; INDEXES = "classpath:META-INF/indexes.xml"; VIEWS = "classpath:META-INF/views.xml"; @@ -120,7 +120,8 @@ private static boolean classExists(final String name) { } } else if (classExists("com.mysql.cj.jdbc.Driver")) { JDBC_DRIVER = "com.mysql.cj.jdbc.Driver"; - DATABASE_PLATFORM = "org.hibernate.dialect.MySQLDialect"; + DATABASE_PLATFORM = "org.apache.openjpa.jdbc.sql.MySQLDictionary(" + + "blobTypeName=LONGBLOB,dateFractionDigits=3,useSetStringForClobs=true)"; ORM = "META-INF/mysql/spring-orm.xml"; INDEXES = "classpath:META-INF/mysql/indexes.xml"; VIEWS = "classpath:META-INF/mysql/views.xml"; @@ -142,7 +143,8 @@ private static boolean classExists(final String name) { JDBC2_URL_SUPPLIER = twoDomain::getJdbcUrl; } else if (classExists("org.mariadb.jdbc.Driver")) { JDBC_DRIVER = "org.mariadb.jdbc.Driver"; - DATABASE_PLATFORM = "org.hibernate.dialect.MariaDBDialect"; + DATABASE_PLATFORM = "org.apache.openjpa.jdbc.sql.MariaDBDictionary(" + + "blobTypeName=LONGBLOB,dateFractionDigits=3)"; ORM = "META-INF/mariadb/spring-orm.xml"; INDEXES = "classpath:META-INF/mariadb/indexes.xml"; VIEWS = "classpath:META-INF/mariadb/views.xml"; @@ -164,7 +166,7 @@ private static boolean classExists(final String name) { JDBC2_URL_SUPPLIER = twoDomain::getJdbcUrl; } else if (classExists("oracle.jdbc.OracleDriver")) { JDBC_DRIVER = "oracle.jdbc.OracleDriver"; - DATABASE_PLATFORM = "org.hibernate.dialect.OracleDialect"; + DATABASE_PLATFORM = "org.apache.openjpa.jdbc.sql.OracleDictionary"; ORM = "META-INF/oracle/spring-orm.xml"; INDEXES = "classpath:META-INF/oracle/indexes.xml"; VIEWS = "classpath:META-INF/oracle/views.xml"; diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/PersistenceTestContext.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/PersistenceTestContext.java index 0fa5bc7e139..1a5c3e3e017 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/PersistenceTestContext.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/PersistenceTestContext.java @@ -140,8 +140,7 @@ public DomainRoutingEntityManagerFactory entityManagerFactory( final JndiObjectFactoryBean masterDataSource, final CommonEntityManagerFactoryConf commonEMFConf, final @Lazy ConnectorManager connectorManager, - final @Lazy ExternalResourceDAO resourceDAO, - final CacheManager cacheManager) { + final @Lazy ExternalResourceDAO resourceDAO) { DomainRoutingEntityManagerFactory emf = new DomainRoutingEntityManagerFactory( commonEMFConf, connectorManager, resourceDAO) { @@ -153,7 +152,7 @@ protected EntityManagerFactory delegate() { delegates.get(SyncopeConstants.MASTER_DOMAIN)); } }; - emf.master(props, masterDataSource, cacheManager); + emf.master(props, masterDataSource); return emf; } } diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java index 79e7367809e..4d859f8c868 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java @@ -39,6 +39,7 @@ import org.apache.syncope.core.persistence.api.dao.AnySearchDAO; 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.EntityCacheDAO; import org.apache.syncope.core.persistence.api.dao.GroupDAO; import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO; import org.apache.syncope.core.persistence.api.dao.RealmDAO; @@ -65,6 +66,7 @@ import org.apache.syncope.core.persistence.api.utils.FormatUtils; import org.apache.syncope.core.persistence.api.utils.RealmUtils; import org.apache.syncope.core.persistence.jpa.AbstractTest; +import org.apache.syncope.core.persistence.jpa.entity.user.JPAUser; import org.apache.syncope.core.spring.security.AuthContextUtils; import org.apache.syncope.core.spring.security.SyncopeAuthenticationDetails; import org.apache.syncope.core.spring.security.SyncopeGrantedAuthority; @@ -113,8 +115,13 @@ public class AnySearchTest extends AbstractTest { @Autowired private PlainAttrValidationManager validator; + @Autowired + private EntityCacheDAO entityCacheDAO; + @BeforeEach public void adjustLoginDateForLocalSystem() { + entityCacheDAO.evict(JPAUser.class, "1417acbe-cbf6-4277-9372-e75e04f97000"); + User rossini = userDAO.findByUsername("rossini").orElseThrow(); PlainAttr loginDate = rossini.getPlainAttr("loginDate").orElseThrow(); diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java index ed01ecca9e7..69f36a87364 100644 --- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java +++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java @@ -24,6 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import jakarta.persistence.EntityExistsException; import jakarta.ws.rs.core.MediaType; import java.time.OffsetDateTime; import org.apache.syncope.core.persistence.api.dao.ImplementationDAO; @@ -32,7 +33,6 @@ import org.apache.syncope.core.persistence.api.entity.Report; import org.apache.syncope.core.persistence.api.entity.ReportExec; import org.apache.syncope.core.persistence.jpa.AbstractTest; -import org.hibernate.exception.ConstraintViolationException; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; @@ -60,7 +60,7 @@ public void find() { @Test public void saveWithExistingName() { - assertThrows(ConstraintViolationException.class, () -> { + assertThrows(EntityExistsException.class, () -> { Report report = reportDAO.findById("0062ea9c-924d-4ecf-9961-4492a8cc6d1b").orElseThrow(); String name = report.getName(); diff --git a/core/persistence-jpa/src/test/resources/simplelogger.properties b/core/persistence-jpa/src/test/resources/simplelogger.properties index e23452212c5..3b4bbf09680 100644 --- a/core/persistence-jpa/src/test/resources/simplelogger.properties +++ b/core/persistence-jpa/src/test/resources/simplelogger.properties @@ -20,11 +20,7 @@ org.slf4j.simpleLogger.showDateTime=true org.slf4j.simpleLogger.dateTimeFormat=YYYY-mm-dd HH:mm:ss.SSS org.slf4j.simpleLogger.defaultLogLevel=debug -org.slf4j.simpleLogger.log.org.apache.syncope.core.persistence.jpa.dao=debug org.slf4j.simpleLogger.log.org.springframework.jdbc.core.JdbcTemplate=error org.slf4j.simpleLogger.log.org.springframework.jdbc.datasource.DataSourceUtils=error org.slf4j.simpleLogger.log.com.github.dockerjava.zerodep.shaded=error org.slf4j.simpleLogger.log.org.testcontainers=error - -org.slf4j.simpleLogger.log.org.hibernate.SQL=debug -org.slf4j.simpleLogger.log.org.hibernate.orm.jdbc.bind=trace diff --git a/core/pom.xml b/core/pom.xml index 2c0560c2e87..523779c9521 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -85,7 +85,6 @@ under the License. persistence-jpa persistence-neo4j spring - cache provisioning-api provisioning-java workflow-api diff --git a/core/provisioning-java/src/test/resources/core-test.properties b/core/provisioning-java/src/test/resources/core-test.properties index f812d7427fa..c3e75041a93 100644 --- a/core/provisioning-java/src/test/resources/core-test.properties +++ b/core/provisioning-java/src/test/resources/core-test.properties @@ -26,7 +26,7 @@ persistence.domain[0].jdbcDriver=org.postgresql.Driver persistence.domain[0].jdbcURL=${DB_URL} persistence.domain[0].dbUsername=${DB_USER} persistence.domain[0].dbPassword=${DB_PASSWORD} -persistence.domain[0].databasePlatform=org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 diff --git a/core/self-keymaster-starter/pom.xml b/core/self-keymaster-starter/pom.xml index 4204e0ea638..f288ac26807 100644 --- a/core/self-keymaster-starter/pom.xml +++ b/core/self-keymaster-starter/pom.xml @@ -60,18 +60,17 @@ under the License. - org.hibernate.orm - hibernate-maven-plugin + org.apache.openjpa + openjpa-maven-plugin + true - - - ${project.build.outputDirectory}/org/apache/syncope/core/persistence/jpa/entity/ - - + ${rootpom.basedir}/core/persistence-jpa/src/main/resources/persistence-enhance.xml + org/apache/syncope/core/persistence/jpa/entity/**/*.class - enhance + enhancer + process-classes enhance diff --git a/core/self-keymaster-starter/src/test/resources/core-debug.properties b/core/self-keymaster-starter/src/test/resources/core-debug.properties index 9c9e087ecf5..8af477ddffb 100644 --- a/core/self-keymaster-starter/src/test/resources/core-debug.properties +++ b/core/self-keymaster-starter/src/test/resources/core-debug.properties @@ -36,6 +36,6 @@ persistence.domain[0].jdbcDriver=org.postgresql.Driver persistence.domain[0].jdbcURL=jdbc:postgresql://${DB_CONTAINER_IP}:5432/syncope?stringtype=unspecified persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 diff --git a/core/self-keymaster-starter/src/test/resources/log4j2.xml b/core/self-keymaster-starter/src/test/resources/log4j2.xml index 54793cc8f97..7bf54970d07 100644 --- a/core/self-keymaster-starter/src/test/resources/log4j2.xml +++ b/core/self-keymaster-starter/src/test/resources/log4j2.xml @@ -35,7 +35,7 @@ under the License. - + diff --git a/core/starter/pom.xml b/core/starter/pom.xml index 7103851c46b..fd696ffaa91 100644 --- a/core/starter/pom.xml +++ b/core/starter/pom.xml @@ -58,6 +58,10 @@ under the License. org.springframework.boot spring-boot-starter-cache + + com.github.ben-manes.caffeine + jcache + org.springframework.boot diff --git a/core/starter/src/main/resources/core.properties b/core/starter/src/main/resources/core.properties index 55b64fe55a6..b65b6eb6259 100644 --- a/core/starter/src/main/resources/core.properties +++ b/core/starter/src/main/resources/core.properties @@ -45,12 +45,14 @@ service.discovery.address=http://localhost:8080/syncope/rest/ # acceptable values: POSTGRESQL | MYSQL | MARIADB | ORACLE persistence.db-type=POSTGRESQL +persistence.remoteCommitProvider=sjvm + persistence.domain[0].key=Master persistence.domain[0].jdbcDriver=org.postgresql.Driver persistence.domain[0].jdbcURL=jdbc:postgresql://localhost:5432/syncope?stringtype=unspecified persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 @@ -104,6 +106,8 @@ security.authenticationThrottle.maxAttempts=5 security.authenticationThrottle.windowSeconds=60 security.authenticationThrottle.lockSeconds=60 +security.passwordResetHideDetails=true + security.passwordResetThrottle.enabled=true security.passwordResetThrottle.maxAttempts=5 security.passwordResetThrottle.windowSeconds=300 diff --git a/docker/core/LICENSE b/docker/core/LICENSE index 1606c34f3db..6592203e1d9 100644 --- a/docker/core/LICENSE +++ b/docker/core/LICENSE @@ -576,6 +576,11 @@ This is licensed under the AL 2.0, see above. == +For Jakarta Messaging (https://projects.eclipse.org/projects/ee4j.messaging): +This is licensed under the EPL 1.0, see above. + +== + For Jakarta Mail (https://projects.eclipse.org/projects/ee4j.mail): This is licensed under the EPL 1.0, see above. @@ -611,11 +616,6 @@ This is licensed under the AL 2.0, see above. == -For Byte Buddy (https://bytebuddy.net/): -This is licensed under the AL 2.0, see above. - -== - For json-smart-v2 (https://github.com/netplex/json-smart-v2): This is licensed under the AL 2.0, see above. @@ -1102,6 +1102,11 @@ This is licensed under the EDL 1.0, see above. == +For Eclipse Angus - Mail (https://eclipse-ee4j.github.io/angus-mail/): +This is licensed under the EDL 1.0, see above. + +== + For Flowable (http://www.flowable.org/): This is licensed under the AL 2.0, see above. @@ -1250,16 +1255,6 @@ Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. -== - -For Hibernate models (https://github.com/hibernate/hibernate-models): -This is licensed under the AL 2.0, see above. - -== - -For Hibernate ORM (https://hibernate.org/orm/): -This is licensed under the AL 2.0, see above. - == For Hibernate Validator (https://hibernate.org/validator/): diff --git a/docker/core/NOTICE b/docker/core/NOTICE index 93a91916f21..442198b521a 100644 --- a/docker/core/NOTICE +++ b/docker/core/NOTICE @@ -114,6 +114,12 @@ Copyright (c) 2018,2020 Eclipse Foundation == +This product includes software developed by the Eclipse Project for Jakarta Messaging. +Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. +Copyright 2021 Contributors to the Eclipse Foundation + +== + This product includes software developed by the Eclipse Project for Jakarta Mail. Copyright (c) 1997, 2024 Oracle and/or its affiliates. All rights reserved. @@ -150,11 +156,6 @@ Copyright (c) 2002-2016 Joda.org. All Rights Reserved. == -This product includes software developed by Byte Buddy -Copyright 2014 - Present Rafael Winterhalter - -== - This product includes software developed by the ConnId project. Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved. Copyright 2011-2016 Tirasa S.r.l. All rights reserved. @@ -221,22 +222,17 @@ Copyright (c) 1997, 2024 Oracle and/or its affiliates. All rights reserved. == -This product includes software developed by the Flowable project. - -== - -This product includes software produced and maintained by Jakarta JSON Processing -All content is the property of the respective authors or their employers. +This product includes software developed by the Eclipse Angus Project. +Copyright (c) 1997, 2024 Oracle and/or its affiliates. All rights reserved. == -This product includes software developed by Hibernate models -Copyright: Red Hat Inc. and Hibernate Authors +This product includes software developed by the Flowable project. == -This product includes software developed by Hibernate ORM -Copyright Red Hat Inc. and Hibernate Authors +This product includes software produced and maintained by Jakarta JSON Processing +All content is the property of the respective authors or their employers. == diff --git a/docker/core/pom.xml b/docker/core/pom.xml index 257d2875010..65942e98d01 100644 --- a/docker/core/pom.xml +++ b/docker/core/pom.xml @@ -111,40 +111,6 @@ under the License. ${project.version} - - - org.apache.syncope.core.cache - syncope-core-cache-caffeine - ${project.version} - wrap - zip - test - - - org.apache.syncope.core.cache - syncope-core-cache-hazelcast - ${project.version} - wrap - zip - test - - - org.apache.syncope.core.cache - syncope-core-cache-ehcache - ${project.version} - wrap - zip - test - - - org.apache.syncope.core.cache - syncope-core-cache-infinispan - ${project.version} - wrap - zip - test - - org.postgresql @@ -206,11 +172,6 @@ under the License. - - - - - diff --git a/docker/core/src/main/resources/Dockerfile b/docker/core/src/main/resources/Dockerfile index e99b9a6e461..62c065d62fe 100644 --- a/docker/core/src/main/resources/Dockerfile +++ b/docker/core/src/main/resources/Dockerfile @@ -20,14 +20,13 @@ LABEL org.opencontainers.image.authors="dev@syncope.apache.org" RUN apk update && apk add bash -RUN mkdir /opt/syncope /opt/syncope/bin /opt/syncope/bundles /opt/syncope/conf /opt/syncope/lib /opt/syncope/log /opt/syncope/cache +RUN mkdir /opt/syncope /opt/syncope/bin /opt/syncope/bundles /opt/syncope/conf /opt/syncope/lib /opt/syncope/log COPY *.properties *.xml saml.keystore.jks /opt/syncope/conf/ COPY bundles/*.jar /opt/syncope/bundles/ COPY lib/mariadb*.jar lib/mysql*jar lib/ojdbc*jar lib/postgresql*jar /opt/syncope/lib/ -COPY lib/syncope-core-cache-*zip /opt/syncope/cache COPY lib/syncope-docker-core-*jar /opt/syncope/lib/syncope.jar ENV SPRING_PROFILES_ACTIVE=docker diff --git a/docker/core/src/main/resources/core-docker.properties b/docker/core/src/main/resources/core-docker.properties index cbadd111aeb..6803132ad7c 100644 --- a/docker/core/src/main/resources/core-docker.properties +++ b/docker/core/src/main/resources/core-docker.properties @@ -24,6 +24,8 @@ security.productionMode=${PRODUCTION_MODE:true} security.anonymousUser=${ANONYMOUS_USER:anonymous} security.anonymousKey=${ANONYMOUS_KEY:anonymousKey} +persistence.remoteCommitProvider=${OPENJPA_REMOTE_COMMIT} + spring.lifecycle.timeout-per-shutdown-phase=30s spring.threads.virtual.enabled=true diff --git a/docker/core/src/main/resources/core-mariadb.properties b/docker/core/src/main/resources/core-mariadb.properties index 4733a2b34eb..928f6589db6 100644 --- a/docker/core/src/main/resources/core-mariadb.properties +++ b/docker/core/src/main/resources/core-mariadb.properties @@ -23,7 +23,7 @@ persistence.domain[0].jdbcDriver=org.mariadb.jdbc.Driver persistence.domain[0].jdbcURL=${DB_URL} persistence.domain[0].dbUsername=${DB_USER} persistence.domain[0].dbPassword=${DB_PASSWORD} -persistence.domain[0].databasePlatform=org.hibernate.dialect.MariaDBDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.MariaDBDictionary(blobTypeName=LONGBLOB,dateFractionDigits=3) persistence.domain[0].orm=META-INF/mariadb/spring-orm.xml persistence.domain[0].poolMaxActive=${DB_POOL_MAX} persistence.domain[0].poolMinIdle=${DB_POOL_MIN} diff --git a/docker/core/src/main/resources/core-mysql.properties b/docker/core/src/main/resources/core-mysql.properties index 84fb2bbcd96..d4b73b5db65 100644 --- a/docker/core/src/main/resources/core-mysql.properties +++ b/docker/core/src/main/resources/core-mysql.properties @@ -23,7 +23,7 @@ persistence.domain[0].jdbcDriver=com.mysql.cj.jdbc.Driver persistence.domain[0].jdbcURL=${DB_URL} persistence.domain[0].dbUsername=${DB_USER} persistence.domain[0].dbPassword=${DB_PASSWORD} -persistence.domain[0].databasePlatform=org.hibernate.dialect.MySQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.MySQLDictionary(blobTypeName=LONGBLOB,dateFractionDigits=3,useSetStringForClobs=true) persistence.domain[0].orm=META-INF/mysql/spring-orm.xml persistence.domain[0].poolMaxActive=${DB_POOL_MAX} persistence.domain[0].poolMinIdle=${DB_POOL_MIN} diff --git a/docker/core/src/main/resources/core-oracle.properties b/docker/core/src/main/resources/core-oracle.properties index 6635d154328..1df1c6e56ec 100644 --- a/docker/core/src/main/resources/core-oracle.properties +++ b/docker/core/src/main/resources/core-oracle.properties @@ -24,7 +24,7 @@ persistence.domain[0].jdbcURL=${DB_URL} persistence.domain[0].dbSchema=${DB_SCHEMA} persistence.domain[0].dbUsername=${DB_USER} persistence.domain[0].dbPassword=${DB_PASSWORD} -persistence.domain[0].databasePlatform=org.hibernate.dialect.OracleDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.OracleDictionary persistence.domain[0].orm=META-INF/oracle/spring-orm.xml persistence.domain[0].poolMaxActive=${DB_POOL_MAX} persistence.domain[0].poolMinIdle=${DB_POOL_MIN} diff --git a/docker/core/src/main/resources/core-postgresql.properties b/docker/core/src/main/resources/core-postgresql.properties index f512e75d865..82fb6ee0393 100644 --- a/docker/core/src/main/resources/core-postgresql.properties +++ b/docker/core/src/main/resources/core-postgresql.properties @@ -20,6 +20,6 @@ persistence.domain[0].jdbcDriver=org.postgresql.Driver persistence.domain[0].jdbcURL=${DB_URL} persistence.domain[0].dbUsername=${DB_USER} persistence.domain[0].dbPassword=${DB_PASSWORD} -persistence.domain[0].databasePlatform=org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary persistence.domain[0].poolMaxActive=${DB_POOL_MAX} persistence.domain[0].poolMinIdle=${DB_POOL_MIN} diff --git a/docker/core/src/main/resources/log4j2.xml b/docker/core/src/main/resources/log4j2.xml index afa800dcd76..b372ab83d24 100644 --- a/docker/core/src/main/resources/log4j2.xml +++ b/docker/core/src/main/resources/log4j2.xml @@ -38,27 +38,12 @@ under the License. - - - - - - - - + - diff --git a/docker/core/src/main/resources/startup.sh b/docker/core/src/main/resources/startup.sh index 09191582b60..3a552db7b06 100755 --- a/docker/core/src/main/resources/startup.sh +++ b/docker/core/src/main/resources/startup.sh @@ -17,26 +17,4 @@ # specific language governing permissions and limitations # under the License. -cd /opt/syncope/cache -if [ $JCACHE = "ehcache" ]; then - mkdir ehcache && cd ehcache && unzip ../syncope-core-cache-ehcache-wrap.zip - LOADER_PATH="$LOADER_PATH,/opt/syncope/cache/ehcache" -elif [[ $JCACHE == hazelcast* ]]; then - mkdir hazelcast && cd hazelcast && unzip ../syncope-core-cache-hazelcast-wrap.zip - LOADER_PATH="$LOADER_PATH,/opt/syncope/cache/hazelcast" - - PROVIDER_TYPE="member" - if [ $JCACHE = "hazelcast_client" ]; then - PROVIDER_TYPE="client" - fi - JAVA_OPTS="$JAVA_OPTS -Dhazelcast.jcache.provider.type=$PROVIDER_TYPE -Dhazelcast.logging.type=slf4j --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED" -elif [ $JCACHE = "infinispan" ]; then - mkdir infinispan && cd infinispan && unzip ../syncope-core-cache-infinispan-wrap.zip - LOADER_PATH="$LOADER_PATH,/opt/syncope/cache/infinispan" -else - mkdir caffeine && cd caffeine && unzip ../syncope-core-cache-caffeine-wrap.zip - LOADER_PATH="$LOADER_PATH,/opt/syncope/cache/caffeine" -fi -cd - - exec java $JAVA_OPTS -jar /opt/syncope/lib/syncope.jar diff --git a/ext/oidcc4ui/persistence-jpa/pom.xml b/ext/oidcc4ui/persistence-jpa/pom.xml index 1f2e48d546d..8307b6e9ce0 100644 --- a/ext/oidcc4ui/persistence-jpa/pom.xml +++ b/ext/oidcc4ui/persistence-jpa/pom.xml @@ -53,30 +53,17 @@ under the License. - org.hibernate.orm - hibernate-maven-plugin + org.apache.openjpa + openjpa-maven-plugin + true - - - ${project.build.outputDirectory}/org/apache/syncope/core/persistence/jpa/entity/ - - + ${rootpom.basedir}/core/persistence-jpa/src/main/resources/persistence-enhance.xml + org/apache/syncope/core/persistence/jpa/entity/**/*.class - - - org.apache.syncope.core - syncope-core-persistence-jpa - ${project.version} - - - org.apache.syncope.ext.oidcc4ui - syncope-ext-oidcc4ui-persistence-api - ${project.version} - - - enhance + enhancer + process-classes enhance diff --git a/ext/saml2sp4ui/persistence-jpa/pom.xml b/ext/saml2sp4ui/persistence-jpa/pom.xml index 3a4b06522e7..15df0c7477d 100644 --- a/ext/saml2sp4ui/persistence-jpa/pom.xml +++ b/ext/saml2sp4ui/persistence-jpa/pom.xml @@ -53,30 +53,17 @@ under the License. - org.hibernate.orm - hibernate-maven-plugin + org.apache.openjpa + openjpa-maven-plugin + true - - - ${project.build.outputDirectory}/org/apache/syncope/core/persistence/jpa/entity/ - - + ${rootpom.basedir}/core/persistence-jpa/src/main/resources/persistence-enhance.xml + org/apache/syncope/core/persistence/jpa/entity/**/*.class - - - org.apache.syncope.core - syncope-core-persistence-jpa - ${project.version} - - - org.apache.syncope.ext.saml2sp4ui - syncope-ext-saml2sp4ui-persistence-api - ${project.version} - - - enhance + enhancer + process-classes enhance diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml index 359a35e8254..c6360d47369 100644 --- a/fit/core-reference/pom.xml +++ b/fit/core-reference/pom.xml @@ -64,12 +64,6 @@ under the License. ${project.version} - - org.apache.syncope.core.cache - syncope-core-cache-caffeine - ${project.version} - - org.apache.syncope.core syncope-core-self-keymaster-starter diff --git a/fit/core-reference/src/main/resources/core-embedded.properties b/fit/core-reference/src/main/resources/core-embedded.properties index 0acb2824505..e030e8d2f06 100644 --- a/fit/core-reference/src/main/resources/core-embedded.properties +++ b/fit/core-reference/src/main/resources/core-embedded.properties @@ -38,7 +38,7 @@ persistence.domain[0].jdbcDriver=org.postgresql.Driver persistence.domain[0].jdbcURL=jdbc:postgresql://localhost:5432/syncope?stringtype=unspecified persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 @@ -47,7 +47,7 @@ persistence.domain[1].jdbcDriver=org.postgresql.Driver persistence.domain[1].jdbcURL=jdbc:postgresql://localhost:5432/syncopetwo?stringtype=unspecified persistence.domain[1].dbUsername=syncopetwo persistence.domain[1].dbPassword=syncopetwo -persistence.domain[1].databasePlatform=org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect +persistence.domain[1].databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary persistence.domain[1].poolMaxActive=20 persistence.domain[1].poolMinIdle=5 persistence.domain[1].adminPassword=2AA60A8FF7FCD473D321E0146AFD9E26DF395147 diff --git a/fit/core-reference/src/main/resources/core-mariadb.properties b/fit/core-reference/src/main/resources/core-mariadb.properties index 39b6ed23d1b..b435aca1042 100644 --- a/fit/core-reference/src/main/resources/core-mariadb.properties +++ b/fit/core-reference/src/main/resources/core-mariadb.properties @@ -25,7 +25,7 @@ persistence.domain[0].jdbcDriver=org.mariadb.jdbc.Driver persistence.domain[0].jdbcURL=jdbc:mariadb://${DB_CONTAINER_IP}:3306/syncope?characterEncoding=UTF-8 persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.hibernate.dialect.MariaDBDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.MariaDBDictionary(blobTypeName=LONGBLOB,dateFractionDigits=3) persistence.domain[0].orm=META-INF/mariadb/spring-orm.xml persistence.domain[0].poolMaxActive=10 persistence.domain[0].poolMinIdle=2 @@ -35,7 +35,7 @@ persistence.domain[1].jdbcDriver=org.mariadb.jdbc.Driver persistence.domain[1].jdbcURL=jdbc:mariadb://${DB_CONTAINER_IP}:3306/syncopetwo?characterEncoding=UTF-8 persistence.domain[1].dbUsername=syncopetwo persistence.domain[1].dbPassword=syncopetwo -persistence.domain[1].databasePlatform=org.hibernate.dialect.MariaDBDialect +persistence.domain[1].databasePlatform=org.apache.openjpa.jdbc.sql.MariaDBDictionary(blobTypeName=LONGBLOB,dateFractionDigits=3) persistence.domain[1].orm=META-INF/mariadb/spring-orm.xml persistence.domain[1].poolMaxActive=20 persistence.domain[1].poolMinIdle=5 diff --git a/fit/core-reference/src/main/resources/core-mysql.properties b/fit/core-reference/src/main/resources/core-mysql.properties index 6e1f2ca5a9f..42299ebddf1 100644 --- a/fit/core-reference/src/main/resources/core-mysql.properties +++ b/fit/core-reference/src/main/resources/core-mysql.properties @@ -25,7 +25,7 @@ persistence.domain[0].jdbcDriver=com.mysql.cj.jdbc.Driver persistence.domain[0].jdbcURL=jdbc:mysql://${DB_CONTAINER_IP}:3306/syncope?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8 persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.hibernate.dialect.MySQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.MySQLDictionary(blobTypeName=LONGBLOB,dateFractionDigits=3,useSetStringForClobs=true) persistence.domain[0].orm=META-INF/mysql/spring-orm.xml persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 @@ -35,7 +35,7 @@ persistence.domain[1].jdbcDriver=com.mysql.cj.jdbc.Driver persistence.domain[1].jdbcURL=jdbc:mysql://${DB_CONTAINER_IP}:3306/syncopetwo?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8 persistence.domain[1].dbUsername=syncopetwo persistence.domain[1].dbPassword=syncopetwo -persistence.domain[1].databasePlatform=org.hibernate.dialect.MySQLDialect +persistence.domain[1].databasePlatform=org.apache.openjpa.jdbc.sql.MySQLDictionary(blobTypeName=LONGBLOB,dateFractionDigits=3,useSetStringForClobs=true) persistence.domain[1].orm=META-INF/mysql/spring-orm.xml persistence.domain[1].poolMaxActive=20 persistence.domain[1].poolMinIdle=5 diff --git a/fit/core-reference/src/main/resources/core-oracle.properties b/fit/core-reference/src/main/resources/core-oracle.properties index 716d72fa33d..52aac1e27a4 100644 --- a/fit/core-reference/src/main/resources/core-oracle.properties +++ b/fit/core-reference/src/main/resources/core-oracle.properties @@ -26,7 +26,7 @@ persistence.domain[0].jdbcURL=jdbc:oracle:thin:@${DB_CONTAINER_IP}:1521/FREEPDB1 persistence.domain[0].dbSchema=SYNCOPE persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.hibernate.dialect.OracleDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.OracleDictionary persistence.domain[0].orm=META-INF/oracle/spring-orm.xml persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 @@ -37,7 +37,7 @@ persistence.domain[1].jdbcURL=jdbc:oracle:thin:@${DB_CONTAINER_IP}:1521/FREEPDB1 persistence.domain[1].dbSchema=SYNCOPETWO persistence.domain[1].dbUsername=syncopetwo persistence.domain[1].dbPassword=syncopetwo -persistence.domain[1].databasePlatform=org.hibernate.dialect.OracleDialect +persistence.domain[1].databasePlatform=org.apache.openjpa.jdbc.sql.OracleDictionary persistence.domain[1].orm=META-INF/oracle/spring-orm.xml persistence.domain[1].poolMaxActive=20 persistence.domain[1].poolMinIdle=5 diff --git a/fit/core-reference/src/main/resources/log4j2.xml b/fit/core-reference/src/main/resources/log4j2.xml index 5dc2e4fc08a..3694e4dddf1 100644 --- a/fit/core-reference/src/main/resources/log4j2.xml +++ b/fit/core-reference/src/main/resources/log4j2.xml @@ -81,28 +81,12 @@ under the License. - - - - - - - - + - - diff --git a/pom.xml b/pom.xml index 1119b2ecc91..3bf50caf050 100644 --- a/pom.xml +++ b/pom.xml @@ -437,7 +437,7 @@ under the License. 4.1.2 - 7.4.13.Final + 4.2.0-SNAPSHOT 1.9.3 @@ -659,14 +659,9 @@ under the License. - org.hibernate.orm - hibernate-core - ${hibernate.version} - - - org.hibernate.orm - hibernate-jcache - ${hibernate.version} + org.apache.openjpa + openjpa + ${openjpa.version} @@ -716,6 +711,10 @@ under the License. spring-boot-starter-data-jpa ${spring-boot.version} + + org.hibernate.orm + hibernate-core + org.springframework.boot spring-boot-starter-logging @@ -1589,16 +1588,9 @@ under the License. - org.hibernate.orm - hibernate-maven-plugin - ${hibernate.version} - - - org.codehaus.plexus - plexus-utils - 4.1.0 - - + org.apache.openjpa + openjpa-maven-plugin + ${openjpa.version} @@ -2158,7 +2150,7 @@ under the License. https://commons.apache.org/proper/commons-lang/javadocs/api-release/ https://commons.apache.org/proper/commons-jexl/apidocs/ https://tika.apache.org/4.1.0/api/ - https://docs.hibernate.org/orm/7.3/javadocs/ + https://openjpa.apache.org/builds/4.2.0/apidocs/index.html https://docs.spring.io/spring-boot/4.1/api/java/ https://docs.spring.io/spring-framework/docs/7.0.x/javadoc-api/ https://docs.spring.io/spring-security/site/docs/7.0.x/api/ diff --git a/src/main/asciidoc/getting-started/movingForward.adoc b/src/main/asciidoc/getting-started/movingForward.adoc index ac67242f857..88a8926bd25 100644 --- a/src/main/asciidoc/getting-started/movingForward.adoc +++ b/src/main/asciidoc/getting-started/movingForward.adoc @@ -22,10 +22,10 @@ Once you have obtained a working installation of Apache Syncope using one of the methods reported above, you should consider reading the ifeval::["{backend}" == "html5"] -https://syncope.apache.org/docs/4.1/reference-guide.html[Apache Syncope Reference Guide.] +https://syncope.apache.org/docs/4.2/reference-guide.html[Apache Syncope Reference Guide.] endif::[] ifeval::["{backend}" == "pdf"] -https://syncope.apache.org/docs/4.1/reference-guide.pdf[Apache Syncope Reference Guide.] +https://syncope.apache.org/docs/4.2/reference-guide.pdf[Apache Syncope Reference Guide.] endif::[] to understand how to configure, extend, customize and deploy your new Apache Syncope project. @@ -42,4 +42,4 @@ The following values **must be changed** from the defaults in the `core.properti Note that if you installed Syncope using the maven archetype method, then you will have already supplied custom values for `security.aesSecretKey`, `security.anonymousKey` and `security.jwsKey`. -See the https://syncope.apache.org/docs/4.1/reference-guide.html#security[security configuration section] for more details. +See the https://syncope.apache.org/docs/4.2/reference-guide.html#security[security configuration section] for more details. diff --git a/src/main/asciidoc/getting-started/obtain.adoc b/src/main/asciidoc/getting-started/obtain.adoc index b2f0d041c7d..046bd8ededf 100644 --- a/src/main/asciidoc/getting-started/obtain.adoc +++ b/src/main/asciidoc/getting-started/obtain.adoc @@ -102,9 +102,10 @@ Environment variables: * `DB_PASSWORD`: password for internal storage authentication * `DB_POOL_MAX`: internal storage connection pool: ceiling * `DB_POOL_MIN`: internal storage connection pool: floor -* `JCACHE`: configure https://docs.hibernate.org/orm/7.4/userguide/html_single/#caching-provider-jcache-cache-manager[JCache provider^] -for Hibernate, defaults to https://github.com/ben-manes/caffeine[Caffeine^] if no value is provided; allowed values: -`caffeine|ehcache|hazelcast_client|hazelcast_member|infinispan` +* `OPENJPA_REMOTE_COMMIT`: configure multiple instances, with high availability; valid values are the ones accepted by +OpenJPA for +https://openjpa.apache.org/builds/4.2.0/apache-openjpa/docs/ref_guide_event.html[remote event notification^] including +`sjvm` (single instance) ===== Console @@ -136,7 +137,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/tree/syncope-{docVersion}/docker/src/main/resources/docker-compose[available^]. endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/docker/src/main/resources/docker-compose[available^]. +https://github.com/apache/syncope/tree/4_2_X/docker/src/main/resources/docker-compose[available^]. endif::[] .Core, Admin UI and Enduser UI with PostgreSQL, with embedded Keymaster @@ -368,7 +369,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/tree/syncope-{docVersion}/docker/src/main/resources/kubernetes[available^], endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/docker/src/main/resources/kubernetes[available^], +https://github.com/apache/syncope/tree/4_2_X/docker/src/main/resources/kubernetes[available^], endif::[] that can be used to install Apache Syncope directly in Kubernetes. @@ -401,7 +402,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/tree/syncope-{docVersion}/docker/src/main/resources/kubernetes[folder^], endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/docker/src/main/resources/kubernetes[folder^], +https://github.com/apache/syncope/tree/4_2_X/docker/src/main/resources/kubernetes[folder^], endif::[] wherever you downloaded it @@ -535,10 +536,10 @@ If no failures are encountered, your basic Apache Syncope project is now ready t Before actual deployment as executable or onto a Jakarta EE container, you need to further check the **Customization** chapter of the ifeval::["{backend}" == "html5"] -https://syncope.apache.org/docs/5.0/reference-guide.html[Apache Syncope Reference Guide.] +https://syncope.apache.org/docs/4.2/reference-guide.html[Apache Syncope Reference Guide.] endif::[] ifeval::["{backend}" == "pdf"] -https://syncope.apache.org/docs/5.0/reference-guide.pdf[Apache Syncope Reference Guide.] +https://syncope.apache.org/docs/4.2/reference-guide.pdf[Apache Syncope Reference Guide.] endif::[] ==== @@ -566,10 +567,10 @@ configured for the embedded mode. When building for production, instead, it is recommended to check the **Customization** chapter of the ifeval::["{backend}" == "html5"] -https://syncope.apache.org/docs/5.0/reference-guide.html[Apache Syncope Reference Guide.] +https://syncope.apache.org/docs/4.2/reference-guide.html[Apache Syncope Reference Guide.] endif::[] ifeval::["{backend}" == "pdf"] -https://syncope.apache.org/docs/5.0/reference-guide.pdf[Apache Syncope Reference Guide.] +https://syncope.apache.org/docs/4.2/reference-guide.pdf[Apache Syncope Reference Guide.] endif::[] ==== diff --git a/src/main/asciidoc/reference-guide/architecture/core.adoc b/src/main/asciidoc/reference-guide/architecture/core.adoc index 4485826cda1..a40c61d1179 100644 --- a/src/main/asciidoc/reference-guide/architecture/core.adoc +++ b/src/main/asciidoc/reference-guide/architecture/core.adoc @@ -81,9 +81,9 @@ deployments. ==== Persistence All data (users, groups, attributes, resources, ...) is internally managed at a high level using a standard -using a standard https://jakarta.ee/specifications/persistence/3.2/[Jakarta Persistence 3.2] approach based on -https://hibernate.org/orm/[Hibernate ORM^]. -The data is persisted into an underlying database, referred to as *_Internal Storage_*. Consistency is ensured via the +https://jakarta.ee/specifications/persistence/3.2/[Jakarta Persistence 3.2] approach based on +https://openjpa.apache.org[Apache OpenJPA^]. +The data is persisted into an underlying database, referred to as *_Internal Storage_*. Consistency is ensured via the comprehensive https://docs.spring.io/spring-framework/reference/7.0/data-access/transaction.html[transaction management^] provided by the Spring Framework. diff --git a/src/main/asciidoc/reference-guide/concepts/attributerepositories.adoc b/src/main/asciidoc/reference-guide/concepts/attributerepositories.adoc index 65679d6c031..6044bec4432 100644 --- a/src/main/asciidoc/reference-guide/concepts/attributerepositories.adoc +++ b/src/main/asciidoc/reference-guide/concepts/attributerepositories.adoc @@ -37,14 +37,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/am/lib/src/main/java/org/apache/syncope/common/lib/attr/AttrRepoConf.java[AttrRepoConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/am/lib/src/main/java/org/apache/syncope/common/lib/attr/AttrRepoConf.java[AttrRepoConf^] +https://github.com/apache/syncope/blob/4_2_X/common/am/lib/src/main/java/org/apache/syncope/common/lib/attr/AttrRepoConf.java[AttrRepoConf^] endif::[] interface and extending appropriately the ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] +https://github.com/apache/syncope/blob/4_2_X/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] endif::[] class. ==== diff --git a/src/main/asciidoc/reference-guide/concepts/audit.adoc b/src/main/asciidoc/reference-guide/concepts/audit.adoc index 03cb3a61ec4..d37131dbf03 100644 --- a/src/main/asciidoc/reference-guide/concepts/audit.adoc +++ b/src/main/asciidoc/reference-guide/concepts/audit.adoc @@ -40,6 +40,6 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AuditEventProcessor.java[AuditEventProcessor^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AuditEventProcessor.java[AuditEventProcessor^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AuditEventProcessor.java[AuditEventProcessor^] endif::[] interface. diff --git a/src/main/asciidoc/reference-guide/concepts/authenticationmodules.adoc b/src/main/asciidoc/reference-guide/concepts/authenticationmodules.adoc index 880826b3a3f..a0526ef9107 100644 --- a/src/main/asciidoc/reference-guide/concepts/authenticationmodules.adoc +++ b/src/main/asciidoc/reference-guide/concepts/authenticationmodules.adoc @@ -50,14 +50,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java[AuthModuleConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java[AuthModuleConf^] +https://github.com/apache/syncope/blob/4_2_X/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java[AuthModuleConf^] endif::[] interface and extending appropriately the ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] +https://github.com/apache/syncope/blob/4_2_X/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] endif::[] class. ==== diff --git a/src/main/asciidoc/reference-guide/concepts/entitlements.adoc b/src/main/asciidoc/reference-guide/concepts/entitlements.adoc index d65caa78062..a2e0f2d1836 100644 --- a/src/main/asciidoc/reference-guide/concepts/entitlements.adoc +++ b/src/main/asciidoc/reference-guide/concepts/entitlements.adoc @@ -27,7 +27,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/RealmLogic.java[RealmLogic^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/RealmLogic.java[RealmLogic^] +https://github.com/apache/syncope/blob/4_2_X/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/RealmLogic.java[RealmLogic^] endif::[] , the https://docs.spring.io/spring-security/reference/7.0/servlet/authorization/method-security.html#authorization-expressions[`hasRole` expression^] @@ -50,14 +50,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/IdRepoEntitlement.java[statically defined^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/IdRepoEntitlement.java[statically defined^] +https://github.com/apache/syncope/blob/4_2_X/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/IdRepoEntitlement.java[statically defined^] endif::[] - even though <> have the ability to ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/types/FlowableEntitlement.java[enlarge the initial list^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/types/FlowableEntitlement.java[enlarge the initial list^] +https://github.com/apache/syncope/blob/4_2_X/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/types/FlowableEntitlement.java[enlarge the initial list^] endif::[] : this is because entitlements are the pillars of the internal security model and are not meant for external usage. ==== diff --git a/src/main/asciidoc/reference-guide/concepts/extensions.adoc b/src/main/asciidoc/reference-guide/concepts/extensions.adoc index ca001e61243..bd40775e254 100644 --- a/src/main/asciidoc/reference-guide/concepts/extensions.adoc +++ b/src/main/asciidoc/reference-guide/concepts/extensions.adoc @@ -54,7 +54,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/tree/syncope-{docVersion}/ext/saml2sp4ui[source tree^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/ext/saml2sp4ui[source tree^] +https://github.com/apache/syncope/tree/4_2_X/ext/saml2sp4ui[source tree^] endif::[] . ==== @@ -88,7 +88,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/tree/syncope-{docVersion}/ext/oidcc4ui[source tree^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/ext/oidcc4ui[source tree^] +https://github.com/apache/syncope/tree/4_2_X/ext/oidcc4ui[source tree^] endif::[] . ==== @@ -119,7 +119,7 @@ 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/master/ext/elasticsearch[source tree^] +https://github.com/apache/syncope/tree/4_2_X/ext/elasticsearch[source tree^] endif::[] . ==== @@ -141,7 +141,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/tree/syncope-{docVersion}/ext/opensearch[source tree^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/ext/opensearch[source tree^] +https://github.com/apache/syncope/tree/4_2_X/ext/opensearch[source tree^] endif::[] . ==== @@ -166,7 +166,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/tree/syncope-{docVersion}/ext/scimv2[source tree^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/ext/scimv2[source tree^] +https://github.com/apache/syncope/tree/4_2_X/ext/scimv2[source tree^] endif::[] . ==== @@ -190,7 +190,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/tree/syncope-{docVersion}/ext/openfga[source tree^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/ext/openfga[source tree^] +https://github.com/apache/syncope/tree/4_2_X/ext/openfga[source tree^] endif::[] . ==== diff --git a/src/main/asciidoc/reference-guide/concepts/externalresources.adoc b/src/main/asciidoc/reference-guide/concepts/externalresources.adoc index ee375963b80..91e4b0f7a89 100644 --- a/src/main/asciidoc/reference-guide/concepts/externalresources.adoc +++ b/src/main/asciidoc/reference-guide/concepts/externalresources.adoc @@ -56,7 +56,7 @@ When defining a connector instance, the following information must be provided: * administration realm - the <> under which administrators need to own <> in order to be allowed to manage this connector and all related external resources * connector bundle - one of the several -https://github.com/Tirasa/ConnId/blob/master/README.md#available-connectors[already available^], or some to be +https://github.com/Tirasa/ConnId/blob/4_2_X/README.md#available-connectors[already available^], or some to be https://connid.atlassian.net/wiki/display/BASE/Create+new+connector[made from scratch^], in order to fulfill specific requirements * pooling information @@ -142,7 +142,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ItemTransformer.java[ItemTransformer^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ItemTransformer.java[ItemTransformer^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ItemTransformer.java[ItemTransformer^] endif::[] ; the purpose is to transform values before they are sent to or received from the underlying connector * mandatory condition - <> expression indicating whether values for this mapping item must be necessarily diff --git a/src/main/asciidoc/reference-guide/concepts/implementations.adoc b/src/main/asciidoc/reference-guide/concepts/implementations.adoc index 99b9be35d33..37bfd9f8307 100644 --- a/src/main/asciidoc/reference-guide/concepts/implementations.adoc +++ b/src/main/asciidoc/reference-guide/concepts/implementations.adoc @@ -41,7 +41,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/ilgrosso/syncope/blob/syncope-{docVersion}/core/spring/src/main/resources/META-INF/groovy.blacklist[groovy.blacklist^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/ilgrosso/syncope/blob/master/core/spring/src/main/resources/META-INF/groovy.blacklist[groovy.blacklist^] +https://github.com/ilgrosso/syncope/blob/4_2_X/core/spring/src/main/resources/META-INF/groovy.blacklist[groovy.blacklist^] endif::[] . diff --git a/src/main/asciidoc/reference-guide/concepts/notifications.adoc b/src/main/asciidoc/reference-guide/concepts/notifications.adoc index 5d0ee5582c4..f620de97420 100644 --- a/src/main/asciidoc/reference-guide/concepts/notifications.adoc +++ b/src/main/asciidoc/reference-guide/concepts/notifications.adoc @@ -40,7 +40,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/notification/RecipientsProvider.java[RecipientsProvider^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/notification/RecipientsProvider.java[RecipientsProvider^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/notification/RecipientsProvider.java[RecipientsProvider^] endif::[] interface * <> - event(s) triggering the enclosing notification @@ -115,7 +115,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java[UserTO^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java[UserTO^] +https://github.com/apache/syncope/blob/4_2_X/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java[UserTO^] endif::[] with actual value matching the _about_ condition as introduced above, can be used. diff --git a/src/main/asciidoc/reference-guide/concepts/passwordmanagement.adoc b/src/main/asciidoc/reference-guide/concepts/passwordmanagement.adoc index e44ef78fc6d..3445ce39747 100644 --- a/src/main/asciidoc/reference-guide/concepts/passwordmanagement.adoc +++ b/src/main/asciidoc/reference-guide/concepts/passwordmanagement.adoc @@ -35,14 +35,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/am/lib/src/main/java/org/apache/syncope/common/lib/password/PasswordManagementConf.java[PasswordManagementConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/am/lib/src/main/java/org/apache/syncope/common/lib/password/PasswordManagementConf.java[PasswordManagementConf^] +https://github.com/apache/syncope/blob/4_2_X/common/am/lib/src/main/java/org/apache/syncope/common/lib/password/PasswordManagementConf.java[PasswordManagementConf^] endif::[] interface and extending appropriately the ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] +https://github.com/apache/syncope/blob/4_2_X/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/WAPropertySourceLocator.java[WAPropertySourceLocator^] endif::[] class. ==== diff --git a/src/main/asciidoc/reference-guide/concepts/policies.adoc b/src/main/asciidoc/reference-guide/concepts/policies.adoc index 2d3ae151b21..340fc25a5ed 100644 --- a/src/main/asciidoc/reference-guide/concepts/policies.adoc +++ b/src/main/asciidoc/reference-guide/concepts/policies.adoc @@ -69,21 +69,21 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/AccountRuleConf.java[AccountRuleConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/AccountRuleConf.java[AccountRuleConf^] +https://github.com/apache/syncope/blob/4_2_X/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/AccountRuleConf.java[AccountRuleConf^] endif::[] . enforcing in an implementation of ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/AccountRule.java[AccountRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/AccountRule.java[AccountRule^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/AccountRule.java[AccountRule^] endif::[] annotated via ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/AccountRuleConfClass.java[@AccountRuleConfClass^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/AccountRuleConfClass.java[@AccountRuleConfClass^] +https://github.com/apache/syncope/blob/4_2_X/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/AccountRuleConfClass.java[@AccountRuleConfClass^] endif::[] referring to the configuration class. @@ -92,7 +92,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/AccountRule.java[AccountRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/AccountRule.java[AccountRule^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/AccountRule.java[AccountRule^] endif::[] ==== @@ -103,14 +103,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/spring/src/main/java/org/apache/syncope/core/spring/policy/DefaultAccountRule.java[DefaultAccountRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/spring/src/main/java/org/apache/syncope/core/spring/policy/DefaultAccountRule.java[DefaultAccountRule^] +https://github.com/apache/syncope/blob/4_2_X/core/spring/src/main/java/org/apache/syncope/core/spring/policy/DefaultAccountRule.java[DefaultAccountRule^] endif::[] and configurable via ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAccountRuleConf.java[DefaultAccountRuleConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAccountRuleConf.java[DefaultAccountRuleConf^] +https://github.com/apache/syncope/blob/4_2_X/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAccountRuleConf.java[DefaultAccountRuleConf^] endif::[] ) contains the following controls: @@ -173,21 +173,21 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/PasswordRuleConf.java[PasswordRuleConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/PasswordRuleConf.java[PasswordRuleConf^] +https://github.com/apache/syncope/blob/4_2_X/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/PasswordRuleConf.java[PasswordRuleConf^] endif::[] . enforcing in an implementation of ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PasswordRule.java[PasswordRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PasswordRule.java[PasswordRule^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PasswordRule.java[PasswordRule^] endif::[] annotated via ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/PasswordRuleConfClass.java[@PasswordRuleConfClass^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/PasswordRuleConfClass.java[@PasswordRuleConfClass^] +https://github.com/apache/syncope/blob/4_2_X/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/PasswordRuleConfClass.java[@PasswordRuleConfClass^] endif::[] referring to the configuration class. @@ -196,7 +196,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PasswordRule.java[PasswordRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PasswordRule.java[PasswordRule^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PasswordRule.java[PasswordRule^] endif::[] ==== @@ -207,14 +207,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/spring/src/main/java/org/apache/syncope/core/spring/policy/DefaultPasswordRule.java[DefaultPasswordRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/spring/src/main/java/org/apache/syncope/core/spring/policy/DefaultPasswordRule.java[DefaultPasswordRule^] +https://github.com/apache/syncope/blob/4_2_X/core/spring/src/main/java/org/apache/syncope/core/spring/policy/DefaultPasswordRule.java[DefaultPasswordRule^] endif::[] and configurable via ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultPasswordRuleConf.java[DefaultPasswordRuleConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultPasswordRuleConf.java[DefaultPasswordRuleConf^] +https://github.com/apache/syncope/blob/4_2_X/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultPasswordRuleConf.java[DefaultPasswordRuleConf^] endif::[] ) is based on https://www.passay.org/[Passay^] and contains the following controls: @@ -248,14 +248,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/spring/src/main/java/org/apache/syncope/core/spring/policy/HaveIBeenPwnedPasswordRule.java[HaveIBeenPwnedPasswordRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/spring/src/main/java/org/apache/syncope/core/spring/policy/HaveIBeenPwnedPasswordRule.java[HaveIBeenPwnedPasswordRule^] +https://github.com/apache/syncope/blob/4_2_X/core/spring/src/main/java/org/apache/syncope/core/spring/policy/HaveIBeenPwnedPasswordRule.java[HaveIBeenPwnedPasswordRule^] endif::[] and configurable via ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/HaveIBeenPwnedPasswordRuleConf.java[HaveIBeenPwnedPasswordRuleConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/HaveIBeenPwnedPasswordRuleConf.java[HaveIBeenPwnedPasswordRuleConf^] +https://github.com/apache/syncope/blob/4_2_X/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/policy/HaveIBeenPwnedPasswordRuleConf.java[HaveIBeenPwnedPasswordRuleConf^] endif::[] ) checks the provided password values against the popular https://haveibeenpwned.com["Have I Been Pwned?"^] service. @@ -281,7 +281,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAccessPolicyConf.java[DefaultAccessPolicyConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAccessPolicyConf.java[DefaultAccessPolicyConf^] +https://github.com/apache/syncope/blob/4_2_X/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAccessPolicyConf.java[DefaultAccessPolicyConf^] endif::[] | It describes whether the client application is allowed to use WA, allowed to participate in single sign-on authentication, etc; additionally, it may be configured to require a certain set of principal attributes that must exist @@ -292,7 +292,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/HttpRequestAccessPolicyConf.java[HttpRequestAccessPolicyConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/HttpRequestAccessPolicyConf.java[HttpRequestAccessPolicyConf^] +https://github.com/apache/syncope/blob/4_2_X/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/HttpRequestAccessPolicyConf.java[HttpRequestAccessPolicyConf^] endif::[] | Make access decisions based on HTTP request properties as client IP address and user-agent. @@ -301,7 +301,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/OpenFGAAccessPolicyConf.java[OpenFGAAccessPolicyConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/OpenFGAAccessPolicyConf.java[OpenFGAAccessPolicyConf^] +https://github.com/apache/syncope/blob/4_2_X/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/OpenFGAAccessPolicyConf.java[OpenFGAAccessPolicyConf^] endif::[] | Builds an authorization request and submits it to https://openfga.dev/[OpenFGA^]'s `check` API endpoint. @@ -310,7 +310,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/RemoteEndpointAccessPolicyConf.java[RemoteEndpointAccessPolicyConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/RemoteEndpointAccessPolicyConf.java[RemoteEndpointAccessPolicyConf^] +https://github.com/apache/syncope/blob/4_2_X/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/RemoteEndpointAccessPolicyConf.java[RemoteEndpointAccessPolicyConf^] endif::[] | Delegate access decisions to a remote endpoint by receiving the authenticated principal as url parameter of a `GET` request; the response code that the endpoint returns is then compared against the policy setting and if a match is @@ -321,7 +321,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/TimeBasedAccessPolicyConf.java[TimeBasedAccessPolicyConf^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/TimeBasedAccessPolicyConf.java[TimeBasedAccessPolicyConf^] +https://github.com/apache/syncope/blob/4_2_X/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/TimeBasedAccessPolicyConf.java[TimeBasedAccessPolicyConf^] endif::[] | Access is only allowed within the configured timeframe. @@ -425,7 +425,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultInboundCorrelationRule.java[default^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultInboundCorrelationRule.java[default^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultInboundCorrelationRule.java[default^] endif::[] implementation attempts to match entities on the basis of the values of the provided plain attributes, according to the available <>. @@ -437,7 +437,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/InboundCorrelationRule.java[InboundCorrelationRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/InboundCorrelationRule.java[InboundCorrelationRule^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/InboundCorrelationRule.java[InboundCorrelationRule^] endif::[] interface. ==== @@ -463,7 +463,7 @@ https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-ja ] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultPushCorrelationRule.java[default^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultPushCorrelationRule.java[default^] endif::[] implementation attempts to match entities on the basis of the values of the provided plain attributes, according to the available <>. @@ -475,7 +475,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PushCorrelationRule.java[PushCorrelationRule^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PushCorrelationRule.java[PushCorrelationRule^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/PushCorrelationRule.java[PushCorrelationRule^] endif::[] interface. ==== diff --git a/src/main/asciidoc/reference-guide/concepts/provisioning/livesync.adoc b/src/main/asciidoc/reference-guide/concepts/provisioning/livesync.adoc index 67352700d8b..8f32d62a808 100644 --- a/src/main/asciidoc/reference-guide/concepts/provisioning/livesync.adoc +++ b/src/main/asciidoc/reference-guide/concepts/provisioning/livesync.adoc @@ -34,14 +34,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] endif::[] or its default implementation ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] endif::[] . @@ -50,7 +50,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/LiveSyncDeltaMapper.java[LiveSyncDeltaMapper^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/LiveSyncDeltaMapper.java[LiveSyncDeltaMapper^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/LiveSyncDeltaMapper.java[LiveSyncDeltaMapper^] endif::[] is invoked to transform the record into a format which is in turn provided to an internally created and processed <>. diff --git a/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc b/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc index 0a0edc296bf..5906f780b40 100644 --- a/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc +++ b/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc @@ -74,7 +74,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PriorityPropagationTaskExecutor.java[PriorityPropagationTaskExecutor^], endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PriorityPropagationTaskExecutor.java[PriorityPropagationTaskExecutor^], +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PriorityPropagationTaskExecutor.java[PriorityPropagationTaskExecutor^], endif::[] which implements the following logic: @@ -109,7 +109,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationTaskExecutor.java[PropagationTaskExecutor^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationTaskExecutor.java[PropagationTaskExecutor^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationTaskExecutor.java[PropagationTaskExecutor^] endif::[] interface can be provided, in case the required behavior does not fit into the provided implementation. @@ -121,7 +121,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java[PropagationActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java[PropagationActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java[PropagationActions^] endif::[] interface. @@ -135,7 +135,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/AzurePropagationActions.java[AzurePropagationActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/AzurePropagationActions.java[AzurePropagationActions^] +https://github.com/apache/syncope/tree/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/AzurePropagationActions.java[AzurePropagationActions^] endif::[] | Required for setup of an External Resource based on the https://connid.atlassian.net/wiki/display/BASE/Azure#Azure-Configuration[ConnId Azure connector bundle^]. @@ -144,7 +144,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/DBPasswordPropagationActions.java[DBPasswordPropagationActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/DBPasswordPropagationActions.java[DBPasswordPropagationActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/DBPasswordPropagationActions.java[DBPasswordPropagationActions^] endif::[] | If no password value was already provided in the propagation task, sends out the internal password hash value to DBMS; the cipher algorithm associated with the password must match the value of `Password cipher algorithm` for the @@ -155,7 +155,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/GenerateRandomPasswordPropagationActions.java[GenerateRandomPasswordPropagationActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/GenerateRandomPasswordPropagationActions.java[GenerateRandomPasswordPropagationActions^] +https://github.com/apache/syncope/tree/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/GenerateRandomPasswordPropagationActions.java[GenerateRandomPasswordPropagationActions^] endif::[] | If no password value was already provided in the propagation task, random password value is generated according to the defined <> and sent to the External Resource. @@ -164,7 +164,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/GoogleAppsPropagationActions.java[GoogleAppsPropagationActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/GoogleAppsPropagationActions.java[GoogleAppsPropagationActions^] +https://github.com/apache/syncope/tree/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/GoogleAppsPropagationActions.java[GoogleAppsPropagationActions^] endif::[] | Required for setup of an External Resource based on the https://connid.atlassian.net/wiki/display/BASE/Google+Apps#GoogleApps-Configuration[ConnId GoogleApps connector bundle^]. @@ -173,7 +173,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java[LDAPMembershipPropagationActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java[LDAPMembershipPropagationActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java[LDAPMembershipPropagationActions^] endif::[] | If a User is associated with a Group in Syncope, keep the corresponding User as a member of the corresponding Group in LDAP or AD. @@ -182,7 +182,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPPasswordPropagationActions.java[LDAPPasswordPropagationActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPPasswordPropagationActions.java[LDAPPasswordPropagationActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPPasswordPropagationActions.java[LDAPPasswordPropagationActions^] endif::[] | If no password value was already provided in the propagation task, sends out the internal password hash value to LDAP; the cipher algorithm associated with the password must match the value of `passwordHashAlgorithm` for the diff --git a/src/main/asciidoc/reference-guide/concepts/provisioning/provisioning.adoc b/src/main/asciidoc/reference-guide/concepts/provisioning/provisioning.adoc index a2ef2d643e7..d345d9abb7c 100644 --- a/src/main/asciidoc/reference-guide/concepts/provisioning/provisioning.adoc +++ b/src/main/asciidoc/reference-guide/concepts/provisioning/provisioning.adoc @@ -48,19 +48,19 @@ ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java[UserProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java[UserProvisioningManager^] +* https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java[UserProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/GroupProvisioningManager.java[GroupProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/GroupProvisioningManager.java[GroupProvisioningManager^] +* https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/GroupProvisioningManager.java[GroupProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AnyObjectProvisioningManager.java[AnyObjectProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AnyObjectProvisioningManager.java[AnyObjectProvisioningManager^] +* https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AnyObjectProvisioningManager.java[AnyObjectProvisioningManager^] endif::[] Default implementations are available: @@ -69,19 +69,19 @@ ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultUserProvisioningManager.java[DefaultUserProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultUserProvisioningManager.java[DefaultUserProvisioningManager^] +* https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultUserProvisioningManager.java[DefaultUserProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultGroupProvisioningManager.java[DefaultGroupProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultGroupProvisioningManager.java[DefaultGroupProvisioningManager^] +* https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultGroupProvisioningManager.java[DefaultGroupProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultAnyObjectProvisioningManager.java[DefaultAnyObjectProvisioningManager^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultAnyObjectProvisioningManager.java[DefaultAnyObjectProvisioningManager^] +* https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultAnyObjectProvisioningManager.java[DefaultAnyObjectProvisioningManager^] endif::[] ==== diff --git a/src/main/asciidoc/reference-guide/concepts/provisioning/pull.adoc b/src/main/asciidoc/reference-guide/concepts/provisioning/pull.adoc index 42468fd854e..56d0580ecc1 100644 --- a/src/main/asciidoc/reference-guide/concepts/provisioning/pull.adoc +++ b/src/main/asciidoc/reference-guide/concepts/provisioning/pull.adoc @@ -28,14 +28,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] endif::[] or its default implementation ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] endif::[] . @@ -79,7 +79,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ReconFilterBuilder.java[ReconFilterBuilder^]) endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ReconFilterBuilder.java[ReconFilterBuilder^]) +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ReconFilterBuilder.java[ReconFilterBuilder^]) endif::[] of all available entities is processed. INCREMENTAL:: Only the actual modifications performed since the last pull task execution are considered. This mode @@ -110,7 +110,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java[InboundActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java[InboundActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java[InboundActions^] endif::[] interface. @@ -124,7 +124,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/ADMembershipPullActions.java[ADMembershipPullActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/ADMembershipPullActions.java[ADMembershipPullActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/ADMembershipPullActions.java[ADMembershipPullActions^] endif::[] | If a User is associated with a Group in AD, keep the corresponding User as a member of the corresponding Group in Syncope. @@ -133,7 +133,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LDAPMembershipPullActions.java[LDAPMembershipPullActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LDAPMembershipPullActions.java[LDAPMembershipPullActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LDAPMembershipPullActions.java[LDAPMembershipPullActions^] endif::[] | If a User is associated with a Group in LDAP, keep the corresponding User as a member of the corresponding Group in Syncope. @@ -142,7 +142,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LDAPPasswordPullActions.java[LDAPPasswordPullActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LDAPPasswordPullActions.java[LDAPPasswordPullActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LDAPPasswordPullActions.java[LDAPPasswordPullActions^] endif::[] | Import hashed password values from LDAP; the cipher algorithm associated with the password must match the value of `passwordHashAlgorithm` for the @@ -153,7 +153,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DBPasswordPullActions.java[DBPasswordPullActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DBPasswordPullActions.java[DBPasswordPullActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DBPasswordPullActions.java[DBPasswordPullActions^] endif::[] | Import hashed password values from DBMS; the cipher algorithm associated with the password must match the value of `Password cipher algorithm` for the @@ -164,7 +164,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/KafkaInboundActions.java[KafkaInboundActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/KafkaInboundActions.java[KafkaInboundActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/KafkaInboundActions.java[KafkaInboundActions^] endif::[] | Instructs to fetch the attributes required during the <> process for the https://connid.atlassian.net/wiki/display/BASE/Kafka[Apache Kafka connector bundle^]. diff --git a/src/main/asciidoc/reference-guide/concepts/provisioning/push.adoc b/src/main/asciidoc/reference-guide/concepts/provisioning/push.adoc index 699b5661df1..f4d403250a4 100644 --- a/src/main/asciidoc/reference-guide/concepts/provisioning/push.adoc +++ b/src/main/asciidoc/reference-guide/concepts/provisioning/push.adoc @@ -29,14 +29,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisionSorter.java[ProvisionSorter^] endif::[] or its default implementation ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultProvisionSorter.java[DefaultProvisionSorter^] endif::[] . @@ -75,6 +75,6 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/PushActions.java[PushActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/PushActions.java[PushActions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/PushActions.java[PushActions^] endif::[] interface. diff --git a/src/main/asciidoc/reference-guide/concepts/realms.adoc b/src/main/asciidoc/reference-guide/concepts/realms.adoc index 5b5c33bd83b..bfd23ba8a93 100644 --- a/src/main/asciidoc/reference-guide/concepts/realms.adoc +++ b/src/main/asciidoc/reference-guide/concepts/realms.adoc @@ -68,7 +68,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/LogicActions.java[LogicActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/LogicActions.java[LogicActions^] +https://github.com/apache/syncope/blob/4_2_X/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/LogicActions.java[LogicActions^] endif::[] interface. diff --git a/src/main/asciidoc/reference-guide/concepts/reports.adoc b/src/main/asciidoc/reference-guide/concepts/reports.adoc index 7f8ca843598..e75d2bc9f4b 100644 --- a/src/main/asciidoc/reference-guide/concepts/reports.adoc +++ b/src/main/asciidoc/reference-guide/concepts/reports.adoc @@ -29,7 +29,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/AbstractReportJobDelegate.java[AbstractReportJobDelegate^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/AbstractReportJobDelegate.java[AbstractReportJobDelegate^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/AbstractReportJobDelegate.java[AbstractReportJobDelegate^] endif::[] providing the custom logic to extract information from Syncope and generate output according to the configured mime type * scheduling information: diff --git a/src/main/asciidoc/reference-guide/concepts/tasks.adoc b/src/main/asciidoc/reference-guide/concepts/tasks.adoc index 78b07d96a9b..6c04cd75c06 100644 --- a/src/main/asciidoc/reference-guide/concepts/tasks.adoc +++ b/src/main/asciidoc/reference-guide/concepts/tasks.adoc @@ -24,7 +24,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/Command.java[Command^], endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/Command.java[Command^], +https://github.com/apache/syncope/blob/4_2_X/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/Command.java[Command^], endif::[] interface, designed to optionally take parameters. @@ -66,14 +66,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/DefaultPropagationManager.java[PropagationManager^], endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/DefaultPropagationManager.java[PropagationManager^], +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/DefaultPropagationManager.java[PropagationManager^], endif::[] executed (by default) via the ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PriorityPropagationTaskExecutor.java[PriorityPropagationTaskExecutor^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PriorityPropagationTaskExecutor.java[PriorityPropagationTaskExecutor^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PriorityPropagationTaskExecutor.java[PriorityPropagationTaskExecutor^] endif::[] during the <> process, and are permanently saved - for later re-execution or for examining the execution details - depending on the trace levels set on the related @@ -110,7 +110,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java[PullJobDelegate^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java[PullJobDelegate^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java[PullJobDelegate^] endif::[] during the <> process, and are permanently saved - for later re-execution or for examining the execution details - depending on the trace level set on the related @@ -158,7 +158,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LiveSyncJobDelegate.java[LiveSyncJobDelegate^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LiveSyncJobDelegate.java[LiveSyncJobDelegate^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/LiveSyncJobDelegate.java[LiveSyncJobDelegate^] endif::[] during the <> process; the execution results are permanently saved - for examining the execution details - depending on the trace level set on the related <>. @@ -198,7 +198,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushJobDelegate.java[PushJobDelegate^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushJobDelegate.java[PushJobDelegate^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushJobDelegate.java[PushJobDelegate^] endif::[] during the <> process, and are permanently saved - for later re-execution or for examining the execution details - depending on the trace level set on the related @@ -232,14 +232,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/DefaultNotificationManager.java[NotificationManager^], endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/DefaultNotificationManager.java[NotificationManager^], +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/DefaultNotificationManager.java[NotificationManager^], endif::[] executed via the ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/notification/NotificationJob.java[NotificationJob^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/notification/NotificationJob.java[NotificationJob^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/notification/NotificationJob.java[NotificationJob^] endif::[] and are permanently saved - for later re-execution or for examining the execution details - depending on the trace level set on the related <>. @@ -268,7 +268,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/MacroActions.java[MacroActions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/MacroActions.java[MacroActions^] +https://github.com/apache/syncope/blob/4_2_X/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/api/MacroActions.java[MacroActions^] endif::[] interface. @@ -505,7 +505,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/AbstractSchedTaskJobDelegate.java[AbstractSchedTaskJobDelegate^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/AbstractSchedTaskJobDelegate.java[AbstractSchedTaskJobDelegate^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/AbstractSchedTaskJobDelegate.java[AbstractSchedTaskJobDelegate^] endif::[] providing the custom logic to execute * scheduling information: diff --git a/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc b/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc index 4b861309530..e578a4967fd 100644 --- a/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc +++ b/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc @@ -57,7 +57,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/persistence-common/src/main/java/org/apache/syncope/core/persistence/common/attrvalue/EmailAddressValidator.java[EmailAddressValidator^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/persistence-common/src/main/java/org/apache/syncope/core/persistence/common/attrvalue/EmailAddressValidator.java[EmailAddressValidator^] +https://github.com/apache/syncope/blob/4_2_X/core/persistence-common/src/main/java/org/apache/syncope/core/persistence/common/attrvalue/EmailAddressValidator.java[EmailAddressValidator^] endif::[] for reference * Mandatory condition - <> expression indicating whether values for this schema must be necessarily provided diff --git a/src/main/asciidoc/reference-guide/concepts/workflow.adoc b/src/main/asciidoc/reference-guide/concepts/workflow.adoc index 19a755877c1..eb6683636cc 100644 --- a/src/main/asciidoc/reference-guide/concepts/workflow.adoc +++ b/src/main/asciidoc/reference-guide/concepts/workflow.adoc @@ -35,19 +35,19 @@ ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java[UserWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java[UserWorkflowAdapter^] +* https://github.com/apache/syncope/blob/4_2_X/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java[UserWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowAdapter.java[GroupWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowAdapter.java[GroupWorkflowAdapter^] +* https://github.com/apache/syncope/blob/4_2_X/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowAdapter.java[GroupWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowAdapter.java[AnyObjectWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowAdapter.java[AnyObjectWorkflowAdapter^] +* https://github.com/apache/syncope/blob/4_2_X/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowAdapter.java[AnyObjectWorkflowAdapter^] endif::[] Default implementations are available: @@ -56,19 +56,19 @@ ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] +* https://github.com/apache/syncope/blob/4_2_X/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java[DefaultGroupWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java[DefaultGroupWorkflowAdapter^] +* https://github.com/apache/syncope/blob/4_2_X/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java[DefaultGroupWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultAnyObjectWorkflowAdapter.java[DefaultAnyObjectWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultAnyObjectWorkflowAdapter.java[DefaultAnyObjectWorkflowAdapter^] +* https://github.com/apache/syncope/blob/4_2_X/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultAnyObjectWorkflowAdapter.java[DefaultAnyObjectWorkflowAdapter^] endif::[] Custom adapters can be provided by implementing the related interfaces, also as bridges towards third-party tools as @@ -86,14 +86,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] +https://github.com/apache/syncope/tree/4_2_X/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] endif::[] . No approval nor customizations needed? Stick with ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] +https://github.com/apache/syncope/tree/4_2_X/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java[DefaultUserWorkflowAdapter^] endif::[] ==== @@ -107,14 +107,14 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserWorkflowAdapter.java[FlowableUserWorkflowAdapter^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserWorkflowAdapter.java[FlowableUserWorkflowAdapter^] +https://github.com/apache/syncope/blob/4_2_X/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserWorkflowAdapter.java[FlowableUserWorkflowAdapter^] endif::[] is bootstrapped from ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/flowable-bpmn/src/main/resources/userWorkflow.bpmn20.xml[userWorkflow.bpmn20.xml^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/flowable/flowable-bpmn/src/main/resources/userWorkflow.bpmn20.xml[userWorkflow.bpmn20.xml^] +https://github.com/apache/syncope/blob/4_2_X/ext/flowable/flowable-bpmn/src/main/resources/userWorkflow.bpmn20.xml[userWorkflow.bpmn20.xml^] endif::[] and presents several advantages and more features, if compared to the default user adapter: @@ -264,7 +264,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/api/DropdownValueProvider.java[DropdownValueProvider^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/api/DropdownValueProvider.java[DropdownValueProvider^] +https://github.com/apache/syncope/blob/4_2_X/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/api/DropdownValueProvider.java[DropdownValueProvider^] endif::[] interface <3> the second form is a traditional approval form, as seen <> @@ -273,7 +273,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/task/FlowableServiceTask.java[FlowableServiceTask^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/task/FlowableServiceTask.java[FlowableServiceTask^] +https://github.com/apache/syncope/blob/4_2_X/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/task/FlowableServiceTask.java[FlowableServiceTask^] endif::[] implementation which takes care of establishing the relationship ==== diff --git a/src/main/asciidoc/reference-guide/configuration/deployment.adoc b/src/main/asciidoc/reference-guide/configuration/deployment.adoc index 78f3b411dda..b617c97277f 100644 --- a/src/main/asciidoc/reference-guide/configuration/deployment.adoc +++ b/src/main/asciidoc/reference-guide/configuration/deployment.adoc @@ -51,10 +51,10 @@ applications as standalone fat JAR or WAR files. [TIP] Spring Boot applications can also be -https://docs.spring.io/spring-boot/4.0/how-to/deployment/installing.html[installed as system services^]. +https://docs.spring.io/spring-boot/4.1/how-to/deployment/installing.html[installed as system services^]. [TIP] -https://docs.spring.io/spring-boot/4.0/reference/features/spring-application.html#features.spring-application.virtual-threads[Virtual Threads^] can be enabled but JDK >= 24 is required in order to run properly. +https://docs.spring.io/spring-boot/4.1/reference/features/spring-application.html#features.spring-application.virtual-threads[Virtual Threads^] can be enabled but JDK >= 24 is required in order to run properly. .Run Core application as standalone under GNU / Linux ==== @@ -74,7 +74,7 @@ $ java -Dsyncope.conf.dir=/opt/syncope/conf \ -jar /opt/syncope/lib/syncope.war ---- Further options can be passed to last command, according to Spring Boot -https://docs.spring.io/spring-boot/4.0/appendix/application-properties/index.html[documentation^]; +https://docs.spring.io/spring-boot/4.1/appendix/application-properties/index.html[documentation^]; for example: * `--spring.config.additional-location=/path` + diff --git a/src/main/asciidoc/reference-guide/configuration/highavailability.adoc b/src/main/asciidoc/reference-guide/configuration/highavailability.adoc index 5000cfc488a..f9ba32b7ad3 100644 --- a/src/main/asciidoc/reference-guide/configuration/highavailability.adoc +++ b/src/main/asciidoc/reference-guide/configuration/highavailability.adoc @@ -21,81 +21,38 @@ ==== Core HA When deploying multiple Syncope <> instances with a single database or database cluster, it is of -fundamental importance that the https://docs.hibernate.org/orm/7.4/userguide/html_single/#caching[second-level cache^] -is correctly configured for Hibernate ORM. -Such configuration, in fact, allows the Hibernate ORM cache to remain synchronized across multiple JVMs, thus +fundamental importance that the contained OpenJPA instances are correctly configured for +https://openjpa.apache.org/builds/4.2.0/apache-openjpa/docs/ref_guide_event.html[remote event notification^]. + +Such configuration, in fact, allows the OpenJPA data cache to remain synchronized when deployed in multiple JVMs, thus enforcing data consistency across all Syncope Core instances. -The supported https://github.com/jsr107/jsr107spec[JCache^] provider is configured according to the implementation found -in the classpath. +The default configuration in `core.properties` is -[WARNING] -Ensure to define only one of the following providers to avoid conflicts. - -[core-ha-caffeine] -===== Caffeine +[source] +.... +persistence.remoteCommitProvider=sjvm +.... -By default, the following dependency is set in `core/pom.xml`. - -[source,xml,subs="verbatim,attributes"] ----- - - org.apache.syncope.core.cache - syncope-core-cache-caffeine - ${syncope.version} - ----- +which is suited for single JVM installations; with multiple instances, more options like as TCP, JMS or Kubernetes +are available; see the OpenJPA documentation for reference. [WARNING] -https://github.com/ben-manes/caffeine[Caffeine^] does support only single JVM installations. - -[core-ha-ehcache] -===== Ehcache - -Set the following dependency is in `core/pom.xml` to enable https://www.ehcache.org/documentation/3.11/107.html[Ehcache^]: - -[source,xml,subs="verbatim,attributes"] ----- - - org.apache.syncope.core.cache - syncope-core-cache-caffeine - ${syncope.version} - ----- - -[TIP] -Adding `ehcache.xml` in the classpath will allow to fine-tune Ehcache's https://www.ehcache.org/documentation/3.11/xml.html[configuration^]. - -[core-ha-hazelcast] -===== Hazelcast - -Set the following dependency is in `core/pom.xml` to enable https://docs.hazelcast.com/hazelcast/5.7/jcache/overview[Hazelcast^]: - -[source,xml,subs="verbatim,attributes"] ----- - - org.apache.syncope.core.cache - syncope-core-cache-hazelcast - ${syncope.version} - ----- - -[TIP] -Adding `hazelcast.xml` in the classpath will allow to fine-tune Hazelcast's https://docs.hazelcast.com/hazelcast/5.7/configuration/understanding-configuration[configuration^]. - -[core-ha-infinispan] -===== Infinispan - -Set the following dependency is in `core/pom.xml` to enable https://infinispan.org/docs/stable/titles/embedding/embedding.html[Infinispan^]: - -[source,xml,subs="verbatim,attributes"] ----- - - org.apache.syncope.core.cache - syncope-core-cache-infinispan - ${syncope.version} - ----- +==== +The https://openjpa.apache.org/builds/4.2.0/apache-openjpa/docs/ref_guide_event.html[OpenJPA documentation^]'s XML +snippets refer to a different configuration style; for example, when used in `core.properties`, this: + +[source,xml] +.... + +.... + +becomes: + +[source] +.... +persistence.remoteCommitProvider=tcp(Addresses=10.0.1.10;10.0.1.11,TransmitPersistedObjectIds=true) +.... +==== ==== WA HA diff --git a/src/main/asciidoc/reference-guide/configuration/storage.adoc b/src/main/asciidoc/reference-guide/configuration/storage.adoc index 67146c24ca3..2128d6e175e 100644 --- a/src/main/asciidoc/reference-guide/configuration/storage.adoc +++ b/src/main/asciidoc/reference-guide/configuration/storage.adoc @@ -32,7 +32,7 @@ persistence.domain[0].jdbcDriver=org.postgresql.Driver persistence.domain[0].jdbcURL=jdbc:postgresql://localhost:5432/syncope?stringtype=unspecified persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.apache.syncope.core.persistence.jpa.hibernate.SyncopePostgreSQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 .... @@ -40,7 +40,7 @@ persistence.domain[0].poolMinIdle=5 as `core/src/main/resources/core-postgresql.properties`. Do not forget to include `postgresql` as -https://docs.spring.io/spring-boot/4.0/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] +https://docs.spring.io/spring-boot/4.1/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] for the Core application. [WARNING] @@ -64,7 +64,7 @@ persistence.domain[0].jdbcDriver=com.mysql.cj.jdbc.Driver persistence.domain[0].jdbcURL=jdbc:mysql://localhost:3306/syncope?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8 persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.hibernate.dialect.MySQLDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.MySQLDictionary(blobTypeName=LONGBLOB,dateFractionDigits=3,useSetStringForClobs=true) persistence.domain[0].orm=META-INF/mysql/spring-orm.xml persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 @@ -73,7 +73,7 @@ persistence.domain[0].poolMinIdle=5 as `core/src/main/resources/core-mysql.properties`. Do not forget to include `mysql` as -https://docs.spring.io/spring-boot/4.0/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] +https://docs.spring.io/spring-boot/4.1/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] for the Core application. [CAUTION] @@ -100,7 +100,7 @@ persistence.domain[0].jdbcDriver=org.mariadb.jdbc.Driver persistence.domain[0].jdbcURL=jdbc:mariadb://localhost:3306/syncope?characterEncoding=UTF-8 persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.hibernate.dialect.MariaDBDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.MariaDBDictionary(blobTypeName=LONGBLOB,dateFractionDigits=3,useSetStringForClobs=true) persistence.domain[0].orm=META-INF/mariadb/spring-orm.xml persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 @@ -109,7 +109,7 @@ persistence.domain[0].poolMinIdle=5 as `core/src/main/resources/core-mariadb.properties`. Do not forget to include `mariadb` as -https://docs.spring.io/spring-boot/4.0/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] +https://docs.spring.io/spring-boot/4.1/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] for the Core application. [CAUTION] @@ -148,7 +148,7 @@ persistence.domain[0].jdbcURL=jdbc:oracle:thin:@localhost}:1521/FREEPDB1 persistence.domain[0].dbSchema=SYNCOPE persistence.domain[0].dbUsername=syncope persistence.domain[0].dbPassword=syncope -persistence.domain[0].databasePlatform=org.hibernate.dialect.OracleDialect +persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.OracleDictionary persistence.domain[0].orm=META-INF/oracle/spring-orm.xml persistence.domain[0].poolMaxActive=20 persistence.domain[0].poolMinIdle=5 @@ -157,7 +157,7 @@ persistence.domain[0].poolMinIdle=5 as `core/src/main/resources/core-oracle.properties`. Do not forget to include `oracle` as -https://docs.spring.io/spring-boot/4.0/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] +https://docs.spring.io/spring-boot/4.1/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] for the Core application. [WARNING] diff --git a/src/main/asciidoc/reference-guide/usage/actuator.adoc b/src/main/asciidoc/reference-guide/usage/actuator.adoc index 61c69964459..0e2a33d94ea 100644 --- a/src/main/asciidoc/reference-guide/usage/actuator.adoc +++ b/src/main/asciidoc/reference-guide/usage/actuator.adoc @@ -23,7 +23,7 @@ Spring Boot's actuator endpoints let you monitor and interact with Syncope compo Each individual endpoint can be enabled / disabled and exposed over HTTP (pre-defined, under the `/actuator` subcontext) or JMX. -Besides a number of https://docs.spring.io/spring-boot/4.0/reference/actuator/endpoints.html[built-in endpoints^], +Besides a number of https://docs.spring.io/spring-boot/4.1/reference/actuator/endpoints.html[built-in endpoints^], more are made available for each component, as reported below. [NOTE] @@ -40,7 +40,7 @@ The pre-defined `health` endpoint is typically used for liveness and readiness p |=== | `entityCache` -a| Allows to work with https://docs.hibernate.org/orm/7.4/userguide/html_single/#caching-statistics[JPA cache statistics^] +a| Allows to work with https://openjpa.apache.org/builds/4.2.0/apache-openjpa/docs/ref_guide_caching.html#ref_guide_cache_statistics[JPA cache statistics^] * `GET` - shows JPA cache statistics * `POST {ENABLE,DISABLE,RESET}` - performs the requested operation onto JPA cache diff --git a/src/main/asciidoc/reference-guide/usage/core.adoc b/src/main/asciidoc/reference-guide/usage/core.adoc index 1b192fabcb8..81dc2ecfb37 100644 --- a/src/main/asciidoc/reference-guide/usage/core.adoc +++ b/src/main/asciidoc/reference-guide/usage/core.adoc @@ -33,7 +33,7 @@ where `protocol`, `host` and `port` reflect your deployment. .REST Reference ==== A complete REST reference generated from https://swagger.io/specification/[OpenAPI specification 3.0^] is -https://syncope.apache.org/rest/5.0/openapi.json[published^] as well as made available with each deployment at +https://syncope.apache.org/rest/4.2/openapi.json[published^] as well as made available with each deployment at .... protocol://host:port/syncope/rest/openapi.json @@ -68,7 +68,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/spring/src/main/java/org/apache/syncope/core/spring/security/JWTSSOProvider.java[JWTSSOProvider^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/tree/master/core/spring/src/main/java/org/apache/syncope/core/spring/security/JWTSSOProvider.java[JWTSSOProvider^] +https://github.com/apache/syncope/tree/4_2_X/core/spring/src/main/java/org/apache/syncope/core/spring/security/JWTSSOProvider.java[JWTSSOProvider^] endif::[] interface. + An example implementation is provided by @@ -245,7 +245,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java[ClientExceptionType^]) endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java[ClientExceptionType^]) +https://github.com/apache/syncope/blob/4_2_X/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java[ClientExceptionType^]) endif::[] and `X-Application-Error-Info` might be optionally populated with more details, if available. @@ -720,7 +720,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/jexl/JexlFunctions.java[JexlFunctions^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/jexl/JexlFunctions.java[JexlFunctions^] +https://github.com/apache/syncope/blob/4_2_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/jexl/JexlFunctions.java[JexlFunctions^] endif::[] interface and registering them as beans, taking care of chosing unique namespace identifiers other than `syncope`. ==== diff --git a/src/main/asciidoc/reference-guide/usage/customization.adoc b/src/main/asciidoc/reference-guide/usage/customization.adoc index f5ebc9c9962..dbfc39e5166 100644 --- a/src/main/asciidoc/reference-guide/usage/customization.adoc +++ b/src/main/asciidoc/reference-guide/usage/customization.adoc @@ -30,10 +30,10 @@ adding new features or replacing existing components. In general, the Embedded Mode (see the ifeval::["{backend}" == "html5"] -https://syncope.apache.org/docs/5.0/getting-started.html[Apache Syncope Getting Started Guide] +https://syncope.apache.org/docs/4.2/getting-started.html[Apache Syncope Getting Started Guide] endif::[] ifeval::["{backend}" == "pdf"] -https://syncope.apache.org/docs/5.0/getting-started.pdf[Apache Syncope Getting Started Guide] +https://syncope.apache.org/docs/4.2/getting-started.pdf[Apache Syncope Getting Started Guide] endif::[] for details) allows developers to work comfortably from a single workstation, with no need of additional setup; it is effectively implemented as the `all` @@ -134,7 +134,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/core/spring/src/main/java/org/apache/syncope/core/spring/security/UsernamePasswordAuthenticationProvider.java[UsernamePasswordAuthenticationProvider^]. endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/core/spring/src/main/java/org/apache/syncope/core/spring/security/UsernamePasswordAuthenticationProvider.java[UsernamePasswordAuthenticationProvider^]. +https://github.com/apache/syncope/blob/4_2_X/core/spring/src/main/java/org/apache/syncope/core/spring/security/UsernamePasswordAuthenticationProvider.java[UsernamePasswordAuthenticationProvider^]. endif::[] The same happens with resources as images or HTML files; if you place @@ -146,13 +146,13 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html[BasePage.html^]. endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html[BasePage.html^]. +https://github.com/apache/syncope/blob/4_2_X/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html[BasePage.html^]. endif::[] ===== Extending configuration Apache Syncope <> are built on https://spring.io/projects/spring-boot[Spring Boot^], hence designing and extending Syncope configuration very much comes down to -https://docs.spring.io/spring-boot/4.0/index.html[their guide^], some aspects of which are briefly +https://docs.spring.io/spring-boot/4.1/index.html[their guide^], some aspects of which are briefly highlighted here. To design your own configuration class, take inspiration from the following sample: @@ -233,7 +233,7 @@ $ mkdir /opt/syncope/conf [TIP] ==== The `conf` directory must be configured for deployment, following Spring Boot's -https://docs.spring.io/spring-boot/4.0/reference/features/external-config.html[Externalized Configuration^] +https://docs.spring.io/spring-boot/4.1/reference/features/external-config.html[Externalized Configuration^] settings; with above reference: * <>: `--spring.config.additional-location=/opt/syncope/conf/` @@ -270,10 +270,10 @@ components: * <> [discrete] -===== Customize Hibernate ORM settings +===== Customize OpenJPA settings -Hibernate ORM is at the core of the <> layer; its configuration can be tweaked under several -aspects - including https://docs.hibernate.org/orm/7.4/userguide/html_single/#caching[caching^] for +Apache OpenJPA is at the core of the <> layer; its configuration can be tweaked under several +aspects - including https://openjpa.apache.org/builds/4.2.0/apache-openjpa/docs/ref_guide_caching.html[caching^] for example, to best suit the various environments. The main configuration classes are: @@ -282,13 +282,13 @@ ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceContext.java[PersistenceContext^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceContext.java[PersistenceContext^] +* https://github.com/apache/syncope/blob/4_2_X/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/PersistenceContext.java[PersistenceContext^] endif::[] ifeval::["{snapshotOrRelease}" == "release"] * https://github.com/apache/syncope/blob/syncope-{docVersion}/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/MasterDomain.java[MasterDomain^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -* https://github.com/apache/syncope/blob/master/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/MasterDomain.java[MasterDomain^] +* https://github.com/apache/syncope/blob/4_2_X/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/MasterDomain.java[MasterDomain^] endif::[] The `@Bean` declarations from these classes can be customized as explained <>. @@ -380,7 +380,7 @@ elasticsearch.numberOfReplicas=1 as `core/src/main/resources/core-elasticsearch.properties`. Do not forget to include `elasticsearch` as -https://docs.spring.io/spring-boot/4.0/reference/features/profiles.html[Spring Boot profile^] +https://docs.spring.io/spring-boot/4.1/reference/features/profiles.html[Spring Boot profile^] for the Core application. If needed, customize the `@Bean` declarations from @@ -388,7 +388,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/elasticsearch/client-elasticsearch/src/main/java/org/apache/syncope/ext/elasticsearch/client/ElasticsearchClientContext.java[ElasticsearchClientContext^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/elasticsearch/client-elasticsearch/src/main/java/org/apache/syncope/ext/elasticsearch/client/ElasticsearchClientContext.java[ElasticsearchClientContext^] +https://github.com/apache/syncope/blob/4_2_X/ext/elasticsearch/client-elasticsearch/src/main/java/org/apache/syncope/ext/elasticsearch/client/ElasticsearchClientContext.java[ElasticsearchClientContext^] endif::[] as explained <>. @@ -433,7 +433,7 @@ opensearch.numberOfReplicas=1 as `core/src/main/resources/core-opensearch.properties`. Do not forget to include `opensearch` as -https://docs.spring.io/spring-boot/4.0/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] +https://docs.spring.io/spring-boot/4.1/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] for the Core application. If needed, customize the `@Bean` declarations from @@ -441,7 +441,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/opensearch/client-opensearch/src/main/java/org/apache/syncope/ext/opensearch/client/OpenSearchClientContext.java[OpenSearchClientContext^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/opensearch/client-opensearch/src/main/java/org/apache/syncope/ext/opensearch/client/OpenSearchClientContext.java[OpenSearchClientContext^] +https://github.com/apache/syncope/blob/4_2_X/ext/opensearch/client-opensearch/src/main/java/org/apache/syncope/ext/opensearch/client/OpenSearchClientContext.java[OpenSearchClientContext^] endif::[] as explained <>. @@ -500,12 +500,12 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/openfga/client-openfga/src/main/java/org/apache/syncope/ext/openfga/client/OpenFGAProperties.java[OpenFGAProperties^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/openfga/client-openfga/src/main/java/org/apache/syncope/ext/openfga/client/OpenFGAProperties.java[OpenFGAProperties^] +https://github.com/apache/syncope/blob/4_2_X/ext/openfga/client-openfga/src/main/java/org/apache/syncope/ext/openfga/client/OpenFGAProperties.java[OpenFGAProperties^] endif::[] . Do not forget to include `openfga` as -https://docs.spring.io/spring-boot/4.0/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] +https://docs.spring.io/spring-boot/4.1/reference/features/profiles.html#features.profiles.adding-active-profiles[Spring Boot profile^] for the Core application. If needed, customize the `@Bean` declarations from @@ -513,7 +513,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/openfga/client-openfga/src/main/java/org/apache/syncope/ext/openfga/client/OpenFGAClientContext.java[OpenFGAClientContext^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/openfga/client-openfga/src/main/java/org/apache/syncope/ext/openfga/client/OpenFGAClientContext.java[OpenFGAClientContext^] +https://github.com/apache/syncope/blob/4_2_X/ext/openfga/client-openfga/src/main/java/org/apache/syncope/ext/openfga/client/OpenFGAClientContext.java[OpenFGAClientContext^] endif::[] as explained <>. @@ -537,7 +537,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/BpmnProcessService.java[BpmnProcessService^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/flowable/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/BpmnProcessService.java[BpmnProcessService^] +https://github.com/apache/syncope/blob/4_2_X/ext/flowable/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/BpmnProcessService.java[BpmnProcessService^] endif::[] for reference; . if needed, define supporting payload objects - in an extension's `common-lib` module or under `common` otherwise; @@ -546,7 +546,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/to/BpmnProcess.java[BpmnProcess^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/to/BpmnProcess.java[BpmnProcess^] +https://github.com/apache/syncope/blob/4_2_X/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/to/BpmnProcess.java[BpmnProcess^] endif::[] for reference; . implement - in an extension's `rest-cxf` module or under `core` otherwise - the interface defined above in a Java @@ -555,7 +555,7 @@ ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/BpmnProcessServiceImpl.java[BpmnProcessServiceImpl^] endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] -https://github.com/apache/syncope/blob/master/ext/flowable/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/BpmnProcessServiceImpl.java[BpmnProcessServiceImpl^] +https://github.com/apache/syncope/blob/4_2_X/ext/flowable/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/BpmnProcessServiceImpl.java[BpmnProcessServiceImpl^] endif::[] for reference. diff --git a/src/main/asciidoc/reference-guide/usage/loggers.adoc b/src/main/asciidoc/reference-guide/usage/loggers.adoc index 6ccbfe300ba..fd7f1276098 100644 --- a/src/main/asciidoc/reference-guide/usage/loggers.adoc +++ b/src/main/asciidoc/reference-guide/usage/loggers.adoc @@ -19,7 +19,7 @@ === Loggers Spring Boot actuator includes the ability to -https://docs.spring.io/spring-boot/4.0/reference/actuator/loggers.html[view and configure the log levels^] of all +https://docs.spring.io/spring-boot/4.1/reference/actuator/loggers.html[view and configure the log levels^] of all Syncope modules at runtime. In addition, Console provides a UI to view the list of logger’s configuration and set their level, for all diff --git a/src/main/asciidoc/reference-guide/usage/metrics.adoc b/src/main/asciidoc/reference-guide/usage/metrics.adoc index c3137f69456..f8f0457001f 100644 --- a/src/main/asciidoc/reference-guide/usage/metrics.adoc +++ b/src/main/asciidoc/reference-guide/usage/metrics.adoc @@ -19,7 +19,7 @@ === Metrics Monitoring performance to ensure reliability and efficiency can be achieved by leveraging -https://docs.spring.io/spring-boot/4.0/reference/actuator/metrics.html[Spring Boot's metrics^]. +https://docs.spring.io/spring-boot/4.1/reference/actuator/metrics.html[Spring Boot's metrics^]. [[metrics-core]] ==== Core @@ -36,7 +36,7 @@ This can be enabled by adding the following dependency to `core/pom.xml`: ---- Additional dependencies might be required, depending on the -https://docs.spring.io/spring-boot/4.0/reference/actuator/metrics.html#actuator.metrics.export[actual monitoring system in use^]. +https://docs.spring.io/spring-boot/4.1/reference/actuator/metrics.html#actuator.metrics.export[actual monitoring system in use^]. [[metrics-wa]] ==== WA diff --git a/standalone/LICENSE b/standalone/LICENSE index 218256ac0ec..32c6fe65f9b 100644 --- a/standalone/LICENSE +++ b/standalone/LICENSE @@ -252,216 +252,12 @@ This is licensed under the MIT license, see above. == -For Logback (https://logback.qos.ch/): -This is licensed under the EPL 1.0: - -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation - distributed under this Agreement, and -b) in the case of each subsequent Contributor: - i) changes to the Program, and - ii) additions to the Program; - - where such changes and/or additions to the Program originate from and are - distributed by that particular Contributor. A Contribution 'originates' - from a Contributor if it was added to the Program by such Contributor - itself or anyone acting on such Contributor's behalf. Contributions do not - include additions to the Program which: (i) are separate modules of - software distributed in conjunction with the Program under their own - license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this -Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - a) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free copyright license to - reproduce, prepare derivative works of, publicly display, publicly - perform, distribute and sublicense the Contribution of such Contributor, - if any, and such derivative works, in source code and object code form. - b) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free patent license under - Licensed Patents to make, use, sell, offer to sell, import and otherwise - transfer the Contribution of such Contributor, if any, in source code and - object code form. This patent license shall apply to the combination of - the Contribution and the Program if, at the time the Contribution is - added by the Contributor, such addition of the Contribution causes such - combination to be covered by the Licensed Patents. The patent license - shall not apply to any other combinations which include the Contribution. - No hardware per se is licensed hereunder. - c) Recipient understands that although each Contributor grants the licenses - to its Contributions set forth herein, no assurances are provided by any - Contributor that the Program does not infringe the patent or other - intellectual property rights of any other entity. Each Contributor - disclaims any liability to Recipient for claims brought by any other - entity based on infringement of intellectual property rights or - otherwise. As a condition to exercising the rights and licenses granted - hereunder, each Recipient hereby assumes sole responsibility to secure - any other intellectual property rights needed, if any. For example, if a - third party patent license is required to allow Recipient to distribute - the Program, it is Recipient's responsibility to acquire that license - before distributing the Program. - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under -its own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - b) its license agreement: - i) effectively disclaims on behalf of all Contributors all warranties - and conditions, express and implied, including warranties or - conditions of title and non-infringement, and implied warranties or - conditions of merchantability and fitness for a particular purpose; - ii) effectively excludes on behalf of all Contributors all liability for - damages, including direct, indirect, special, incidental and - consequential damages, such as lost profits; - iii) states that any provisions which differ from this Agreement are - offered by that Contributor alone and not by any other party; and - iv) states that source code for the Program is available from such - Contributor, and informs licensees how to obtain it in a reasonable - manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - b) a copy of this Agreement must be included with each copy of the Program. - Contributors may not remove or alter any copyright notices contained - within the Program. - -Each Contributor must identify itself as the originator of its Contribution, -if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, -if a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, -damages and costs (collectively "Losses") arising from claims, lawsuits and -other legal actions brought by a third party against the Indemnified -Contributor to the extent caused by the acts or omissions of such Commercial -Contributor in connection with its distribution of the Program in a commercial -product offering. The obligations in this section do not apply to any claims -or Losses relating to any actual or alleged intellectual property -infringement. In order to qualify, an Indemnified Contributor must: -a) promptly notify the Commercial Contributor in writing of such claim, and -b) allow the Commercial Contributor to control, and cooperate with the -Commercial Contributor in, the defense and any related settlement -negotiations. The Indemnified Contributor may participate in any such claim at -its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If -that Commercial Contributor then makes performance claims, or offers -warranties related to Product X, those performance claims and warranties are -such Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a -court requires any other Contributor to pay any damages as a result, the -Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using -and distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement , including but not limited to the -risks and costs of program errors, compliance with applicable laws, damage to -or loss of data, programs or equipment, and unavailability or interruption of -operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE -EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of the -remainder of the terms of this Agreement, and without further action by the -parties hereto, such provision shall be reformed to the minimum extent -necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted -under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue -and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to -time. No one other than the Agreement Steward has the right to modify this -Agreement. The Eclipse Foundation is the initial Agreement Steward. The -Eclipse Foundation may assign the responsibility to serve as the Agreement -Steward to a suitable separate entity. Each new version of the Agreement will -be given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the -Agreement under which it was received. In addition, after a new version of the -Agreement is published, Contributor may elect to distribute the Program -(including its Contributions) under the new version. Except as expressly -stated in Sections 2(a) and 2(b) above, Recipient receives no rights or -licenses to the intellectual property of any Contributor under this Agreement, -whether expressly, by implication, estoppel or otherwise. All rights in the -Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. +For Chart.js (http://www.chartjs.org/): +This is licensed under the AL 2.0, see above. == -For Chart.js (http://www.chartjs.org/): +For ClientJS (https://github.com/jackspirou/clientjs): This is licensed under the AL 2.0, see above. == @@ -516,11 +312,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. == -For hash4j (https://github.com/dynatrace-oss/hash4j): -This is licensed under the AL 2.0, see above. - -== - For Kryo (https://github.com/EsotericSoftware/kryo): This is licensed under the BSD license, see above. @@ -766,11 +557,6 @@ This is licensed under the BSD license, see above. == -For RE2/J (https://github.com/google/re2j): -This is licensed under the BSD license, see above. - -== - For ZXing (https://github.com/zxing/zxing): This is licensed under the AL 2.0, see above. @@ -792,7 +578,211 @@ This is licensed under the AL 2.0, see above. == For H2 (http://www.h2database.com/): -This is licensed under the EPL 1.0, see above. +This is licensed under the EPL 1.0: + +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation + distributed under this Agreement, and +b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are + distributed by that particular Contributor. A Contribution 'originates' + from a Contributor if it was added to the Program by such Contributor + itself or anyone acting on such Contributor's behalf. Contributions do not + include additions to the Program which: (i) are separate modules of + software distributed in conjunction with the Program under their own + license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + a) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free copyright license to + reproduce, prepare derivative works of, publicly display, publicly + perform, distribute and sublicense the Contribution of such Contributor, + if any, and such derivative works, in source code and object code form. + b) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free patent license under + Licensed Patents to make, use, sell, offer to sell, import and otherwise + transfer the Contribution of such Contributor, if any, in source code and + object code form. This patent license shall apply to the combination of + the Contribution and the Program if, at the time the Contribution is + added by the Contributor, such addition of the Contribution causes such + combination to be covered by the Licensed Patents. The patent license + shall not apply to any other combinations which include the Contribution. + No hardware per se is licensed hereunder. + c) Recipient understands that although each Contributor grants the licenses + to its Contributions set forth herein, no assurances are provided by any + Contributor that the Program does not infringe the patent or other + intellectual property rights of any other entity. Each Contributor + disclaims any liability to Recipient for claims brought by any other + entity based on infringement of intellectual property rights or + otherwise. As a condition to exercising the rights and licenses granted + hereunder, each Recipient hereby assumes sole responsibility to secure + any other intellectual property rights needed, if any. For example, if a + third party patent license is required to allow Recipient to distribute + the Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + d) Each Contributor represents that to its knowledge it has sufficient + copyright rights in its Contribution, if any, to grant the copyright + license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under +its own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + b) its license agreement: + i) effectively disclaims on behalf of all Contributors all warranties + and conditions, express and implied, including warranties or + conditions of title and non-infringement, and implied warranties or + conditions of merchantability and fitness for a particular purpose; + ii) effectively excludes on behalf of all Contributors all liability for + damages, including direct, indirect, special, incidental and + consequential damages, such as lost profits; + iii) states that any provisions which differ from this Agreement are + offered by that Contributor alone and not by any other party; and + iv) states that source code for the Program is available from such + Contributor, and informs licensees how to obtain it in a reasonable + manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + b) a copy of this Agreement must be included with each copy of the Program. + Contributors may not remove or alter any copyright notices contained + within the Program. + +Each Contributor must identify itself as the originator of its Contribution, +if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, +if a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits and +other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such Commercial +Contributor in connection with its distribution of the Program in a commercial +product offering. The obligations in this section do not apply to any claims +or Losses relating to any actual or alleged intellectual property +infringement. In order to qualify, an Indemnified Contributor must: +a) promptly notify the Commercial Contributor in writing of such claim, and +b) allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any such claim at +its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If +that Commercial Contributor then makes performance claims, or offers +warranties related to Product X, those performance claims and warranties are +such Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using +and distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to the +risks and costs of program errors, compliance with applicable laws, damage to +or loss of data, programs or equipment, and unavailability or interruption of +operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION +LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of the +remainder of the terms of this Agreement, and without further action by the +parties hereto, such provision shall be reformed to the minimum extent +necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Program itself +(excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted +under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue +and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to +time. No one other than the Agreement Steward has the right to modify this +Agreement. The Eclipse Foundation is the initial Agreement Steward. The +Eclipse Foundation may assign the responsibility to serve as the Agreement +Steward to a suitable separate entity. Each new version of the Agreement will +be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version of the +Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly +stated in Sections 2(a) and 2(b) above, Recipient receives no rights or +licenses to the intellectual property of any Contributor under this Agreement, +whether expressly, by implication, estoppel or otherwise. All rights in the +Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. == @@ -1292,6 +1282,16 @@ This is licensed under the BSD license, see above. == +For t-digest (https://github.com/tdunning/t-digest): +This is licensed under the AL 2.0, see above. + +== + +For Method Parameter Name Access for Java (https://github.com/paul-hammant/paranamer): +This is licensed under the BSD license, see above. + +== + For Scala Logging (https://github.com/lightbend-labs/scala-logging): This is licensed under the AL 2.0, see above. @@ -1322,6 +1322,11 @@ This is licensed under the BSD license, see above. == +For Wavefront's Java SDK (https://github.com/wavefrontHQ/wavefront-sdk-java): +This is licensed under the AL 2.0, see above. + +== + For Yammer Metrics (https://github.com/StoyanTc/yammer-metrics): This is licensed under the AL 2.0, see above. @@ -1347,6 +1352,16 @@ This is licensed under the AL 2.0, see above. == +For define-data-property (https://github.com/ljharb/define-data-property): +This is licensed under the MIT license, see above. + +== + +For define-properties (https://github.com/ljharb/define-properties): +This is licensed under the MIT license, see above. + +== + For Jakarta Activation (https://eclipse-ee4j.github.io/jaf/): This is licensed under the EDL 1.0, see above. @@ -1367,31 +1382,61 @@ This is licensed under the MIT license, see above. == -For FingerprintJS (https://github.com/fingerprintjs/fingerprintjs): +For es-define-property (https://github.com/ljharb/es-define-property/): This is licensed under the MIT license, see above. == +For MIT: +This is licensed under the AL 2.0, see above. + +== + For Font Awesome (http://fontawesome.io/): This is licensed under the MIT license, see above. == +For globalThis (https://github.com/es-shims/globalThis): +This is licensed under the MIT license, see above. + +== + For google-diff-match-patch (https://code.google.com/archive/p/google-diff-match-patch/): This is licensed under the AL 2.0, see above. == +For gopd (https://github.com/ljharb/gopd): +This is licensed under the AL 2.0, see above. + +== + +For has-property-descriptors (https://github.com/inspect-js/has-property-descriptors): +This is licensed under the MIT license, see above. + +== + For highlight.js (http://highlightjs.org/): This is licensed under the BSD license, see above. == +For Hypersistence Utils (https://github.com/vladmihalcea/hypersistence-utils): +This is licensed under the AL 2.0, see above. + +== + For gmetric4j (https://github.com/ganglia/gmetric4j): This is licensed under the BSD license, see above. == +For inherits (https://github.com/isaacs/inherits): +This is licensed under the MIT license, see above. + +== + For Inputmask (https://github.com/RobinHerbots/Inputmask): This is licensed under the MIT license, see above. @@ -1412,11 +1457,6 @@ This is licensed under the MIT license, see above. == -For Hypersistence Utils (https://github.com/vladmihalcea/hypersistence-utils): -This is licensed under the AL 2.0, see above. - -== - For jsonwebtoken.io (https://jsonwebtoken.io): This is licensed under the AL 2.0, see above. @@ -1447,6 +1487,11 @@ This is licensed under the AL 2.0, see above. == +For Jandex (https://github.com/smallrye/jandex/): +This is licensed under the AL 2.0, see above. + +== + For Swagger (http://swagger.io/): This is licensed under the AL 2.0, see above. @@ -1577,6 +1622,11 @@ This is licensed under the MIT license, see above. == +For murmurhash-js (https://github.com/mikolalysenko/murmurhash-js): +This is licensed under the MIT license, see above. + +== + For Byte Buddy (https://bytebuddy.net/): This is licensed under the AL 2.0, see above. @@ -1632,6 +1682,11 @@ This is licensed under the MIT license, see above. == +For object-keys (https://github.com/ljharb/object-keys): +This is licensed under the MIT license, see above. + +== + For OGNL (https://github.com/jkuhnert/ognl/): This is licensed under the AL 2.0, see above. @@ -1742,7 +1797,7 @@ This is licensed under the CC0 1.0, see above. == -For Hibernate models (https://github.com/hibernate/hibernate-models): +For Hibernate Commons Annotations (https://github.com/hibernate/hibernate-commons-annotations): This is licensed under the AL 2.0, see above. == @@ -1897,11 +1952,6 @@ This is licensed under the MIT license, see above. == -For snakeyaml-engine (https://bitbucket.org/snakeyaml/snakeyaml-engine/): -This is licensed under the AL 2.0, see above. - -== - For Spring openapi documentation (https://springdoc.org/): This is licensed under the AL 2.0, see above. @@ -1997,6 +2047,11 @@ This is licensed under the MIT license, see above. == +For UAParser.js (https://github.com/faisalman/ua-parser-js): +This is licensed under the MIT license, see above. + +== + For webjars-locator-lite (https://github.com/webjars/webjars-locator-lite/): This is licensed under the MIT license, see above.