svn commit: r1439825 - /syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
Author: coheigea Date: Tue Jan 29 10:50:05 2013 New Revision: 1439825 URL: http://svn.apache.org/viewvc?rev=1439825view=rev Log: Log Resource management exception properly Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1439825r1=1439824r2=1439825view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Tue Jan 29 10:50:05 2013 @@ -130,6 +130,7 @@ public class ResourceModalPage extends B window.close(target); } catch (Exception e) { LOG.error(Failure managing resource {}, resourceTO); +LOG.error(Resource Management Exception:, e); error(new ResourceModel(error, error).getObject() + : + e.getMessage()); target.add(feedbackPanel); }
svn commit: r1439829 - in /syncope/branches/1_0_X: ./ console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
Author: coheigea Date: Tue Jan 29 10:55:14 2013 New Revision: 1439829 URL: http://svn.apache.org/viewvc?rev=1439829view=rev Log: Log Resource management exception properly Modified: syncope/branches/1_0_X/ (props changed) syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Propchange: syncope/branches/1_0_X/ -- Merged /syncope/trunk:r1439825 Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1439829r1=1439828r2=1439829view=diff == --- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java (original) +++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Tue Jan 29 10:55:14 2013 @@ -111,7 +111,8 @@ public class ResourceModalPage extends B window.close(target); } catch (Exception e) { -LOG.error(Failuer managing resource {}, resourceTO); +LOG.error(Failure managing resource {}, resourceTO); +LOG.error(Resource Management Exception:, e); error(new ResourceModel(error, error).getObject() + : + e.getMessage()); target.add(feedbackPanel); } @@ -162,4 +163,4 @@ public class ResourceModalPage extends B return target; } } -} \ No newline at end of file +}
svn commit: r1439832 - /syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
Author: coheigea Date: Tue Jan 29 11:06:26 2013 New Revision: 1439832 URL: http://svn.apache.org/viewvc?rev=1439832view=rev Log: Minor tweak to last commit Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1439832r1=1439831r2=1439832view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Tue Jan 29 11:06:26 2013 @@ -129,8 +129,7 @@ public class ResourceModalPage extends B ((Resources) pageref.getPage()).setModalResult(true); window.close(target); } catch (Exception e) { -LOG.error(Failure managing resource {}, resourceTO); -LOG.error(Resource Management Exception:, e); +LOG.error(Failure managing resource {}, resourceTO, e); error(new ResourceModel(error, error).getObject() + : + e.getMessage()); target.add(feedbackPanel); } @@ -199,4 +198,4 @@ public class ResourceModalPage extends B return target; } } -} \ No newline at end of file +}
svn commit: r1439833 - in /syncope/branches/1_0_X: ./ console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
Author: coheigea Date: Tue Jan 29 11:11:13 2013 New Revision: 1439833 URL: http://svn.apache.org/viewvc?rev=1439833view=rev Log: Minor tweak to last commit Modified: syncope/branches/1_0_X/ (props changed) syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Propchange: syncope/branches/1_0_X/ -- Merged /syncope/trunk:r1439832 Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1439833r1=1439832r2=1439833view=diff == --- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java (original) +++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Tue Jan 29 11:11:13 2013 @@ -111,8 +111,7 @@ public class ResourceModalPage extends B window.close(target); } catch (Exception e) { -LOG.error(Failure managing resource {}, resourceTO); -LOG.error(Resource Management Exception:, e); +LOG.error(Failure managing resource {}, resourceTO, e); error(new ResourceModel(error, error).getObject() + : + e.getMessage()); target.add(feedbackPanel); }
svn commit: r1439839 - /syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
Author: coheigea Date: Tue Jan 29 11:26:31 2013 New Revision: 1439839 URL: http://svn.apache.org/viewvc?rev=1439839view=rev Log: Select a single Connector version by default Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java?rev=1439839r1=1439838r2=1439839view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java Tue Jan 29 11:26:31 2013 @@ -278,7 +278,15 @@ public class ConnectorModalPage extends properties.clear(); version.setEnabled(connectorTO.getBundleName() != null); version.getField().setModelValue(null); -version.setChoices(new ArrayListString(mapConnBundleTO.get(connectorTO.getBundleName()).keySet())); +ListString choices = new ArrayListString(mapConnBundleTO.get(connectorTO.getBundleName()).keySet()); +version.setChoices(choices); +if (choices.size() == 1) { +connectorTO.setVersion(choices.get(0)); +version.getField().setModelObject(choices.get(0)); +connectorTO.setDisplayName(displayName.getModelObject()); +bundleTO = getSelectedBundleTO(mapConnBundleTO, connectorTO); +properties = fillProperties(bundleTO, connectorTO); +} target.add(bundleName); target.add(version); target.add(propertiesContainer);
svn commit: r1440353 - in /syncope/trunk/console/src/main/java/org/apache/syncope/console: commons/XMLRolesReader.java pages/Resources.java
Author: coheigea Date: Wed Jan 30 11:37:28 2013 New Revision: 1440353 URL: http://svn.apache.org/viewvc?rev=1440353view=rev Log: [SYNCOPE-299] - Add row to display selector in resources - Removing authorization check for a entitlement (resource_list) that no longer exists Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java?rev=1440353r1=1440352r2=1440353view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java Wed Jan 30 11:37:28 2013 @@ -61,7 +61,7 @@ public class XMLRolesReader { } /** - * Get all roles allowed for specific page and actio requested. + * Get all roles allowed for specific page and action requested. * * @param pageId * @param actionId Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java?rev=1440353r1=1440352r2=1440353view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java Wed Jan 30 11:37:28 2013 @@ -283,9 +283,6 @@ public class Resources extends BasePage final Form paginatorForm = new Form(resourcePaginatorForm); -MetaDataRoleAuthorizationStrategy.authorize(paginatorForm, RENDER, xmlRolesReader.getAllAllowedRoles( -Resources, list)); - final DropDownChoice rowsChooser = new DropDownChoice(rowsChooser, new PropertyModel(this, resourcePaginatorRows), prefMan.getPaginatorChoices());
svn commit: r1440355 - in /syncope/branches/1_0_X: ./ console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java console/src/main/java/org/apache/syncope/console/pages/Resources.java
Author: coheigea Date: Wed Jan 30 11:47:01 2013 New Revision: 1440355 URL: http://svn.apache.org/viewvc?rev=1440355view=rev Log: [SYNCOPE-299] - Backmerged. Modified: syncope/branches/1_0_X/ (props changed) syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java Propchange: syncope/branches/1_0_X/ -- Merged /syncope/trunk:r1440353 Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java?rev=1440355r1=1440354r2=1440355view=diff == --- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java (original) +++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java Wed Jan 30 11:47:01 2013 @@ -60,7 +60,7 @@ public class XMLRolesReader { } /** - * Get all roles allowed for specific page and actio requested. + * Get all roles allowed for specific page and action requested. * * @param pageId * @param actionId Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java?rev=1440355r1=1440354r2=1440355view=diff == --- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java (original) +++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java Wed Jan 30 11:47:01 2013 @@ -236,9 +236,6 @@ public class Resources extends BasePage final Form paginatorForm = new Form(resourcePaginatorForm); -MetaDataRoleAuthorizationStrategy.authorize(paginatorForm, RENDER, xmlRolesReader.getAllAllowedRoles( -Resources, list)); - final DropDownChoice rowsChooser = new DropDownChoice(rowsChooser, new PropertyModel(this, resourcePaginatorRows), prefMan.getPaginatorChoices());
svn commit: r1446492 - /syncope/trunk/console/pom.xml
Author: coheigea Date: Fri Feb 15 10:11:26 2013 New Revision: 1446492 URL: http://svn.apache.org/r1446492 Log: Fixing OSGi imports for Console Modified: syncope/trunk/console/pom.xml Modified: syncope/trunk/console/pom.xml URL: http://svn.apache.org/viewvc/syncope/trunk/console/pom.xml?rev=1446492r1=1446491r2=1446492view=diff == --- syncope/trunk/console/pom.xml (original) +++ syncope/trunk/console/pom.xml Fri Feb 15 10:11:26 2013 @@ -363,9 +363,8 @@ under the License. org.w3c.dom, org.apache.commons.lang*;version=[2.6,3), org.apache.http*;version=[4,5), - org.apache.syncope.annotation;version=${project.version}, org.apache.syncope.client*;version=${project.version}, - org.apache.syncope.types;version=${project.version}, + org.apache.syncope.common*;version=${project.version}, org.apache.wicket*;version=[1.5,2), org.codehaus.jackson*;version=[1.9,2), org.springframework*;version=[3,4),
svn commit: r1446595 - /syncope/trunk/console/pom.xml
Author: coheigea Date: Fri Feb 15 14:25:31 2013 New Revision: 1446595 URL: http://svn.apache.org/r1446595 Log: Updating wicket import version in console pom Modified: syncope/trunk/console/pom.xml Modified: syncope/trunk/console/pom.xml URL: http://svn.apache.org/viewvc/syncope/trunk/console/pom.xml?rev=1446595r1=1446594r2=1446595view=diff == --- syncope/trunk/console/pom.xml (original) +++ syncope/trunk/console/pom.xml Fri Feb 15 14:25:31 2013 @@ -365,7 +365,7 @@ under the License. org.apache.http*;version=[4,5), org.apache.syncope.client*;version=${project.version}, org.apache.syncope.common*;version=${project.version}, - org.apache.wicket*;version=[1.5,2), + org.apache.wicket*;version=[6,7), org.codehaus.jackson*;version=[1.9,2), org.springframework*;version=[3,4), ch.qos.logback.classic;resolution:=optional,
svn commit: r1446662 - /syncope/trunk/pom.xml
Author: coheigea Date: Fri Feb 15 16:07:13 2013 New Revision: 1446662 URL: http://svn.apache.org/r1446662 Log: Adding SNAPSHOT repo to test SNAPSHOT Connector bundles more easily Modified: syncope/trunk/pom.xml Modified: syncope/trunk/pom.xml URL: http://svn.apache.org/viewvc/syncope/trunk/pom.xml?rev=1446662r1=1446661r2=1446662view=diff == --- syncope/trunk/pom.xml (original) +++ syncope/trunk/pom.xml Fri Feb 15 16:07:13 2013 @@ -815,6 +815,12 @@ under the License. idactiviti/id urlhttps://artifacts.alfresco.com/nexus/content/groups/public//url /repository +repository + idsonatype/id + urlhttps://oss.sonatype.org/content/repositories/snapshots/url + releasesenabledfalse/enabled/releases + snapshotsenabledtrue/enabled/snapshots +/repository /repositories
svn commit: r1452320 - /syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java
Author: coheigea Date: Mon Mar 4 14:20:25 2013 New Revision: 1452320 URL: http://svn.apache.org/r1452320 Log: Sort Entitlements in the Console when adding a new Role Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java?rev=1452320r1=1452319r2=1452320view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java Mon Mar 4 14:20:25 2013 @@ -18,6 +18,9 @@ */ package org.apache.syncope.console.pages.panels; +import java.util.Collections; +import java.util.List; + import org.apache.syncope.common.to.RoleTO; import org.apache.syncope.console.commons.SelectChoiceRenderer; import org.apache.syncope.console.pages.RoleModalPage; @@ -94,7 +97,11 @@ public class RolePanel extends Panel { ListModelString selectedEntitlements = new ListModelString(roleTO.getEntitlements()); -ListModelString availableEntitlements = new ListModelString(entitlementRestClient.getAllEntitlements()); +ListString allEntitlements = entitlementRestClient.getAllEntitlements(); +if (allEntitlements != null !allEntitlements.isEmpty()) { +Collections.sort(allEntitlements); +} +ListModelString availableEntitlements = new ListModelString(allEntitlements); entitlementsPalette = new PaletteString(entitlementsPalette, selectedEntitlements, availableEntitlements, new SelectChoiceRenderer(), 20, false);
svn commit: r1456376 - /syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java
Author: coheigea Date: Thu Mar 14 09:47:28 2013 New Revision: 1456376 URL: http://svn.apache.org/r1456376 Log: Widen the window for Schema Attributes so that the JEXL question mark appears on the same row Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java?rev=1456376r1=1456375r2=1456376view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java Thu Mar 14 09:47:28 2013 @@ -93,7 +93,7 @@ public class Schema extends BasePage { }; -private static final int WIN_WIDTH = 550; +private static final int WIN_WIDTH = 600; private static final int WIN_HEIGHT = 200;
svn commit: r1465937 - /syncope/branches/1_1_X/pom.xml
Author: coheigea Date: Tue Apr 9 09:11:54 2013 New Revision: 1465937 URL: http://svn.apache.org/r1465937 Log: Upgrading compiler plugin version Modified: syncope/branches/1_1_X/pom.xml Modified: syncope/branches/1_1_X/pom.xml URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/pom.xml?rev=1465937r1=1465936r2=1465937view=diff == --- syncope/branches/1_1_X/pom.xml (original) +++ syncope/branches/1_1_X/pom.xml Tue Apr 9 09:11:54 2013 @@ -852,7 +852,7 @@ under the License. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId - version3.0/version + version3.1/version configuration source${targetJdk}/source target${targetJdk}/target
svn commit: r1482256 - /syncope/trunk/pom.xml
Author: coheigea Date: Tue May 14 08:58:12 2013 New Revision: 1482256 URL: http://svn.apache.org/r1482256 Log: Upgrading to CXF 2.7.5 Modified: syncope/trunk/pom.xml Modified: syncope/trunk/pom.xml URL: http://svn.apache.org/viewvc/syncope/trunk/pom.xml?rev=1482256r1=1482255r2=1482256view=diff == --- syncope/trunk/pom.xml (original) +++ syncope/trunk/pom.xml Tue May 14 08:58:12 2013 @@ -297,7 +297,7 @@ under the License. activiti.version5.12/activiti.version -cxf.version2.7.4/cxf.version +cxf.version2.7.5/cxf.version spring.version3.2.2.RELEASE/spring.version spring-security.version3.1.4.RELEASE/spring-security.version aspectj.version1.7.2.RELEASE/aspectj.version @@ -1172,6 +1172,8 @@ under the License. exclude**/*.csv/exclude exclude**/archetype-resources/**/exclude exclude**/goal.txt/exclude +exclude**/rat.txt/exclude +exclude**/build-copy-javadoc-files.xml/exclude exclude**/maven-eclipse.xml/exclude exclude**/*.iml/exclude exclude**/*.log/exclude
svn commit: r1482258 - /syncope/branches/1_1_X/pom.xml
Author: coheigea Date: Tue May 14 09:04:02 2013 New Revision: 1482258 URL: http://svn.apache.org/r1482258 Log: Upgrading to CXF 2.7.5 Modified: syncope/branches/1_1_X/pom.xml Modified: syncope/branches/1_1_X/pom.xml URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/pom.xml?rev=1482258r1=1482257r2=1482258view=diff == --- syncope/branches/1_1_X/pom.xml (original) +++ syncope/branches/1_1_X/pom.xml Tue May 14 09:04:02 2013 @@ -297,7 +297,7 @@ under the License. activiti.version5.12/activiti.version -cxf.version2.7.4/cxf.version +cxf.version2.7.5/cxf.version spring.version3.2.2.RELEASE/spring.version spring-security.version3.1.4.RELEASE/spring-security.version aspectj.version1.7.2.RELEASE/aspectj.version @@ -1172,6 +1172,8 @@ under the License. exclude**/*.csv/exclude exclude**/archetype-resources/**/exclude exclude**/goal.txt/exclude +exclude**/rat.txt/exclude +exclude**/build-copy-javadoc-files.xml/exclude exclude**/maven-eclipse.xml/exclude exclude**/*.iml/exclude exclude**/*.log/exclude
svn commit: r1526458 - /syncope/trunk/pom.xml
Author: coheigea Date: Thu Sep 26 12:35:30 2013 New Revision: 1526458 URL: http://svn.apache.org/r1526458 Log: Upgrading to CXF 2.7.7 Modified: syncope/trunk/pom.xml Modified: syncope/trunk/pom.xml URL: http://svn.apache.org/viewvc/syncope/trunk/pom.xml?rev=1526458r1=1526457r2=1526458view=diff == --- syncope/trunk/pom.xml (original) +++ syncope/trunk/pom.xml Thu Sep 26 12:35:30 2013 @@ -311,7 +311,7 @@ under the License. activiti.version5.13/activiti.version -cxf.version2.7.7-SNAPSHOT/cxf.version +cxf.version2.7.7/cxf.version spring.version3.2.4.RELEASE/spring.version spring-security.version3.1.4.RELEASE/spring-security.version jackson.version2.2.3/jackson.version
svn commit: r1526467 - /syncope/branches/1_1_X/pom.xml
Author: coheigea Date: Thu Sep 26 12:42:54 2013 New Revision: 1526467 URL: http://svn.apache.org/r1526467 Log: Upgrading to CXF 2.7.7 Conflicts: pom.xml Modified: syncope/branches/1_1_X/pom.xml Modified: syncope/branches/1_1_X/pom.xml URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/pom.xml?rev=1526467r1=1526466r2=1526467view=diff == --- syncope/branches/1_1_X/pom.xml (original) +++ syncope/branches/1_1_X/pom.xml Thu Sep 26 12:42:54 2013 @@ -310,7 +310,7 @@ under the License. activiti.version5.13/activiti.version -cxf.version2.7.6/cxf.version +cxf.version2.7.7/cxf.version spring.version3.2.4.RELEASE/spring.version spring-security.version3.1.4.RELEASE/spring-security.version aspectj.version1.7.3/aspectj.version
svn commit: r1576255 - /syncope/trunk/pom.xml
Author: coheigea Date: Tue Mar 11 10:03:25 2014 New Revision: 1576255 URL: http://svn.apache.org/r1576255 Log: Updating some plugins Modified: syncope/trunk/pom.xml Modified: syncope/trunk/pom.xml URL: http://svn.apache.org/viewvc/syncope/trunk/pom.xml?rev=1576255r1=1576254r2=1576255view=diff == --- syncope/trunk/pom.xml (original) +++ syncope/trunk/pom.xml Tue Mar 11 10:03:25 2014 @@ -1099,7 +1099,7 @@ under the License. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId - version2.10/version + version2.11/version dependencies dependency groupIdorg.apache.syncope/groupId @@ -1382,7 +1382,7 @@ under the License. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-release-plugin/artifactId -version2.4.2/version +version2.5/version configuration mavenExecutorIdforked-path/mavenExecutorId autoVersionSubmodulestrue/autoVersionSubmodules
svn commit: r1576257 - /syncope/branches/1_1_X/pom.xml
Author: coheigea Date: Tue Mar 11 10:12:50 2014 New Revision: 1576257 URL: http://svn.apache.org/r1576257 Log: Updating some plugins Modified: syncope/branches/1_1_X/pom.xml Modified: syncope/branches/1_1_X/pom.xml URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/pom.xml?rev=1576257r1=1576256r2=1576257view=diff == --- syncope/branches/1_1_X/pom.xml (original) +++ syncope/branches/1_1_X/pom.xml Tue Mar 11 10:12:50 2014 @@ -1081,7 +1081,7 @@ under the License. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId - version2.10/version + version2.11/version dependencies dependency groupIdorg.apache.syncope/groupId @@ -1365,7 +1365,7 @@ under the License. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-release-plugin/artifactId -version2.4.2/version +version2.5/version configuration mavenExecutorIdforked-path/mavenExecutorId autoVersionSubmodulestrue/autoVersionSubmodules
svn commit: r1596537 - in /syncope/trunk/core/src/main/java/org/apache/syncope/core: connid/PasswordGenerator.java util/SecureRandomUtil.java
Author: coheigea Date: Wed May 21 11:06:09 2014 New Revision: 1596537 URL: http://svn.apache.org/r1596537 Log: Better password generation Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/PasswordGenerator.java syncope/trunk/core/src/main/java/org/apache/syncope/core/util/SecureRandomUtil.java Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/PasswordGenerator.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/PasswordGenerator.java?rev=1596537r1=1596536r2=1596537view=diff == --- syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/PasswordGenerator.java (original) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/PasswordGenerator.java Wed May 21 11:06:09 2014 @@ -20,7 +20,7 @@ package org.apache.syncope.core.connid; import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang3.RandomStringUtils; + import org.apache.commons.lang3.StringUtils; import org.apache.syncope.common.types.PasswordPolicySpec; import org.apache.syncope.core.persistence.beans.ExternalResource; @@ -30,6 +30,7 @@ import org.apache.syncope.core.persisten import org.apache.syncope.core.persistence.dao.PolicyDAO; import org.apache.syncope.core.policy.PolicyPattern; import org.apache.syncope.core.util.InvalidPasswordPolicySpecException; +import org.apache.syncope.core.util.SecureRandomUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -41,7 +42,7 @@ import org.springframework.stereotype.Co @Component public class PasswordGenerator { -private static final String[] SPECIAL_CHARS = {, !, £, %, , (, ), ?, #, _, $}; +private static final char[] SPECIAL_CHARS = {'!', '£', '%', '', '(', ')', '?', '#', '$'}; @Autowired private PolicyDAO policyDAO; @@ -216,7 +217,7 @@ public class PasswordGenerator { //filled empty chars for (int firstEmptyChar = firstEmptyChar(generatedPassword); firstEmptyChar generatedPassword.length - 1; firstEmptyChar++) { -generatedPassword[firstEmptyChar] = RandomStringUtils.randomAlphabetic(1); +generatedPassword[firstEmptyChar] = SecureRandomUtil.generateRandomLetter(); } checkPrefixAndSuffix(generatedPassword, policySpec); @@ -224,48 +225,43 @@ public class PasswordGenerator { return StringUtils.join(generatedPassword); } -private int randomNumber(final int range) { -int randomNumber = (int) (Math.random() * (range - 1)); -return randomNumber == 0 ? 1 : randomNumber; -} - private void checkStartChar(final String[] generatedPassword, final PasswordPolicySpec policySpec) { if (policySpec.isMustStartWithAlpha()) { -generatedPassword[0] = RandomStringUtils.randomAlphabetic(1); +generatedPassword[0] = SecureRandomUtil.generateRandomLetter(); } if (policySpec.isMustStartWithNonAlpha() || policySpec.isMustStartWithDigit()) { -generatedPassword[0] = RandomStringUtils.randomNumeric(1); +generatedPassword[0] = SecureRandomUtil.generateRandomNumber(); } if (policySpec.isMustntStartWithAlpha()) { -generatedPassword[0] = RandomStringUtils.randomNumeric(1); +generatedPassword[0] = SecureRandomUtil.generateRandomNumber(); } if (policySpec.isMustntStartWithDigit()) { -generatedPassword[0] = RandomStringUtils.randomAlphabetic(1); +generatedPassword[0] = SecureRandomUtil.generateRandomLetter(); } if (policySpec.isMustntStartWithNonAlpha()) { -generatedPassword[0] = RandomStringUtils.randomAlphabetic(1); +generatedPassword[0] = SecureRandomUtil.generateRandomLetter(); } } private void checkEndChar(final String[] generatedPassword, final PasswordPolicySpec policySpec) { if (policySpec.isMustEndWithAlpha()) { -generatedPassword[policySpec.getMinLength() - 1] = RandomStringUtils.randomAlphabetic(1); +generatedPassword[policySpec.getMinLength() - 1] = SecureRandomUtil.generateRandomLetter(); } if (policySpec.isMustEndWithNonAlpha() || policySpec.isMustEndWithDigit()) { -generatedPassword[policySpec.getMinLength() - 1] = RandomStringUtils.randomNumeric(1); +generatedPassword[policySpec.getMinLength() - 1] = SecureRandomUtil.generateRandomNumber(); } if (policySpec.isMustntEndWithAlpha()) { -generatedPassword[policySpec.getMinLength() - 1] = RandomStringUtils.randomNumeric(1); +generatedPassword[policySpec.getMinLength() - 1] = SecureRandomUtil.generateRandomNumber
svn commit: r1599499 - /syncope/trunk/pom.xml
Author: coheigea Date: Tue Jun 3 12:11:51 2014 New Revision: 1599499 URL: http://svn.apache.org/r1599499 Log: Plugin update Modified: syncope/trunk/pom.xml Modified: syncope/trunk/pom.xml URL: http://svn.apache.org/viewvc/syncope/trunk/pom.xml?rev=1599499r1=1599498r2=1599499view=diff == --- syncope/trunk/pom.xml (original) +++ syncope/trunk/pom.xml Tue Jun 3 12:11:51 2014 @@ -972,7 +972,7 @@ under the License. plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId - version1.2.1/version + version1.3/version /plugin plugin groupIdorg.apache.openjpa/groupId
svn commit: r1603171 - /syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java
Author: coheigea Date: Tue Jun 17 13:58:09 2014 New Revision: 1603171 URL: http://svn.apache.org/r1603171 Log: [SYNCOPE-505] - Adding an initial PropagationActions implementation for DBs Added: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java Added: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java?rev=1603171view=auto == --- syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java (added) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java Tue Jun 17 13:58:09 2014 @@ -0,0 +1,78 @@ +/* + * 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.propagation.impl; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.apache.syncope.common.types.AttributableType; +import org.apache.syncope.core.persistence.beans.PropagationTask; +import org.apache.syncope.core.persistence.beans.user.SyncopeUser; +import org.apache.syncope.core.persistence.dao.UserDAO; +import org.apache.syncope.core.propagation.DefaultPropagationActions; +import org.identityconnectors.common.security.GuardedString; +import org.identityconnectors.framework.common.objects.Attribute; +import org.identityconnectors.framework.common.objects.AttributeBuilder; +import org.identityconnectors.framework.common.objects.AttributeUtil; +import org.identityconnectors.framework.common.objects.ConnectorObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; + +/** + * Propagate a non-cleartext password out to a resource, if the PropagationManager has not already + * added a password. + */ +public class DBPasswordPropagationActions extends DefaultPropagationActions { + +protected static final Logger LOG = LoggerFactory.getLogger(DBPasswordPropagationActions.class); + +@Autowired +protected UserDAO userDAO; + +@Transactional(readOnly = true) +@Override +public void before(final PropagationTask task, final ConnectorObject beforeObj) { +super.before(task, beforeObj); + +if (AttributableType.USER == task.getSubjectType()) { +SyncopeUser user = userDAO.find(task.getSubjectId()); + +if (user != null user.getPassword() != null) { +Attribute missing = AttributeUtil.find(__MANDATORY_MISSING__, task.getAttributes()); +if (missing != null missing.getValue() != null missing.getValue().size() == 1 + missing.getValue().get(0).equals(__PASSWORD__)) { +ListObject values = new ArrayListObject(1); +values.add(new GuardedString(user.getPassword().toCharArray())); + +Attribute passwordAttribute = AttributeBuilder.build(__PASSWORD__, values); + +SetAttribute attributes = new HashSetAttribute(task.getAttributes()); +attributes.add(passwordAttribute); +attributes.remove(missing); +task.setAttributes(attributes); +} + +} +} +} +}
svn commit: r1603800 - /syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java
Author: coheigea Date: Thu Jun 19 09:52:12 2014 New Revision: 1603800 URL: http://svn.apache.org/r1603800 Log: [SYNCOPE-505] - Updating the DB Propagation Actions class Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java?rev=1603800r1=1603799r2=1603800view=diff == --- syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java (original) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DBPasswordPropagationActions.java Thu Jun 19 09:52:12 2014 @@ -33,19 +33,15 @@ import org.identityconnectors.framework. import org.identityconnectors.framework.common.objects.AttributeUtil; import org.identityconnectors.framework.common.objects.ConnectorObject; import org.identityconnectors.framework.common.objects.OperationalAttributes; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; /** * Propagate a non-cleartext password out to a resource, if the PropagationManager has not already - * added a password. + * added a password. */ public class DBPasswordPropagationActions extends DefaultPropagationActions { -private static final Logger LOG = LoggerFactory.getLogger(DBPasswordPropagationActions.class); - @Autowired private UserDAO userDAO; @@ -53,12 +49,12 @@ public class DBPasswordPropagationAction @Override public void before(final PropagationTask task, final ConnectorObject beforeObj) { super.before(task, beforeObj); - + if (AttributableType.USER == task.getSubjectType()) { SyncopeUser user = userDAO.find(task.getSubjectId()); if (user != null user.getPassword() != null) { Attribute missing = AttributeUtil.find( - AttributeUtil.createSpecialName(PropagationTaskExecutor.MANDATORY_MISSING_ATTR_NAME), +PropagationTaskExecutor.MANDATORY_MISSING_ATTR_NAME, task.getAttributes()); if (missing != null missing.getValue() != null missing.getValue().size() == 1 missing.getValue().get(0).equals(OperationalAttributes.PASSWORD_NAME)) { @@ -69,9 +65,16 @@ public class DBPasswordPropagationAction SetAttribute attributes = new HashSetAttribute(task.getAttributes()); attributes.add(passwordAttribute); attributes.remove(missing); + +Attribute hashedPasswordAttribute = +AttributeBuilder.build( + AttributeUtil.createSpecialName(HASHED_PASSWORD), Boolean.TRUE); +attributes.add(hashedPasswordAttribute); + task.setAttributes(attributes); } } } } + }
svn commit: r1604848 - /syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPPasswordPropagationActions.java
Author: coheigea Date: Mon Jun 23 16:20:14 2014 New Revision: 1604848 URL: http://svn.apache.org/r1604848 Log: [SYNCOPE-505] - Adding initial LDAPPropagationActions class Added: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPPasswordPropagationActions.java Added: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPPasswordPropagationActions.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPPasswordPropagationActions.java?rev=1604848view=auto == --- syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPPasswordPropagationActions.java (added) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPPasswordPropagationActions.java Mon Jun 23 16:20:14 2014 @@ -0,0 +1,127 @@ +/* + * 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.propagation.impl; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import org.apache.syncope.common.types.AttributableType; +import org.apache.syncope.common.types.CipherAlgorithm; +import org.apache.syncope.common.types.ConnConfProperty; +import org.apache.syncope.core.persistence.beans.ConnInstance; +import org.apache.syncope.core.persistence.beans.PropagationTask; +import org.apache.syncope.core.persistence.beans.user.SyncopeUser; +import org.apache.syncope.core.persistence.dao.UserDAO; +import org.apache.syncope.core.propagation.DefaultPropagationActions; +import org.apache.syncope.core.propagation.PropagationTaskExecutor; +import org.identityconnectors.common.security.GuardedString; +import org.identityconnectors.framework.common.objects.Attribute; +import org.identityconnectors.framework.common.objects.AttributeBuilder; +import org.identityconnectors.framework.common.objects.AttributeUtil; +import org.identityconnectors.framework.common.objects.ConnectorObject; +import org.identityconnectors.framework.common.objects.OperationalAttributes; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.codec.Base64; +import org.springframework.security.crypto.codec.Hex; +import org.springframework.transaction.annotation.Transactional; + +/** + * Propagate a non-cleartext password out to a resource, if the PropagationManager has not already + * added a password. The CipherAlgorithm associated with the password must match the password + * hash algorithm property of the LDAP Connector. + */ +public class LDAPPasswordPropagationActions extends DefaultPropagationActions { + +private static final String CLEARTEXT = CLEARTEXT; + +@Autowired +private UserDAO userDAO; + +@Transactional(readOnly = true) +@Override +public void before(final PropagationTask task, final ConnectorObject beforeObj) { +super.before(task, beforeObj); + +if (AttributableType.USER == task.getSubjectType()) { +SyncopeUser user = userDAO.find(task.getSubjectId()); + +if (user != null user.getPassword() != null) { +Attribute missing = AttributeUtil.find( +PropagationTaskExecutor.MANDATORY_MISSING_ATTR_NAME, +task.getAttributes()); + +ConnInstance connInstance = task.getResource().getConnector(); +String cipherAlgorithm = getCipherAlgorithm(connInstance); +if (missing != null missing.getValue() != null missing.getValue().size() == 1 + missing.getValue().get(0).equals(OperationalAttributes.PASSWORD_NAME) + cipherAlgorithmMatches(getCipherAlgorithm(connInstance), user.getCipherAlgorithm())) { + +String password = user.getPassword().toLowerCase(); +byte[] decodedPassword = Hex.decode(password); +byte[] base64EncodedPassword = Base64.encode(decodedPassword); + +String cipherPlusPassword
svn commit: r1606026 - in /syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages: PushTaskModalPage.properties SyncTaskModalPage.properties
Author: coheigea Date: Fri Jun 27 10:59:56 2014 New Revision: 1606026 URL: http://svn.apache.org/r1606026 Log: Spelling correction Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/PushTaskModalPage.properties syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.properties Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/PushTaskModalPage.properties URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/PushTaskModalPage.properties?rev=1606026r1=1606025r2=1606026view=diff == --- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/PushTaskModalPage.properties (original) +++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/PushTaskModalPage.properties Fri Jun 27 10:59:56 2014 @@ -39,7 +39,7 @@ deletes=Delete matching identities syncStatus=Synchronize user status fullReconciliation=Full reconciliation actionsClasses=Actions classes -matchingRule=Mathcing Rule +matchingRule=Matching Rule unmatchingRule=Unmatching Rule checkUserFilter=User Filter checkRoleFilter=Role Filter Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.properties URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.properties?rev=1606026r1=1606025r2=1606026view=diff == --- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.properties (original) +++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.properties Fri Jun 27 10:59:56 2014 @@ -39,5 +39,5 @@ deletes=Delete matching identities syncStatus=Synchronize user status fullReconciliation=Full reconciliation actionsClasses=Actions classes -matchingRule=Mathcing Rule +matchingRule=Matching Rule unmatchingRule=Unmatching Rule
svn commit: r1607419 - /syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java
Author: coheigea Date: Wed Jul 2 16:50:43 2014 New Revision: 1607419 URL: http://svn.apache.org/r1607419 Log: [SYNCOPE-313] - Added integration tests Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java?rev=1607419r1=1607418r2=1607419view=diff == --- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java (original) +++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java Wed Jul 2 16:50:43 2014 @@ -36,20 +36,26 @@ import java.util.concurrent.ExecutorServ import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; + import javax.ws.rs.core.Response; + import org.apache.syncope.client.SyncopeClient; import org.apache.syncope.common.SyncopeClientException; +import org.apache.syncope.common.mod.StatusMod; import org.apache.syncope.common.mod.UserMod; import org.apache.syncope.common.services.NotificationService; import org.apache.syncope.common.services.TaskService; import org.apache.syncope.common.to.AttributeTO; import org.apache.syncope.common.reqres.BulkAction; import org.apache.syncope.common.wrap.JobClass; +import org.apache.syncope.common.to.ConnInstanceTO; +import org.apache.syncope.common.to.ConnObjectTO; import org.apache.syncope.common.to.MembershipTO; import org.apache.syncope.common.to.NotificationTO; import org.apache.syncope.common.to.NotificationTaskTO; import org.apache.syncope.common.to.PropagationTaskTO; import org.apache.syncope.common.to.ReportExecTO; +import org.apache.syncope.common.to.ResourceTO; import org.apache.syncope.common.to.RoleTO; import org.apache.syncope.common.to.SchedTaskTO; import org.apache.syncope.common.wrap.SyncActionClass; @@ -60,6 +66,8 @@ import org.apache.syncope.common.to.Abst import org.apache.syncope.common.reqres.PagedResult; import org.apache.syncope.common.to.PushTaskTO; import org.apache.syncope.common.to.UserTO; +import org.apache.syncope.common.types.CipherAlgorithm; +import org.apache.syncope.common.types.ConnConfProperty; import org.apache.syncope.common.types.IntMappingType; import org.apache.syncope.common.types.MatchingRule; import org.apache.syncope.common.types.PropagationTaskExecStatus; @@ -69,8 +77,13 @@ import org.apache.syncope.common.types.S import org.apache.syncope.common.types.UnmatchingRule; import org.apache.syncope.common.wrap.PushActionClass; import org.apache.syncope.core.sync.TestSyncRule; +import org.apache.syncope.core.sync.impl.DBPasswordSyncActions; +import org.apache.syncope.core.sync.impl.LDAPPasswordSyncActions; import org.apache.syncope.core.sync.impl.SyncJob; +import org.apache.syncope.core.util.Encryptor; import org.apache.syncope.core.workflow.ActivitiDetector; +import org.identityconnectors.framework.common.objects.AttributeUtil; +import org.identityconnectors.framework.common.objects.Name; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; @@ -1084,4 +1097,139 @@ public class TaskTestITCase extends Abst return test.execSyncTask(taskId, maxWaitSeconds, dryRun); } } + +@Test +public void issueSYNCOPE313DB() throws Exception { +// 1. create user in DB +UserTO user = UserTestITCase.getUniqueSampleTO(syncope313...@syncope.apache.org); +user.setPassword(security); +user.getResources().add(RESOURCE_NAME_TESTDB); +user = createUser(user); +assertNotNull(user); +assertFalse(user.getResources().isEmpty()); + +// 2. Check that the DB resource has the correct password +final JdbcTemplate jdbcTemplate = new JdbcTemplate(testDataSource); +String value = jdbcTemplate.queryForObject( +SELECT PASSWORD FROM test WHERE ID=?, String.class, user.getUsername()); +assertEquals(Encryptor.getInstance().encode(security, CipherAlgorithm.SHA1), value.toUpperCase()); + +// 3. Update the password in the DB +String newPassword = Encryptor.getInstance().encode(new-security, CipherAlgorithm.SHA1); +jdbcTemplate.execute( +UPDATE test set PASSWORD=' + newPassword + ' where ID=' + user.getUsername() + '); + +// 4. Sync the user from the resource +SyncTaskTO syncTask = new SyncTaskTO(); +syncTask.setName(DB Sync Task); +syncTask.setPerformCreate(true); +syncTask.setPerformUpdate(true); +syncTask.setFullReconciliation(true); +syncTask.setResource(RESOURCE_NAME_TESTDB); + syncTask.getActionsClassNames().add(DBPasswordSyncActions.class.getName()); +Response taskResponse = taskService.create
svn commit: r1619867 - in /syncope/trunk/installer/src/main: java/org/apache/syncope/installer/files/PersistenceProperties.java resources/izpack/html/prerequisites.html
Author: coheigea Date: Fri Aug 22 17:15:04 2014 New Revision: 1619867 URL: http://svn.apache.org/r1619867 Log: Fixed a installer bug + some grammatical improvements Modified: syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java syncope/trunk/installer/src/main/resources/izpack/html/prerequisites.html Modified: syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java?rev=1619867r1=1619866r2=1619867view=diff == --- syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java (original) +++ syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java Fri Aug 22 17:15:04 2014 @@ -46,7 +46,7 @@ public class PersistenceProperties { + quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate\n + quartz.sql=tables_postgres.sql\n + audit.sql=audit.sql\n -+ database.schema=; ++ database.schema=\n; public static final String MYSQL = + jpa.driverClassName=com.mysql.jdbc.Driver\n @@ -57,7 +57,7 @@ public class PersistenceProperties { + jpa.pool.validationQuery=SELECT 1\n + quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n + audit.sql=audit.sql\n -+ database.schema=; ++ database.schema=\n; public static final String ORACLE = + jpa.driverClassName=oracle.jdbc.OracleDriver\n @@ -80,7 +80,7 @@ public class PersistenceProperties { + quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate\n + quartz.sql=tables_sqlServer.sql\n + audit.sql=audit.sql\n -+ database.schema=; ++ database.schema=\n; public static final String QUARTZ_INNO_DB = quartz.sql=tables_mysql_innodb.sql; Modified: syncope/trunk/installer/src/main/resources/izpack/html/prerequisites.html URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/resources/izpack/html/prerequisites.html?rev=1619867r1=1619866r2=1619867view=diff == --- syncope/trunk/installer/src/main/resources/izpack/html/prerequisites.html (original) +++ syncope/trunk/installer/src/main/resources/izpack/html/prerequisites.html Fri Aug 22 17:15:04 2014 @@ -29,7 +29,7 @@ under the License. div h3Introduction/h3 p -The preferred way to create a Syncope project is to generate a Maven project starting from published archetype. +The preferred way to create a Syncope project is to generate a Maven project starting from a published archetype. br/ /p /div @@ -46,19 +46,18 @@ under the License. /div div div - h3To remind/h3 + h3Reminder/h3 p -Before to start with Apache Syncope installation carefully reading follow points: +Please carefully read the following points before installing Apache Syncope: br/ /p /div div ul li class=prerequisitea href=https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-UseDataSource; -Configure - /a data source in your application server;/li -liSure you have DB up and running;/li -liSure you have container up and running./li +Configure/a the data source in your application server;/li +liMake sure you have the DB up and running;/li +liMake sure you have the container up and running./li /ul /div /div
svn commit: r1619869 - in /syncope/branches/1_2_X/installer/src/main: java/org/apache/syncope/installer/files/PersistenceProperties.java resources/izpack/html/prerequisites.html
Author: coheigea Date: Fri Aug 22 17:22:03 2014 New Revision: 1619869 URL: http://svn.apache.org/r1619869 Log: Fixed a installer bug + some grammatical improvements Modified: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java syncope/branches/1_2_X/installer/src/main/resources/izpack/html/prerequisites.html Modified: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java?rev=1619869r1=1619868r2=1619869view=diff == --- syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java (original) +++ syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java Fri Aug 22 17:22:03 2014 @@ -46,7 +46,7 @@ public class PersistenceProperties { + quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate\n + quartz.sql=tables_postgres.sql\n + audit.sql=audit.sql\n -+ database.schema=; ++ database.schema=\n; public static final String MYSQL = + jpa.driverClassName=com.mysql.jdbc.Driver\n @@ -57,7 +57,7 @@ public class PersistenceProperties { + jpa.pool.validationQuery=SELECT 1\n + quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n + audit.sql=audit.sql\n -+ database.schema=; ++ database.schema=\n; public static final String ORACLE = + jpa.driverClassName=oracle.jdbc.OracleDriver\n @@ -80,7 +80,7 @@ public class PersistenceProperties { + quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate\n + quartz.sql=tables_sqlServer.sql\n + audit.sql=audit.sql\n -+ database.schema=; ++ database.schema=\n; public static final String QUARTZ_INNO_DB = quartz.sql=tables_mysql_innodb.sql; Modified: syncope/branches/1_2_X/installer/src/main/resources/izpack/html/prerequisites.html URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/resources/izpack/html/prerequisites.html?rev=1619869r1=1619868r2=1619869view=diff == --- syncope/branches/1_2_X/installer/src/main/resources/izpack/html/prerequisites.html (original) +++ syncope/branches/1_2_X/installer/src/main/resources/izpack/html/prerequisites.html Fri Aug 22 17:22:03 2014 @@ -29,7 +29,7 @@ under the License. div h3Introduction/h3 p -The preferred way to create a Syncope project is to generate a Maven project starting from published archetype. +The preferred way to create a Syncope project is to generate a Maven project starting from a published archetype. br/ /p /div @@ -46,19 +46,18 @@ under the License. /div div div - h3To remind/h3 + h3Reminder/h3 p -Before to start with Apache Syncope installation carefully reading follow points: +Please carefully read the following points before installing Apache Syncope: br/ /p /div div ul li class=prerequisitea href=https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-UseDataSource; -Configure - /a data source in your application server;/li -liSure you have DB up and running;/li -liSure you have container up and running./li +Configure/a the data source in your application server;/li +liMake sure you have the DB up and running;/li +liMake sure you have the container up and running./li /ul /div /div
syncope git commit: Fixing a focus bug when searching roles. Currently, hitting enter on the final textfield doesn't search, but switches tabs instead.
Repository: syncope Updated Branches: refs/heads/1_1_X 3621adf44 - dce78dbd0 Fixing a focus bug when searching roles. Currently, hitting enter on the final textfield doesn't search, but switches tabs instead. Conflicts: console/src/main/java/org/apache/syncope/console/pages/Roles.java Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/dce78dbd Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/dce78dbd Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/dce78dbd Branch: refs/heads/1_1_X Commit: dce78dbd08cd5d29334485337c5282b1e8f0e6d1 Parents: 3621adf Author: Colm O hEigeartaigh cohei...@apache.org Authored: Fri May 15 16:35:27 2015 +0100 Committer: Colm O hEigeartaigh cohei...@apache.org Committed: Fri May 15 16:49:36 2015 +0100 -- .../org/apache/syncope/console/pages/Roles.java | 33 +++- 1 file changed, 18 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/dce78dbd/console/src/main/java/org/apache/syncope/console/pages/Roles.java -- diff --git a/console/src/main/java/org/apache/syncope/console/pages/Roles.java b/console/src/main/java/org/apache/syncope/console/pages/Roles.java index b691073..563c2ee 100644 --- a/console/src/main/java/org/apache/syncope/console/pages/Roles.java +++ b/console/src/main/java/org/apache/syncope/console/pages/Roles.java @@ -104,26 +104,29 @@ public class Roles extends BasePage { final RoleSearchPanel searchPanel = new RoleSearchPanel.Builder(searchPanel).build(); searchForm.add(searchPanel); -searchForm.add(new ClearIndicatingAjaxButton(search, new ResourceModel(search), getPageReference()) { +final ClearIndicatingAjaxButton searchButton = +new ClearIndicatingAjaxButton(search, new ResourceModel(search), getPageReference()) { -private static final long serialVersionUID = -958724007591692537L; +private static final long serialVersionUID = -958724007591692537L; -@Override -protected void onSubmitInternal(final AjaxRequestTarget target, final Form? form) { -final NodeCond searchCond = searchPanel.buildSearchCond(); -LOG.debug(Node condition {}, searchCond); +@Override +protected void onSubmitInternal(final AjaxRequestTarget target, final Form? form) { +final NodeCond searchCond = searchPanel.buildSearchCond(); +LOG.debug(Node condition {}, searchCond); -doSearch(target, searchCond, searchResult); +doSearch(target, searchCond, searchResult); -Session.get().getFeedbackMessages().clear(); -target.add(searchPanel.getSearchFeedback()); -} +Session.get().getFeedbackMessages().clear(); +target.add(searchPanel.getSearchFeedback()); +} -@Override -protected void onError(final AjaxRequestTarget target, final Form? form) { -target.add(searchPanel.getSearchFeedback()); -} -}); +@Override +protected void onError(final AjaxRequestTarget target, final Form? form) { +target.add(searchPanel.getSearchFeedback()); +} +}; +searchForm.add(searchButton); +searchForm.setDefaultButton(searchButton); } private void doSearch(final AjaxRequestTarget target, final NodeCond searchCond,
syncope git commit: Fixing a focus bug when searching roles. Currently, hitting enter on the final textfield doesn't search, but switches tabs instead.
Repository: syncope Updated Branches: refs/heads/1_2_X 4f65a9202 - ac920f0b1 Fixing a focus bug when searching roles. Currently, hitting enter on the final textfield doesn't search, but switches tabs instead. Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ac920f0b Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ac920f0b Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ac920f0b Branch: refs/heads/1_2_X Commit: ac920f0b199b9903579786c7a53359839bad5eb9 Parents: 4f65a92 Author: Colm O hEigeartaigh cohei...@apache.org Authored: Fri May 15 16:35:27 2015 +0100 Committer: Colm O hEigeartaigh cohei...@apache.org Committed: Fri May 15 16:35:27 2015 +0100 -- .../org/apache/syncope/console/pages/Roles.java | 36 +++- 1 file changed, 20 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/ac920f0b/console/src/main/java/org/apache/syncope/console/pages/Roles.java -- diff --git a/console/src/main/java/org/apache/syncope/console/pages/Roles.java b/console/src/main/java/org/apache/syncope/console/pages/Roles.java index fa94ee4..9ce3d51 100644 --- a/console/src/main/java/org/apache/syncope/console/pages/Roles.java +++ b/console/src/main/java/org/apache/syncope/console/pages/Roles.java @@ -111,26 +111,30 @@ public class Roles extends BasePage { final RoleSearchPanel searchPanel = new RoleSearchPanel.Builder(searchPanel).build(); searchForm.add(searchPanel); -searchForm.add(new ClearIndicatingAjaxButton(search, new ResourceModel(search), getPageReference()) { +final ClearIndicatingAjaxButton searchButton = +new ClearIndicatingAjaxButton(search, new ResourceModel(search), getPageReference()) { -private static final long serialVersionUID = -958724007591692537L; +private static final long serialVersionUID = -958724007591692537L; -@Override -protected void onSubmitInternal(final AjaxRequestTarget target, final Form? form) { -final String fiql = searchPanel.buildFIQL(); -LOG.debug(Node condition {}, fiql); - -doSearch(target, fiql, searchResult); +@Override +protected void onSubmitInternal(final AjaxRequestTarget target, final Form? form) { +final String fiql = searchPanel.buildFIQL(); +LOG.debug(Node condition {}, fiql); -Session.get().getFeedbackMessages().clear(); -searchPanel.getSearchFeedback().refresh(target); -} +doSearch(target, fiql, searchResult); -@Override -protected void onError(final AjaxRequestTarget target, final Form? form) { -searchPanel.getSearchFeedback().refresh(target); -} -}); +Session.get().getFeedbackMessages().clear(); +searchPanel.getSearchFeedback().refresh(target); +} + +@Override +protected void onError(final AjaxRequestTarget target, final Form? form) { +searchPanel.getSearchFeedback().refresh(target); +} +}; + +searchForm.add(searchButton); +searchForm.setDefaultButton(searchButton); } private void doSearch(final AjaxRequestTarget target, final String fiql,
syncope git commit: An initial grammatical update to the docs
Repository: syncope Updated Branches: refs/heads/master 7642af97c -> ae88f405f An initial grammatical update to the docs Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ae88f405 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ae88f405 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ae88f405 Branch: refs/heads/master Commit: ae88f405f78aac4553db390c82982b858f459859 Parents: 7642af9 Author: Colm O hEigeartaighAuthored: Wed Oct 14 17:16:37 2015 +0100 Committer: Colm O hEigeartaigh Committed: Wed Oct 14 17:16:37 2015 +0100 -- src/main/asciidoc/introduction.adoc| 52 ++--- src/main/asciidoc/reference-guide.adoc | 6 ++-- 2 files changed, 29 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/ae88f405/src/main/asciidoc/introduction.adoc -- diff --git a/src/main/asciidoc/introduction.adoc b/src/main/asciidoc/introduction.adoc index f880ab5..cd108e3 100644 --- a/src/main/asciidoc/introduction.adoc +++ b/src/main/asciidoc/introduction.adoc @@ -20,32 +20,32 @@ == Introduction *Apache Syncope* is an Open Source system for managing digital identities in enterprise environments, implemented in -Java EE technology and released under Apache 2.0 license. +Java EE technology and released under the Apache 2.0 license. -*Identity management* (or IdM) represents the joint result of business process and IT to manage user data on systems and -applications. IdM involves considering user attributes, roles, resources and entitlements in trying to give a decent -answer to the question bumping up every time in an IT administrator's mind: +*Identity Management* (or IdM) means to manage user data on systems and applications, using the combination of +business processes and IT. IdM involves considering user attributes, roles, resources and entitlements in trying to answer the +following thorny question: [.text-center] _Who has access to What, When, How, and Why?_ -=== What is this Identity Management, anyway? +=== What is Identity Management, anyway? -Account:: Computers work with records of data about persons. Such records contains technical information needed by the system for +Account:: Computers work with records of data about people. Such records contain technical information needed by the system for which the account is created and managed. (Digital) Identity:: A representation of a set of claims made by one digital subject about itself. *It's you!* -Have you ever been hired by a company, entered an organization or just subscribed a new Google account? +Have you ever been hired by a company, entered an organization or just created a new Google account? Companies, organizations and cloud entities work with applications that need your data to function properly: username, password, e-mail, first name, surname, and more. -Who is going to feed such information? And what happens when you need to be enabled for more applications? And what if +Where is this information going to come from? And what happens when you need to be enabled for more applications? And what if you get promoted and acquire more rights on the applications you already had access to? Most important, what happens when you quit or they gently let you go? -Shortly, Identity Management takes care of managing identity data throughout what is called the *Identity Lifecycle*. +In brief, Identity Management takes care of managing identity data throughout what is called the *Identity Lifecycle*. [.text-center] image::identityLifecycle.png[title="Identity Lifecycle",alt="Identity Lifecycle",width="505",height="324"] @@ -53,34 +53,34 @@ image::identityLifecycle.png[title="Identity Lifecycle",alt="Identity Lifecycle" .Users, groups and any objects With Apache Syncope 2.0.0, the managed identities are not limited anymore to users and groups. New object types can be -defined so that any object's data can be managed through Syncope: workstations, printers, folders, sensors, services, -and so on. This positions Apache Syncope at best places for bringing Identity Management in the IoT world. +defined so that any objects data can be managed through Syncope: workstations, printers, folders, sensors, services, +and so on. This positions Apache Syncope at the forefront for bringing Identity Management in the IoT world. -=== Bird's eye view on Architecture +=== A bird's eye view on the Architecture of Apache Syncope -*_Core_* is the central component, providing all services offered by Apache Syncope. + -It exposes a full-compliant
syncope git commit: Documentation updates
Repository: syncope Updated Branches: refs/heads/master 706cd3671 -> b4f893904 Documentation updates Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b4f89390 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b4f89390 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b4f89390 Branch: refs/heads/master Commit: b4f8939043b02bcea607cbdaaf269f2db22bb9cc Parents: 706cd36 Author: Colm O hEigeartaighAuthored: Thu Dec 3 17:14:41 2015 + Committer: Colm O hEigeartaigh Committed: Thu Dec 3 17:15:20 2015 + -- .../apache/syncope/client/cli/ArgsManager.java | 2 +- .../apache/syncope/client/cli/SyncopeAdm.java | 2 +- .../commands/domain/DomainResultManager.java| 2 +- .../commands/install/InstallResultManager.java | 8 +-- .../commands/schema/SchemaResultManager.java| 2 +- .../cli/commands/task/TaskListRunningJobs.java | 2 +- .../client/cli/commands/user/UserList.java | 2 +- src/main/asciidoc/cli/configuration.adoc| 21 src/main/asciidoc/cli/connector.adoc| 26 - src/main/asciidoc/cli/domain.adoc | 8 +-- src/main/asciidoc/cli/entitlement.adoc | 14 ++--- src/main/asciidoc/cli/group.adoc| 16 +++--- src/main/asciidoc/cli/info.adoc | 4 +- src/main/asciidoc/cli/installation.adoc | 34 ++-- src/main/asciidoc/cli/introduction.adoc | 13 +++-- src/main/asciidoc/cli/logger.adoc | 20 +++ src/main/asciidoc/cli/notification.adoc | 8 +-- src/main/asciidoc/cli/policy.adoc | 16 +++--- src/main/asciidoc/cli/question.adoc | 12 ++--- src/main/asciidoc/cli/realm.adoc| 10 ++-- src/main/asciidoc/cli/report.adoc | 30 +-- src/main/asciidoc/cli/resource.adoc | 18 +++ src/main/asciidoc/cli/role.adoc | 19 --- src/main/asciidoc/cli/schema.adoc | 28 +- src/main/asciidoc/cli/task.adoc | 26 - src/main/asciidoc/cli/user.adoc | 56 ++-- src/main/asciidoc/introduction.adoc | 8 +-- src/main/asciidoc/obtain.adoc | 4 +- 28 files changed, 203 insertions(+), 208 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/b4f89390/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java index 3ec222a..06dd7f4 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java @@ -30,7 +30,7 @@ public final class ArgsManager { final File configFile = new File(InstallConfigFileTemplate.configurationFilePath()); if (!configFile.exists()) { throw new IllegalArgumentException( -"It seems you need to setup the CLI client before. Run install --setup."); +"It seems you need to first setup the CLI client. Run install --setup."); } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/b4f89390/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java index 17abce8..2ececa1 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java @@ -46,7 +46,7 @@ public final class SyncopeAdm { } System.out.println(""); -System.out.println("You are runnig: " + input.printCommandFields()); +System.out.println("You are running: " + input.printCommandFields()); command.execute(input); } catch (final IllegalAccessException | InstantiationException e) { System.out.println(helpMessage()); http://git-wip-us.apache.org/repos/asf/syncope/blob/b4f89390/client/cli/src/main/java/org/apache/syncope/client/cli/commands/domain/DomainResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/domain/DomainResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/domain/DomainResultManager.java
syncope git commit: Exclude some eclipse stuff from rat
Repository: syncope Updated Branches: refs/heads/master 18179de19 -> 85843f77c Exclude some eclipse stuff from rat Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/85843f77 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/85843f77 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/85843f77 Branch: refs/heads/master Commit: 85843f77c08f685efca718331405eddfbb69573b Parents: 18179de Author: Colm O hEigeartaighAuthored: Thu Dec 3 15:41:58 2015 + Committer: Colm O hEigeartaigh Committed: Thu Dec 3 15:41:58 2015 + -- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/85843f77/pom.xml -- diff --git a/pom.xml b/pom.xml index 813cb38..3261b33 100644 --- a/pom.xml +++ b/pom.xml @@ -1468,9 +1468,10 @@ under the License. **/maven-eclipse.xml **/*.iml **/*.log -.externalToolBuilders/** +**/.externalToolBuilders/** .git/** .idea/** +**/.settings/** **/.* **/deb/control/conffiles **/deb/control/control
syncope git commit: Exclude some eclipse stuff from rat
Repository: syncope Updated Branches: refs/heads/1_2_X 5ad760bd5 -> 4894fe4c8 Exclude some eclipse stuff from rat Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/4894fe4c Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/4894fe4c Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/4894fe4c Branch: refs/heads/1_2_X Commit: 4894fe4c84e649f5754a782c0dcd12f03fdece9f Parents: 5ad760b Author: Colm O hEigeartaighAuthored: Thu Dec 3 15:41:58 2015 + Committer: Colm O hEigeartaigh Committed: Thu Dec 3 15:43:14 2015 + -- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/4894fe4c/pom.xml -- diff --git a/pom.xml b/pom.xml index fc8a0b6..dd1f8e6 100644 --- a/pom.xml +++ b/pom.xml @@ -1406,9 +1406,10 @@ under the License. **/maven-eclipse.xml **/*.iml **/*.log -.externalToolBuilders/** +**/.externalToolBuilders/** .git/** .idea/** +**/.settings/** **/.* **/deb/control/conffiles **/deb/control/control
syncope git commit: Spelling fix
Repository: syncope Updated Branches: refs/heads/master 449cac5c7 -> 47cdb82e5 Spelling fix Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/47cdb82e Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/47cdb82e Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/47cdb82e Branch: refs/heads/master Commit: 47cdb82e5759d316b627366364cf322a60535932 Parents: 449cac5 Author: Colm O hEigeartaighAuthored: Tue Jun 14 17:19:26 2016 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jun 14 17:19:26 2016 +0100 -- .../console/wizards/resources/AbstractConnConfPanel.properties | 2 +- .../wizards/resources/AbstractConnConfPanel_pt_BR.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/47cdb82e/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel.properties -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel.properties index dc8013d..951b837 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel.properties @@ -15,5 +15,5 @@ # specific language governing permissions and limitations # under the License. check=Check connection -property.empty.list=No connector configuraton property available +property.empty.list=No connector configuration property available error_connection=Connection failure http://git-wip-us.apache.org/repos/asf/syncope/blob/47cdb82e/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel_pt_BR.properties -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel_pt_BR.properties index 24e7b44..232ac9c 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel_pt_BR.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/AbstractConnConfPanel_pt_BR.properties @@ -15,5 +15,5 @@ # specific language governing permissions and limitations # under the License. check=Verificar a Conex\u00e3o -property.empty.list=No connector configuraton property available +property.empty.list=No connector configuration property available error_connection=Falha na Conex\u00e3o
syncope git commit: Using https for the KEYS file + all signatures/digests
Repository: syncope Updated Branches: refs/heads/master 2b0960de5 -> f323bf747 Using https for the KEYS file + all signatures/digests Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f323bf74 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f323bf74 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f323bf74 Branch: refs/heads/master Commit: f323bf747e1a7edcad402e547e6c0ba8e244f5f3 Parents: 2b0960d Author: Colm O hEigeartaighAuthored: Wed May 4 13:56:07 2016 +0100 Committer: Colm O hEigeartaigh Committed: Wed May 4 13:56:07 2016 +0100 -- src/site/xdoc/downloads.xml | 74 1 file changed, 37 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/f323bf74/src/site/xdoc/downloads.xml -- diff --git a/src/site/xdoc/downloads.xml b/src/site/xdoc/downloads.xml index 3a1a915..e74445b 100644 --- a/src/site/xdoc/downloads.xml +++ b/src/site/xdoc/downloads.xml @@ -73,9 +73,9 @@ under the License. http://www.apache.org/dyn/closer.lua/syncope/2.0.0-M2/syncope-2.0.0-M2-source-release.zip;>syncope-2.0.0-M2-source-release.zip -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-2.0.0-M2-source-release.zip.asc;>asc -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-2.0.0-M2-source-release.zip.md5;>md5 -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-2.0.0-M2-source-release.zip.sha1;>sha1 +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-2.0.0-M2-source-release.zip.asc;>asc +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-2.0.0-M2-source-release.zip.md5;>md5 +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-2.0.0-M2-source-release.zip.sha1;>sha1 @@ -83,9 +83,9 @@ under the License. http://www.apache.org/dyn/closer.lua/syncope/2.0.0-M2/syncope-standalone-2.0.0-M2-distribution.zip;>syncope-standalone-2.0.0-M2-distribution.zip -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-standalone-2.0.0-M2-distribution.zip.asc;>asc -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-standalone-2.0.0-M2-distribution.zip.md5;>md5 -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-standalone-2.0.0-M2-distribution.zip.sha1;>sha1 +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-standalone-2.0.0-M2-distribution.zip.asc;>asc +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-standalone-2.0.0-M2-distribution.zip.md5;>md5 +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-standalone-2.0.0-M2-distribution.zip.sha1;>sha1 @@ -93,9 +93,9 @@ under the License. http://www.apache.org/dyn/closer.lua/syncope/2.0.0-M2/syncope-installer-2.0.0-M2-uber.jar;>syncope-installer-2.0.0-M2.jar -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-installer-2.0.0-M2-uber.jar.asc;>asc -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-installer-2.0.0-M2-uber.jar.md5;>md5 -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-installer-2.0.0-M2-uber.jar.sha1;>sha1 +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-installer-2.0.0-M2-uber.jar.asc;>asc +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-installer-2.0.0-M2-uber.jar.md5;>md5 +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-installer-2.0.0-M2-uber.jar.sha1;>sha1 @@ -103,9 +103,9 @@ under the License. http://www.apache.org/dyn/closer.lua/syncope/2.0.0-M2/syncope-client-cli-2.0.0-M2.zip;>syncope-client-cli-2.0.0-M2.zip -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-client-cli-2.0.0-M2.zip.asc;>asc -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-client-cli-2.0.0-M2.zip.md5;>md5 -http://www.apache.org/dist/syncope/2.0.0-M2/syncope-client-cli-2.0.0-M2.zip.sha1;>sha1 +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-client-cli-2.0.0-M2.zip.asc;>asc +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-client-cli-2.0.0-M2.zip.md5;>md5 +https://www.apache.org/dist/syncope/2.0.0-M2/syncope-client-cli-2.0.0-M2.zip.sha1;>sha1 @@ -113,9 +113,9 @@ under the License.
[2/2] syncope git commit: SYNCOPE-909 - Consolidate "Create" functionality
SYNCOPE-909 - Consolidate "Create" functionality Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/377ce234 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/377ce234 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/377ce234 Branch: refs/heads/master Commit: 377ce234bcabd209245e47c706760243c1539db2 Parents: 1b325bb Author: Colm O hEigeartaighAuthored: Wed Jul 27 14:28:27 2016 +0100 Committer: Colm O hEigeartaigh Committed: Wed Jul 27 16:21:34 2016 +0100 -- .../processor/AnyObjectCreateProcessor.java | 64 -- .../camel/processor/CreateProcessor.java| 91 .../camel/processor/GroupCreateProcessor.java | 64 -- .../camel/processor/UserCreateProcessor.java| 69 --- .../src/main/resources/anyObjectRoutes.xml | 4 +- .../src/main/resources/groupRoutes.xml | 4 +- .../src/main/resources/userRoutes.xml | 2 +- .../syncope/fit/core/CamelRouteITCase.java | 4 +- 8 files changed, 98 insertions(+), 204 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/377ce234/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java deleted file mode 100644 index 426ab81..000 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java +++ /dev/null @@ -1,64 +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.provisioning.camel.processor; - -import java.util.List; -import java.util.Set; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.syncope.common.lib.to.AnyObjectTO; -import org.apache.syncope.common.lib.types.AnyTypeKind; -import org.apache.syncope.core.persistence.api.entity.task.PropagationTask; -import org.apache.syncope.core.provisioning.api.WorkflowResult; -import org.apache.syncope.core.provisioning.api.propagation.PropagationManager; -import org.apache.syncope.core.provisioning.api.propagation.PropagationReporter; -import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -@Component -public class AnyObjectCreateProcessor implements Processor { - -@Autowired -protected PropagationManager propagationManager; - -@Autowired -protected PropagationTaskExecutor taskExecutor; - -@SuppressWarnings("unchecked") -@Override -public void process(final Exchange exchange) { -WorkflowResult created = (WorkflowResult) exchange.getIn().getBody(); -AnyObjectTO any = exchange.getProperty("any", AnyObjectTO.class); -Set excludedResources = exchange.getProperty("excludedResources", Set.class); -Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class); - -List tasks = propagationManager.getCreateTasks( -AnyTypeKind.ANY_OBJECT, -created.getResult(), -created.getPropByRes(), -any.getVirAttrs(), -excludedResources); -PropagationReporter propagationReporter = taskExecutor.execute(tasks, nullPriorityAsync); - -exchange.getOut().setBody(new ImmutablePair<>(created.getResult(), propagationReporter.getStatuses())); -} - -}
[1/2] syncope git commit: SYNCOPE-909 - Consolidate update functionality
Repository: syncope Updated Branches: refs/heads/master 1b325bb8e -> 31dc4a280 SYNCOPE-909 - Consolidate update functionality Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/31dc4a28 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/31dc4a28 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/31dc4a28 Branch: refs/heads/master Commit: 31dc4a2806628ac45d33fd8cdb39b8ebabc237e7 Parents: 377ce23 Author: Colm O hEigeartaighAuthored: Wed Jul 27 15:46:45 2016 +0100 Committer: Colm O hEigeartaigh Committed: Wed Jul 27 16:21:34 2016 +0100 -- .../processor/AnyObjectUpdateProcessor.java | 70 --- .../camel/processor/GroupUpdateProcessor.java | 70 --- .../camel/processor/UpdateProcessor.java| 92 .../camel/processor/UserUpdateProcessor.java| 61 - .../src/main/resources/anyObjectRoutes.xml | 4 +- .../src/main/resources/groupRoutes.xml | 4 +- .../src/main/resources/userRoutes.xml | 2 +- 7 files changed, 97 insertions(+), 206 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/31dc4a28/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java deleted file mode 100644 index b42e34e..000 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java +++ /dev/null @@ -1,70 +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.provisioning.camel.processor; - -import java.util.List; -import java.util.Set; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.syncope.common.lib.patch.AnyObjectPatch; -import org.apache.syncope.common.lib.types.AnyTypeKind; -import org.apache.syncope.core.persistence.api.entity.task.PropagationTask; -import org.apache.syncope.core.provisioning.api.VirAttrHandler; -import org.apache.syncope.core.provisioning.api.WorkflowResult; -import org.apache.syncope.core.provisioning.api.propagation.PropagationManager; -import org.apache.syncope.core.provisioning.api.propagation.PropagationReporter; -import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -@Component -public class AnyObjectUpdateProcessor implements Processor { - -@Autowired -protected PropagationManager propagationManager; - -@Autowired -protected PropagationTaskExecutor taskExecutor; - -@Autowired -protected VirAttrHandler virtAttrHandler; - -@SuppressWarnings("unchecked") -@Override -public void process(final Exchange exchange) { -WorkflowResult updated = (WorkflowResult) exchange.getIn().getBody(); -AnyObjectPatch anyObjectPatch = exchange.getProperty("anyPatch", AnyObjectPatch.class); -Set excludedResources = exchange.getProperty("excludedResources", Set.class); -Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class); - -List tasks = propagationManager.getUpdateTasks( -AnyTypeKind.ANY_OBJECT, -updated.getResult(), -false, -null, -updated.getPropByRes(), -anyObjectPatch.getVirAttrs(), -excludedResources); -PropagationReporter propagationReporter = taskExecutor.execute(tasks, nullPriorityAsync); - -
[2/2] syncope git commit: SYCOPE-910 - Introduce new Camel propagation component - part I
SYCOPE-910 - Introduce new Camel propagation component - part I Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6ae50200 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6ae50200 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6ae50200 Branch: refs/heads/master Commit: 6ae5020032be616fcdf44510ea0572586cff0814 Parents: 012f97b Author: Colm O hEigeartaighAuthored: Thu Jul 28 14:08:00 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Jul 28 14:08:00 2016 +0100 -- .../core/provisioning/camel/AnyType.java| 23 .../camel/component/PropagateComponent.java | 71 ++ .../camel/component/PropagateEndpoint.java | 138 +++ .../camel/component/PropagateType.java | 23 .../processor/AnyObjectDeleteProcessor.java | 63 - .../AnyObjectDeprovisionProcessor.java | 68 - .../processor/AnyObjectProvisionProcessor.java | 66 - .../camel/processor/CreateProcessor.java| 91 .../camel/processor/GroupDeleteProcessor.java | 95 - .../processor/GroupDeprovisionProcessor.java| 68 - .../processor/GroupProvisionProcessor.java | 66 - .../camel/processor/UpdateProcessor.java| 92 - .../camel/processor/UserDeleteProcessor.java| 74 -- .../processor/UserDeprovisionProcessor.java | 68 - .../camel/processor/UserProvisionProcessor.java | 93 - .../camel/producer/AbstractProducer.java| 57 .../camel/producer/CreateProducer.java | 86 .../camel/producer/DeleteProducer.java | 118 .../camel/producer/DeprovisionProducer.java | 94 + .../camel/producer/ProvisionProducer.java | 107 ++ .../camel/producer/UpdateProducer.java | 83 +++ .../org/apache/camel/component/propagate| 19 +++ .../src/main/resources/anyObjectRoutes.xml | 10 +- .../src/main/resources/groupRoutes.xml | 10 +- .../src/main/resources/userRoutes.xml | 10 +- .../syncope/fit/core/CamelRouteITCase.java | 4 +- 26 files changed, 836 insertions(+), 861 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/6ae50200/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AnyType.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AnyType.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AnyType.java new file mode 100644 index 000..d1d9b9e --- /dev/null +++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AnyType.java @@ -0,0 +1,23 @@ +/** + * 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.provisioning.camel; + +public enum AnyType { + +user, group, any + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/6ae50200/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java new file mode 100644 index 000..a904b47 --- /dev/null +++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.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. + *
[1/2] syncope git commit: SYCOPE-910 - Introduce new Camel propagation component - part I
Repository: syncope Updated Branches: refs/heads/master 012f97bca -> 6ae502003 http://git-wip-us.apache.org/repos/asf/syncope/blob/6ae50200/ext/camel/provisioning-camel/src/main/resources/META-INF/services/org/apache/camel/component/propagate -- diff --git a/ext/camel/provisioning-camel/src/main/resources/META-INF/services/org/apache/camel/component/propagate b/ext/camel/provisioning-camel/src/main/resources/META-INF/services/org/apache/camel/component/propagate new file mode 100644 index 000..92513e8 --- /dev/null +++ b/ext/camel/provisioning-camel/src/main/resources/META-INF/services/org/apache/camel/component/propagate @@ -0,0 +1,19 @@ +# +# 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. +# +class=org.apache.syncope.core.provisioning.camel.component.PropagateComponent \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/6ae50200/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml -- diff --git a/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml index 5c23f9e..15c457c 100644 --- a/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml +++ b/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml @@ -26,7 +26,7 @@ under the License. - + java.lang.RuntimeException @@ -45,7 +45,7 @@ under the License. - + java.lang.RuntimeException @@ -60,7 +60,7 @@ under the License. - + ${property.statuses} @@ -114,13 +114,13 @@ under the License. - + - + http://git-wip-us.apache.org/repos/asf/syncope/blob/6ae50200/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml -- diff --git a/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml index c76fa61..d21c220 100644 --- a/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml +++ b/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml @@ -26,7 +26,7 @@ under the License. - + java.lang.RuntimeException @@ -64,7 +64,7 @@ under the License. - + java.lang.RuntimeException @@ -79,7 +79,7 @@ under the License. - + ${property.statuses} @@ -133,13 +133,13 @@ under the License. - + - + http://git-wip-us.apache.org/repos/asf/syncope/blob/6ae50200/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml -- diff --git a/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml index aa86463..73564f9 100644 --- a/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml +++ b/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml @@ -27,7 +27,7 @@ under the License. - + java.lang.RuntimeException @@ -46,7 +46,7 @@ under the License. - + java.lang.RuntimeException @@ -83,7 +83,7 @@ under the License. - + ${property.statuses} @@ -188,13 +188,13 @@ under the License. - + - +
syncope git commit: SYNCOPE-910 - Introduce new Camel propagation component - part II
Repository: syncope Updated Branches: refs/heads/master 550145f8e -> 891122c2f SYNCOPE-910 - Introduce new Camel propagation component - part II Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/891122c2 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/891122c2 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/891122c2 Branch: refs/heads/master Commit: 891122c2f3d4ec814eff8df3154ba425ce172335 Parents: 550145f Author: Colm O hEigeartaighAuthored: Fri Jul 29 14:38:53 2016 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jul 29 14:39:28 2016 +0100 -- .../camel/component/PropagateComponent.java | 5 + .../camel/component/PropagateEndpoint.java | 30 +- .../camel/component/PropagateType.java | 2 +- .../processor/GroupCreateInPullProcessor.java | 73 - .../processor/UserConfirmPwdResetProcessor.java | 52 -- .../processor/UserInternalSuspendProcessor.java | 62 --- .../processor/UserSetStatusInPullProcessor.java | 73 - .../UserStatusPropagationProcessor.java | 72 - .../processor/UserUpdateInPullProcessor.java| 60 --- .../camel/producer/AbstractProducer.java| 10 ++ .../producer/ConfirmPasswordResetProducer.java | 48 + .../camel/producer/CreateProducer.java | 40 +-- .../camel/producer/StatusProducer.java | 103 +++ .../camel/producer/SuspendProducer.java | 57 ++ .../camel/producer/UpdateProducer.java | 13 ++- .../src/main/resources/groupRoutes.xml | 4 +- .../src/main/resources/userRoutes.xml | 10 +- 17 files changed, 302 insertions(+), 412 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/891122c2/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java index a904b47..c0728cd 100644 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java +++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java @@ -26,6 +26,7 @@ import org.apache.syncope.core.persistence.api.dao.UserDAO; import org.apache.syncope.core.provisioning.api.data.GroupDataBinder; import org.apache.syncope.core.provisioning.api.propagation.PropagationManager; import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor; +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter; import org.springframework.beans.factory.annotation.Autowired; public class PropagateComponent extends UriEndpointComponent { @@ -48,6 +49,9 @@ public class PropagateComponent extends UriEndpointComponent { @Autowired protected GroupDataBinder groupDataBinder; +@Autowired +protected UserWorkflowAdapter uwfAdapter; + public PropagateComponent() { super(PropagateEndpoint.class); } @@ -63,6 +67,7 @@ public class PropagateComponent extends UriEndpointComponent { endpoint.setGroupDAO(groupDAO); endpoint.setAnyObjectDAO(anyObjectDAO); endpoint.setGroupDataBinder(groupDataBinder); +endpoint.setUwfAdapter(uwfAdapter); setProperties(endpoint, parameters); return endpoint; http://git-wip-us.apache.org/repos/asf/syncope/blob/891122c2/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java index 7dff3a9..e619f91 100644 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java +++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java @@ -33,11 +33,15 @@ import org.apache.syncope.core.provisioning.api.propagation.PropagationManager; import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor; import org.apache.syncope.core.provisioning.camel.AnyType; import
syncope git commit: SYNCOPE-910 - Switching to use AnyTypeKind as per Francesco's comments
Repository: syncope Updated Branches: refs/heads/master 891122c2f -> 575f02b4a SYNCOPE-910 - Switching to use AnyTypeKind as per Francesco's comments Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/575f02b4 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/575f02b4 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/575f02b4 Branch: refs/heads/master Commit: 575f02b4adc0cd868f13a328e195b68146f8d8d4 Parents: 891122c Author: Colm O hEigeartaighAuthored: Fri Jul 29 16:59:35 2016 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jul 29 16:59:35 2016 +0100 -- .../core/provisioning/camel/AnyType.java| 23 .../camel/component/PropagateEndpoint.java | 28 ++-- .../camel/producer/AbstractProducer.java| 12 - .../producer/ConfirmPasswordResetProducer.java | 8 +++--- .../camel/producer/CreateProducer.java | 5 ++-- .../camel/producer/DeleteProducer.java | 11 .../camel/producer/DeprovisionProducer.java | 11 .../camel/producer/ProvisionProducer.java | 13 + .../camel/producer/StatusProducer.java | 9 +++ .../camel/producer/SuspendProducer.java | 8 +++--- .../camel/producer/UpdateProducer.java | 5 ++-- .../src/main/resources/anyObjectRoutes.xml | 10 +++ .../src/main/resources/groupRoutes.xml | 12 - .../src/main/resources/userRoutes.xml | 20 +++--- .../syncope/fit/core/CamelRouteITCase.java | 4 +-- 15 files changed, 75 insertions(+), 104 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/575f02b4/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AnyType.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AnyType.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AnyType.java deleted file mode 100644 index d1d9b9e..000 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AnyType.java +++ /dev/null @@ -1,23 +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.provisioning.camel; - -public enum AnyType { - -user, group, any - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/575f02b4/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java index e619f91..1afb23c 100644 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java +++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java @@ -25,13 +25,13 @@ import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriPath; +import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.core.persistence.api.dao.AnyObjectDAO; import org.apache.syncope.core.persistence.api.dao.GroupDAO; import org.apache.syncope.core.persistence.api.dao.UserDAO; import org.apache.syncope.core.provisioning.api.data.GroupDataBinder; import org.apache.syncope.core.provisioning.api.propagation.PropagationManager; import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor; -import org.apache.syncope.core.provisioning.camel.AnyType; import
syncope git commit: Some grammatical fixes for the reference guide. More to follow.
Repository: syncope Updated Branches: refs/heads/master 0910230d0 -> 15c34e764 Some grammatical fixes for the reference guide. More to follow. Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/15c34e76 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/15c34e76 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/15c34e76 Branch: refs/heads/master Commit: 15c34e7644fb797dff42ab7e9e153d2264da9cd2 Parents: 0910230 Author: Colm O hEigeartaighAuthored: Wed Aug 10 17:05:33 2016 +0100 Committer: Colm O hEigeartaigh Committed: Wed Aug 10 17:05:33 2016 +0100 -- .../architecture/architecture.adoc | 4 ++-- .../reference-guide/architecture/core.adoc | 20 +- .../concepts/typemanagement.adoc| 22 ++-- .../concepts/usersgroupsandanyobjects.adoc | 12 +-- .../identitytechnologies/accessmanagers.adoc| 5 ++--- .../identitytechnologies/identitystores.adoc| 6 +++--- .../identitytechnologies.adoc | 2 +- .../provisioningengines.adoc| 4 ++-- 8 files changed, 37 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/15c34e76/src/main/asciidoc/reference-guide/architecture/architecture.adoc -- diff --git a/src/main/asciidoc/reference-guide/architecture/architecture.adoc b/src/main/asciidoc/reference-guide/architecture/architecture.adoc index 9fc1c6c..c4a1373 100644 --- a/src/main/asciidoc/reference-guide/architecture/architecture.adoc +++ b/src/main/asciidoc/reference-guide/architecture/architecture.adoc @@ -60,5 +60,5 @@ Java < > (the basis of Admin UI, End-user UI and C Eclipse IDE Plugin -The Eclipse IDE plugin allows remote management of notification e-mail and report templates and constitutes an example -of Java application relying on the Client Library for interacting with Core via REST. +The Eclipse IDE plugin allows remote management of notification e-mail and report templates, and constitutes an example +of a Java application relying on the Client Library for interacting with the Core via REST. http://git-wip-us.apache.org/repos/asf/syncope/blob/15c34e76/src/main/asciidoc/reference-guide/architecture/core.adoc -- diff --git a/src/main/asciidoc/reference-guide/architecture/core.adoc b/src/main/asciidoc/reference-guide/architecture/core.adoc index cc2ec2e..c1b302a 100644 --- a/src/main/asciidoc/reference-guide/architecture/core.adoc +++ b/src/main/asciidoc/reference-guide/architecture/core.adoc @@ -35,7 +35,7 @@ Syncope deployment to complement the native features with domain-specific operat An < > is available, providing full http://swagger.io/[Swagger^] features, which enables in-browser access to all the REST endpoints defined. -At technical level, the RESTful interface is a fully-compliant +At a technical level, the RESTful interface is a fully-compliant https://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services[JAX-RS 2.0^] implementation based on http://cxf.apache.org[Apache CXF^], natively dealing both with JSON and XML payloads. @@ -43,9 +43,9 @@ More details are available in the dedicated < > section. Logic -Right below the external interface level, the overall business logic, orchestrating the other layers for implementing -the operations that can be triggered via REST services, and controling some additional features (notifications, -reports and audit over all). +Right below the external interface level, the overall business logic is responsible for orchestrating the other layers, by implementing +the operations that can be triggered via REST services. It is also responsible for controling some additional features (notifications, +reports and auditing). [[provisioning-layer]] Provisioning @@ -65,7 +65,7 @@ The default implementation can be sometimes tailored to meet the requirements of it is the crucial decision point for defining and enforcing the consistency and transformations between internal and external data. -In addition, an http://camel.apache.org/[Apache Camel^]-based implementation is also available as +In addition, an http://camel.apache.org/[Apache Camel^]-based implementation is also available as an < >, which brings all the power of runtime changes and adaptation. [[workflow-layer]] @@ -73,9 +73,9 @@ In addition, an http://camel.apache.org/[Apache Camel^]-based implementation is The Workflow layer is responsible for managing the
syncope git commit: Capitalising some of the concepts
Repository: syncope Updated Branches: refs/heads/master a81d6121d -> 7af5e995d Capitalising some of the concepts Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7af5e995 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7af5e995 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7af5e995 Branch: refs/heads/master Commit: 7af5e995d60f30b500f4496ea3672c67d2a51d01 Parents: a81d612 Author: Colm O hEigeartaighAuthored: Thu Aug 11 11:49:58 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Aug 11 11:49:58 2016 +0100 -- .../asciidoc/getting-started/introduction.adoc | 12 .../getting-started/systemRequirements.adoc | 2 +- .../reference-guide/architecture/core.adoc | 8 +++--- .../reference-guide/concepts/entitlements.adoc | 4 +-- .../concepts/externalresources.adoc | 20 ++--- .../reference-guide/concepts/policies.adoc | 28 +- .../concepts/provisioning/propagation.adoc | 10 +++ .../concepts/provisioning/provisioning.adoc | 2 +- .../concepts/provisioning/pull.adoc | 10 +++ .../concepts/provisioning/push.adoc | 4 +-- .../reference-guide/concepts/realms.adoc| 16 +-- .../reference-guide/concepts/roles.adoc | 10 +++ .../concepts/typemanagement.adoc| 30 ++-- .../concepts/usersgroupsandanyobjects.adoc | 20 ++--- .../reference-guide/concepts/workflow.adoc | 6 ++-- .../identitytechnologies/accessmanagers.adoc| 4 +-- .../identitytechnologies/identitystores.adoc| 8 +++--- .../provisioningengines.adoc| 8 +++--- .../thecompletepicture.adoc | 2 +- .../reference-guide/reference-guide.adoc| 2 +- .../adminconsole/configuration.adoc | 4 +-- .../adminconsole/dashboard.adoc | 4 +-- .../adminconsole/extensions.adoc| 2 +- .../adminconsole/realms.adoc| 4 +-- .../workingwithapachesyncope/cli/group.adoc | 6 ++-- .../workingwithapachesyncope/cli/user.adoc | 16 +-- 26 files changed, 121 insertions(+), 121 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/7af5e995/src/main/asciidoc/getting-started/introduction.adoc -- diff --git a/src/main/asciidoc/getting-started/introduction.adoc b/src/main/asciidoc/getting-started/introduction.adoc index bb06b5e..88f27c3 100644 --- a/src/main/asciidoc/getting-started/introduction.adoc +++ b/src/main/asciidoc/getting-started/introduction.adoc @@ -50,10 +50,10 @@ In brief, Identity Management takes care of managing identity data throughout wh [.text-center] image::identityLifecycle.png[title="Identity Lifecycle",alt="Identity Lifecycle",width="505",height="324"] -.Users, groups and any objects +.Users, Groups and Any Objects -With Apache Syncope 2.0.0, the managed identities are not limited anymore to users and groups. New object types can be -defined so that any objects data can be managed through Syncope: workstations, printers, folders, sensors, services, +With Apache Syncope 2.0.0, the managed identities are not limited anymore to Users and Groups. New object types can be +defined so that Any Object's data can be managed through Syncope: workstations, printers, folders, sensors, services, and so on. This positions Apache Syncope at the forefront for bringing Identity Management in the IoT world. @@ -65,7 +65,7 @@ image::iam-scenario.png[title="IAM Scenario",alt="IAM Scenario"] The picture above shows the tecnologies involved in a complete IAM solution: * *_Identity Store_* (as RDBMS, LDAP, Active Directory, meta- and virtual-directories) - the repository for account data -* *_Provisioning Engine_* - synchronizes account data across identity stores and a broad range of data formats, models, +* *_Provisioning Engine_* - synchronizes account data across Identity Stores and a broad range of data formats, models, meanings and purposes * *_Access Manager_* - access mediator to all applications, focused on application front-end, taking care of authentication (https://en.wikipedia.org/wiki/Single_sign-on[Single Sign-On^]), authorization @@ -79,7 +79,7 @@ From a technology point of view, *Apache Syncope* is primarily a *Provisioning E Aren't Identity Stores enough? -One might suppose that a single identity store can solve all the identity needs inside an organization, but there +One might suppose that a single Identity Store can solve all the identity needs inside an organization, but there are a few drawbacks with this approach: .
syncope git commit: Fixing issue raised by Francesco
Repository: syncope Updated Branches: refs/heads/master dae8e14a7 -> a81d6121d Fixing issue raised by Francesco Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a81d6121 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a81d6121 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a81d6121 Branch: refs/heads/master Commit: a81d6121d18479c275ada58cdb2bbd8f8b8072b6 Parents: dae8e14 Author: Colm O hEigeartaighAuthored: Thu Aug 11 11:33:27 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Aug 11 11:33:27 2016 +0100 -- src/main/asciidoc/reference-guide/concepts/typemanagement.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/a81d6121/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc b/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc index 044f196..e0878db 100644 --- a/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc +++ b/src/main/asciidoc/reference-guide/concepts/typemanagement.adoc @@ -154,7 +154,7 @@ given user / group / any object instance) and for < > can be selected so that instances af a given any type will +For all any types that are defined, a set of < > can be selected so that instances af a given any type will be enabled to populate attributes for schemas in those classes. .Any types and attributes allowed for users, groups and any objects
syncope git commit: Docs updates for entitlements, roles, realms + provisioning
Repository: syncope Updated Branches: refs/heads/master 85945187a -> 7ce6dbce3 Docs updates for entitlements, roles, realms + provisioning Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7ce6dbce Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7ce6dbce Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7ce6dbce Branch: refs/heads/master Commit: 7ce6dbce398d8be5f177e487e77f283ba64966bc Parents: 8594518 Author: Colm O hEigeartaighAuthored: Fri Aug 12 11:03:31 2016 +0100 Committer: Colm O hEigeartaigh Committed: Fri Aug 12 11:03:58 2016 +0100 -- .../reference-guide/concepts/entitlements.adoc | 2 +- .../concepts/provisioning/propagation.adoc | 10 .../concepts/provisioning/provisioning.adoc | 7 +++--- .../concepts/provisioning/pull.adoc | 14 ++-- .../concepts/provisioning/push.adoc | 4 ++-- .../reference-guide/concepts/realms.adoc| 24 ++-- .../reference-guide/concepts/roles.adoc | 10 7 files changed, 35 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/7ce6dbce/src/main/asciidoc/reference-guide/concepts/entitlements.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/entitlements.adoc b/src/main/asciidoc/reference-guide/concepts/entitlements.adoc index f5c4e7f..4e61616 100644 --- a/src/main/asciidoc/reference-guide/concepts/entitlements.adoc +++ b/src/main/asciidoc/reference-guide/concepts/entitlements.adoc @@ -59,5 +59,5 @@ endif::[] ifeval::["{snapshotOrRelease}" == "snapshot"] https://github.com/apache/syncope/blob/master/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/types/CamelEntitlement.java[enlarge the initial list^] endif::[] -: this because entitlements are the pillars of internal security model and not meant for external usage. +: this is because entitlements are the pillars of the internal security model and are not meant for external usage. http://git-wip-us.apache.org/repos/asf/syncope/blob/7ce6dbce/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc b/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc index 30b14a5..928fa67 100644 --- a/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc +++ b/src/main/asciidoc/reference-guide/concepts/provisioning/propagation.adoc @@ -30,9 +30,9 @@ out, via connectors, to the configured Identity Stores; the tasks can be saved f Depending on the entity being created / updated / deleted, different external resources are taken into account by the propagation process: -* *group*: only the external resources directly assigned -* *user*: the external resources directly assigned plus the ones assigned to Groups configured for the user -* *any object*: the external resources directly assigned plus the ones assigned to Groups configured for the Any Object +* *Group*: only the external resources directly assigned +* *User*: the external resources directly assigned plus the ones assigned to Groups configured for the User +* *Any Object*: the external resources directly assigned plus the ones assigned to Groups configured for the Any Object By default, the propagation process is controlled by the @@ -48,7 +48,7 @@ which implements the following logic: * tasks for resources with no priority are executed afterwards, concurrently * the execution of a given set of tasks is halted (and global failure is reported) whenever the first sequential task fails -* status and eventual error message (in case of no resource priority) can be saved for reporting, in case the related +* status and eventual error message (in case of no resource priority) can be saved for reporting, in the case where the related external resource was configured with adequate tracing * minimize the set of operations to be actually performed onto the Identity Store by attempting to read the external object corresponding to the internal entity and comparing with the modifications provided @@ -86,7 +86,7 @@ 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^] endif::[] -| If user is associated to group in Syncope, keeps the corresponding user as member of the corresponding group on LDAP. +| If a User is associated with a Group
syncope git commit: More grammatical work on the reference guide
Repository: syncope Updated Branches: refs/heads/master 9aea42ba0 -> dae8e14a7 More grammatical work on the reference guide Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/dae8e14a Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/dae8e14a Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/dae8e14a Branch: refs/heads/master Commit: dae8e14a747b1501072a6cce991f954e01dc6098 Parents: 9aea42b Author: Colm O hEigeartaighAuthored: Thu Aug 11 11:05:03 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Aug 11 11:05:03 2016 +0100 -- .../concepts/externalresources.adoc | 40 ++-- .../concepts/typemanagement.adoc| 31 +++ 2 files changed, 36 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/dae8e14a/src/main/asciidoc/reference-guide/concepts/externalresources.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/externalresources.adoc b/src/main/asciidoc/reference-guide/concepts/externalresources.adoc index 0fc4f9a..ef2cdd4 100644 --- a/src/main/asciidoc/reference-guide/concepts/externalresources.adoc +++ b/src/main/asciidoc/reference-guide/concepts/externalresources.adoc @@ -23,7 +23,7 @@ Connector Bundles:: The components able to connect to identity stores; not speci as they are part of the http://connid.tirasa.net[ConnId^] project. Connector Instances:: Instances of connector bundles, obtained by assigning values to the defined configuration properties. For instance, there is only a single `DatabaseTable` (the bundle) that can be instantiated -several times, for example if there is need to connect to different databases. +several times, for example if there is a need to connect to different databases. External Resources:: Meant to encapsulate all information about how Apache Syncope will use connector instances for provisioning. For each entity supported by the related connector bundle (user, group, printer, services, ...), < > information can be specified. @@ -46,7 +46,7 @@ be JDBC URL, table name, etc. * capabilities - define what operations are allowed on this connector: during < >, if a certain operation is invoked but the corresponding capability is not set on the related connector instance, no actual action is performed on the underlying connector; the capabilities are: -** `AUTHENTICATE` - consent < > +** `AUTHENTICATE` - consent to < > ** `CREATE` - create objects on the underlying connector ** `UPDATE` - update objects on the underlying connector ** `DELETE` - delete objects on the underlying connector @@ -61,16 +61,16 @@ action is performed on the underlying connector; the capabilities are: Capabilities and individual configuration properties can be set for _override_: in this case, all the external resources using the given connector instance will have the chance to override some configuration values, or the capabilities set. -This can be useful when the same connector instance is shared among different resources, with small difference in the +This can be useful when the same connector instance is shared among different resources, with little difference in the required configuration or capabilities. External Resource details -Given a selected connector instance, the following information is required for defining an external resource: +Given a selected connector instance, the following information is required to define an external resource: * priority - integer value, in use by the default < > -* generate random password flag - under some circumstances, password might be mandatory but no actual value could be +* generate random password flag - under some circumstances, a password might be mandatory but no actual value could be available: with this flag set, a random value will be generated, compliant with the defined < > (if set) * propagation actions - which < > shall be executed during propagation @@ -89,19 +89,19 @@ resource Mapping -One of the most crucial information to provide, when configuring an external resource, is the mapping between internal -and external data. Such information, in fact, plays a key role for < >. +The mapping between internal and external data is of crucial importance when +configuring an external resource. Such information, in fact, plays a key role for
syncope git commit: Removing some warnings in eclipse for the Camel provisioning code
Repository: syncope Updated Branches: refs/heads/master 5d95efacd -> 10084166e Removing some warnings in eclipse for the Camel provisioning code Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/10084166 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/10084166 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/10084166 Branch: refs/heads/master Commit: 10084166e98de99adaa4038bee0da0c9155da420 Parents: 5d95efa Author: Colm O hEigeartaighAuthored: Tue Jul 12 14:25:34 2016 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jul 12 14:25:34 2016 +0100 -- .../camel/processor/AnyObjectCreateProcessor.java | 2 +- .../camel/processor/AnyObjectUpdateProcessor.java | 2 +- .../camel/processor/GroupCreateInPullProcessor.java | 2 +- .../provisioning/camel/processor/GroupCreateProcessor.java| 2 +- .../provisioning/camel/processor/GroupUpdateProcessor.java| 6 +- .../camel/processor/UserConfirmPwdResetProcessor.java | 3 ++- .../provisioning/camel/processor/UserCreateProcessor.java | 7 ++- .../camel/processor/UserInternalSuspendProcessor.java | 3 ++- .../camel/processor/UserSetStatusInPullProcessor.java | 5 - .../camel/processor/UserStatusPropagationProcessor.java | 2 +- .../camel/processor/UserUpdateInPullProcessor.java| 3 ++- .../provisioning/camel/processor/UserUpdateProcessor.java | 3 ++- 12 files changed, 20 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/10084166/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java index c35c4a5..423981f 100644 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java +++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectCreateProcessor.java @@ -46,7 +46,7 @@ public class AnyObjectCreateProcessor implements Processor { @SuppressWarnings("unchecked") @Override public void process(final Exchange exchange) { -WorkflowResult created = (WorkflowResult) exchange.getIn().getBody(); +WorkflowResult created = (WorkflowResult) exchange.getIn().getBody(); AnyObjectTO any = exchange.getProperty("any", AnyObjectTO.class); Set excludedResources = exchange.getProperty("excludedResources", Set.class); Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class); http://git-wip-us.apache.org/repos/asf/syncope/blob/10084166/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java index 3564aeb..efd7635 100644 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java +++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/AnyObjectUpdateProcessor.java @@ -50,7 +50,7 @@ public class AnyObjectUpdateProcessor implements Processor { @SuppressWarnings("unchecked") @Override public void process(final Exchange exchange) { -WorkflowResult updated = (WorkflowResult) exchange.getIn().getBody(); +WorkflowResult updated = (WorkflowResult) exchange.getIn().getBody(); AnyObjectPatch anyObjectPatch = exchange.getProperty("anyPatch", AnyObjectPatch.class); Set excludedResources = exchange.getProperty("excludedResources", Set.class); Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class); http://git-wip-us.apache.org/repos/asf/syncope/blob/10084166/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupCreateInPullProcessor.java -- diff --git
syncope git commit: Fix error message if description is left out when specifying a policy
Repository: syncope Updated Branches: refs/heads/master d9eff39ed -> 209459d0c Fix error message if description is left out when specifying a policy Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/209459d0 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/209459d0 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/209459d0 Branch: refs/heads/master Commit: 209459d0cc6816e4d33bf18c0a8a6b808f70ce6c Parents: d9eff39 Author: Colm O hEigeartaighAuthored: Wed Jul 6 12:37:12 2016 +0100 Committer: Colm O hEigeartaigh Committed: Wed Jul 6 12:37:12 2016 +0100 -- .../client/console/policies/PolicyModalPanelBuilder.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/209459d0/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java index b5bf2af..93c9f8d 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java @@ -35,6 +35,7 @@ import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPan import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel; import org.apache.syncope.client.console.wicket.markup.html.form.AjaxSpinnerFieldPanel; import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel; +import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel; import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.common.lib.policy.AbstractPolicyTO; @@ -101,8 +102,11 @@ public class PolicyModalPanelBuilder extends Abstrac final List components = new ArrayList<>(); -components.add(new AjaxTextFieldPanel( -"field", "description", new PropertyModel(policyTO, "description"), false)); +FieldPanel description = +new AjaxTextFieldPanel("field", "description", + new PropertyModel(policyTO, "description"), false); +description.setRequired(true); +components.add(description); if (policyTO instanceof AccountPolicyTO) { components.add(new AjaxSpinnerFieldPanel.Builder().build(
[2/2] syncope git commit: Grammatical fix
Grammatical fix Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f97d4fd3 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f97d4fd3 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f97d4fd3 Branch: refs/heads/master Commit: f97d4fd39b7c0e8f18cd02f5bd2cf14b8b71e242 Parents: 54e873f Author: Colm O hEigeartaighAuthored: Thu Jul 7 17:14:25 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Jul 7 17:14:25 2016 +0100 -- .../persistence-jpa/src/main/resources/domains/MasterContent.xml | 4 ++-- .../persistence-jpa/src/test/resources/domains/MasterContent.xml | 4 ++-- core/persistence-jpa/src/test/resources/domains/TwoContent.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/f97d4fd3/core/persistence-jpa/src/main/resources/domains/MasterContent.xml -- diff --git a/core/persistence-jpa/src/main/resources/domains/MasterContent.xml b/core/persistence-jpa/src/main/resources/domains/MasterContent.xml index 675a30c..c534a44 100644 --- a/core/persistence-jpa/src/main/resources/domains/MasterContent.xml +++ b/core/persistence-jpa/src/main/resources/domains/MasterContent.xml @@ -166,13 +166,13 @@ a password reset was request for ${user.getUsername()}./p /html"/> http://git-wip-us.apache.org/repos/asf/syncope/blob/f97d4fd3/core/persistence-jpa/src/test/resources/domains/MasterContent.xml -- diff --git a/core/persistence-jpa/src/test/resources/domains/MasterContent.xml b/core/persistence-jpa/src/test/resources/domains/MasterContent.xml index ed9edad..ff84934 100644 --- a/core/persistence-jpa/src/test/resources/domains/MasterContent.xml +++ b/core/persistence-jpa/src/test/resources/domains/MasterContent.xml @@ -1178,13 +1178,13 @@ a password reset was request for ${user.getUsername()}./p /html"/> http://git-wip-us.apache.org/repos/asf/syncope/blob/f97d4fd3/core/persistence-jpa/src/test/resources/domains/TwoContent.xml -- diff --git a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml b/core/persistence-jpa/src/test/resources/domains/TwoContent.xml index ba726c6..437debc 100644 --- a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml +++ b/core/persistence-jpa/src/test/resources/domains/TwoContent.xml @@ -143,13 +143,13 @@ a password reset was request for ${user.getUsername()}./p /html"/>
[1/2] syncope git commit: Get rid of the whitespace in the user creation camel route in the UI
Repository: syncope Updated Branches: refs/heads/master f8212ae2b -> f97d4fd39 Get rid of the whitespace in the user creation camel route in the UI Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/54e873fe Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/54e873fe Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/54e873fe Branch: refs/heads/master Commit: 54e873fe2835c8311b909f791965129b7a2d85d9 Parents: f8212ae Author: Colm O hEigeartaighAuthored: Thu Jul 7 16:23:46 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Jul 7 16:23:46 2016 +0100 -- ext/camel/provisioning-camel/src/main/resources/userRoutes.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/54e873fe/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml -- diff --git a/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml index e218b68..d0d7c77 100644 --- a/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml +++ b/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml @@ -25,8 +25,8 @@ under the License. ${body} - +
syncope git commit: Enabling secure processing on DBF + TF instances
Repository: syncope Updated Branches: refs/heads/master 209459d0c -> ce0621c6a Enabling secure processing on DBF + TF instances Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ce0621c6 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ce0621c6 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ce0621c6 Branch: refs/heads/master Commit: ce0621c6ae7ce5ef77c69f30dcc1e6f8de5991e3 Parents: 209459d Author: Colm O hEigeartaighAuthored: Wed Jul 6 15:01:30 2016 +0100 Committer: Colm O hEigeartaigh Committed: Wed Jul 6 15:01:30 2016 +0100 -- .../java/org/apache/syncope/client/cli/util/XMLUtils.java | 10 -- .../syncope/core/logic/report/ReportJobDelegate.java | 1 + .../core/persistence/jpa/content/XMLContentExporter.java | 1 + .../apache/syncope/core/logic/init/CamelRouteLoader.java | 2 ++ .../syncope/installer/utilities/FileSystemUtils.java | 1 + .../apache/syncope/installer/utilities/MavenUtils.java| 1 + 6 files changed, 14 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/ce0621c6/client/cli/src/main/java/org/apache/syncope/client/cli/util/XMLUtils.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/util/XMLUtils.java b/client/cli/src/main/java/org/apache/syncope/client/cli/util/XMLUtils.java index ba50431..ad3cf39 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/util/XMLUtils.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/util/XMLUtils.java @@ -37,8 +37,14 @@ public final class XMLUtils { public static void createXMLFile(final InputStream sis, final String filePath) throws TransformerException, SAXException, IOException, ParserConfigurationException { -TransformerFactory.newInstance().newTransformer(). -transform(new DOMSource(DocumentBuilderFactory.newInstance().newDocumentBuilder(). +DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); +dbf.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true); + +TransformerFactory tf = TransformerFactory.newInstance(); +tf.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true); + +tf.newTransformer(). +transform(new DOMSource(dbf.newDocumentBuilder(). parse(new InputSource(new StringReader(IOUtils.toString(sis), new StreamResult(new File(filePath))); } http://git-wip-us.apache.org/repos/asf/syncope/blob/ce0621c6/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReportJobDelegate.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReportJobDelegate.java b/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReportJobDelegate.java index 2d040d9..a87c1de 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReportJobDelegate.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReportJobDelegate.java @@ -104,6 +104,7 @@ public class ReportJobDelegate { zos.setLevel(Deflater.BEST_COMPRESSION); try { SAXTransformerFactory tFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); + tFactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true); handler = tFactory.newTransformerHandler(); Transformer serializer = handler.getTransformer(); serializer.setOutputProperty(OutputKeys.ENCODING, SyncopeConstants.DEFAULT_ENCODING); http://git-wip-us.apache.org/repos/asf/syncope/blob/ce0621c6/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java -- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java index 0e7d059..4f7c3a4 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java @@ -316,6 +316,7 @@ public class XMLContentExporter extends AbstractContentDealer implements Content StreamResult streamResult = new StreamResult(os); final SAXTransformerFactory transformerFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); +
syncope git commit: Remove some unneeded variable declarations (= null etc)
Repository: syncope Updated Branches: refs/heads/master 9ad62a344 -> 3712f1c3b Remove some unneeded variable declarations (= null etc) Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3712f1c3 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3712f1c3 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3712f1c3 Branch: refs/heads/master Commit: 3712f1c3bae3b25be8d35b9540f300da5babd2ca Parents: 9ad62a3 Author: Colm O hEigeartaighAuthored: Tue Feb 14 09:55:57 2017 + Committer: Colm O hEigeartaigh Committed: Tue Feb 14 09:55:57 2017 + -- .../java/org/apache/syncope/client/cli/util/JasyptUtils.java | 2 +- .../apache/syncope/client/console/commons/status/StatusBean.java | 2 +- .../syncope/client/console/panels/ConnObjectListViewPanel.java | 2 +- .../apache/syncope/client/console/panels/StartAtTogglePanel.java | 2 +- .../syncope/client/console/tasks/SchedTaskWizardBuilder.java | 2 +- .../client/console/wicket/markup/html/form/FieldPanel.java | 4 ++-- .../syncope/client/console/widgets/reconciliation/Anys.java | 2 +- .../client/console/wizards/AbstractModalPanelBuilder.java| 2 +- .../org/apache/syncope/client/console/wizards/AjaxWizard.java| 4 ++-- .../main/java/org/apache/syncope/core/logic/ResourceLogic.java | 2 +- .../syncope/core/persistence/jpa/content/MultiParentNode.java| 2 +- .../apache/syncope/core/persistence/jpa/entity/user/JPAUser.java | 2 +- .../provisioning/java/pushpull/AbstractPullResultHandler.java| 2 +- .../provisioning/java/pushpull/RealmPullResultHandlerImpl.java | 2 +- .../syncope/core/provisioning/camel/SyncopeCamelContext.java | 2 +- .../org/apache/syncope/fit/core/reference/TestPullActions.java | 2 +- .../src/test/java/org/apache/syncope/fit/console/LogsITCase.java | 2 +- .../java/org/apache/syncope/installer/utilities/InstallLog.java | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/3712f1c3/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java b/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java index 0ddd9bf..0f31de0 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java @@ -26,7 +26,7 @@ public final class JasyptUtils { private final BasicTextEncryptor textEncryptor; -private static JasyptUtils JASYPT_UTILS = null; +private static JasyptUtils JASYPT_UTILS; public static JasyptUtils get() { if (JASYPT_UTILS == null) { http://git-wip-us.apache.org/repos/asf/syncope/blob/3712f1c3/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java index 3f1afd1..a34425a 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java @@ -37,7 +37,7 @@ public class StatusBean implements Serializable { private final String resourceName; -private String connObjectLink = null; +private String connObjectLink; private Status status = Status.OBJECT_NOT_FOUND; http://git-wip-us.apache.org/repos/asf/syncope/blob/3712f1c3/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectListViewPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectListViewPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectListViewPanel.java index 45ddb35..327c007 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectListViewPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectListViewPanel.java @@ -49,7 +49,7 @@ public abstract class ConnObjectListViewPanel extends Panel { private static final int SIZE = 10; -private String nextPageCookie = null; +private String nextPageCookie; protected ConnObjectListViewPanel( final String id,
syncope git commit: More work on the docs - notifications, policies, workflow.
Repository: syncope Updated Branches: refs/heads/master 9c3180662 -> d9848ecd6 More work on the docs - notifications, policies, workflow. Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d9848ecd Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d9848ecd Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d9848ecd Branch: refs/heads/master Commit: d9848ecd605c87da2644722d008a3b815ee06f1b Parents: 9c31806 Author: Colm O hEigeartaighAuthored: Thu Aug 25 11:56:08 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Aug 25 11:56:24 2016 +0100 -- .../reference-guide/concepts/notifications.adoc | 12 +-- .../reference-guide/concepts/policies.adoc | 82 ++-- .../reference-guide/concepts/workflow.adoc | 12 +-- 3 files changed, 53 insertions(+), 53 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/d9848ecd/src/main/asciidoc/reference-guide/concepts/notifications.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/notifications.adoc b/src/main/asciidoc/reference-guide/concepts/notifications.adoc index 2646603..988e6ab 100644 --- a/src/main/asciidoc/reference-guide/concepts/notifications.adoc +++ b/src/main/asciidoc/reference-guide/concepts/notifications.adoc @@ -51,7 +51,7 @@ of the generated < > Notification Events -Notification (and < >) events are essentially a mean to identify the invocation of specific methods +Notification (and < >) events are essentially a means of identifying the invocation of specific methods within the <>, in line with _join points_ in the https://en.wikipedia.org/wiki/Aspect-oriented_programming[Aspect Oriented Programming (AOP)^]. @@ -70,7 +70,7 @@ for `TASK` the various <> Tasks configured, for `PROPAGATION`, `PU . event type - the final identification of the event; depends on the other coordinates . success or failure - whether the current event shall be considered in case of success or failure -The admin console provides < > for assisted specification of valid events. +The admin console provides < > to assist with the specification of valid events. [TIP] @@ -94,7 +94,7 @@ successful execution of the event identified by the `unexpected identification` [NOTE] -Custom events can be used when in need of triggering notifications from non-predefined joint points, as BPMN `userTask` +Custom events can be used to trigger notifications from non-predefined joint points, as BPMN `userTask` instances within the <>, <>, <>, <> or other custom code. @@ -106,13 +106,13 @@ to be used respectively for plaintext and HTML e-mails, and is available for sel [NOTE] -Notification templates can be easily managed either via < > or -<>. +Notification templates can be easily managed either via the < > or +the <>. The full power of JEXL expressions - see http://commons.apache.org/proper/commons-jexl/reference/syntax.html[reference^] and http://commons.apache.org/proper/commons-jexl/reference/examples.html[some examples^] - is available. + -Among others, the `user` variable, instance of +For example, the `user` variable, an instance of ifeval::["{snapshotOrRelease}" == "release"] https://github.com/apache/syncope/blob/syncope-{docVersion}/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java[UserTO^] endif::[] http://git-wip-us.apache.org/repos/asf/syncope/blob/d9848ecd/src/main/asciidoc/reference-guide/concepts/policies.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/policies.adoc b/src/main/asciidoc/reference-guide/concepts/policies.adoc index c18fece..694bfa4 100644 --- a/src/main/asciidoc/reference-guide/concepts/policies.adoc +++ b/src/main/asciidoc/reference-guide/concepts/policies.adoc @@ -18,37 +18,37 @@ // === Policies -Policies control different aspects of the < > process and can be used to fine-tune and adapt -the overall mechanism to the particularities of the spefic domain in which a given Apache Syncope deployment is running. +Policies control different aspects of the < > process. They can be used to fine-tune and adapt +the overall mechanism to the particularities of the specific domain in which a given Apache Syncope deployment is running. [[policy-composition]] [TIP] .Policy
syncope git commit: SYNCOPE-929 - Braces are ignored for FIQL strings. Tests added.
Repository: syncope Updated Branches: refs/heads/1_2_X d3c779f6b -> 8a916bf1e SYNCOPE-929 - Braces are ignored for FIQL strings. Tests added. Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8a916bf1 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8a916bf1 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8a916bf1 Branch: refs/heads/1_2_X Commit: 8a916bf1e5c7ab0811dfb655653f4dee84e83f7a Parents: d3c779f Author: Colm O hEigeartaighAuthored: Mon Sep 5 12:16:57 2016 +0100 Committer: Colm O hEigeartaigh Committed: Mon Sep 5 14:50:14 2016 +0100 -- .../dao/impl/SubjectSearchDAOImpl.java | 14 +++--- .../persistence/dao/AttributableSearchTest.java | 27 .../syncope/core/rest/SearchTestITCase.java | 13 ++ 3 files changed, 50 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/8a916bf1/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/SubjectSearchDAOImpl.java -- diff --git a/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/SubjectSearchDAOImpl.java b/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/SubjectSearchDAOImpl.java index 0b1dfd8..00ba41a 100644 --- a/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/SubjectSearchDAOImpl.java +++ b/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/SubjectSearchDAOImpl.java @@ -426,17 +426,23 @@ public class SubjectSearchDAOImpl extends AbstractDAOImpl implements SubjectSear break; case AND: -query.append(getQuery(nodeCond.getLeftNodeCond(), parameters, type, svs)). +String andSubQuery = getQuery(nodeCond.getLeftNodeCond(), parameters, type, svs).toString(); +// Add extra parentheses +andSubQuery = andSubQuery.replaceFirst("WHERE ", "WHERE ("); +query.append(andSubQuery). append(" AND subject_id IN ( "). append(getQuery(nodeCond.getRightNodeCond(), parameters, type, svs)). -append(")"); +append("))"); break; case OR: -query.append(getQuery(nodeCond.getLeftNodeCond(), parameters, type, svs)). +String orSubQuery = getQuery(nodeCond.getLeftNodeCond(), parameters, type, svs).toString(); +// Add extra parentheses +orSubQuery = orSubQuery.replaceFirst("WHERE ", "WHERE ("); +query.append(orSubQuery). append(" OR subject_id IN ( "). append(getQuery(nodeCond.getRightNodeCond(), parameters, type, svs)). -append(")"); +append("))"); break; default: http://git-wip-us.apache.org/repos/asf/syncope/blob/8a916bf1/core/src/test/java/org/apache/syncope/core/persistence/dao/AttributableSearchTest.java -- diff --git a/core/src/test/java/org/apache/syncope/core/persistence/dao/AttributableSearchTest.java b/core/src/test/java/org/apache/syncope/core/persistence/dao/AttributableSearchTest.java index 259b522..df91642 100644 --- a/core/src/test/java/org/apache/syncope/core/persistence/dao/AttributableSearchTest.java +++ b/core/src/test/java/org/apache/syncope/core/persistence/dao/AttributableSearchTest.java @@ -478,4 +478,31 @@ public class AttributableSearchTest { assertNotNull(count); assertTrue(count > 0); } + +@Test +public void issueSYNCOPE929() { +AttributeCond rossiniCond = new AttributeCond(AttributeCond.Type.EQ); +rossiniCond.setSchema("surname"); +rossiniCond.setExpression("Rossini"); + +AttributeCond genderCond = new AttributeCond(AttributeCond.Type.EQ); +genderCond.setSchema("gender"); +genderCond.setExpression("M"); + +SearchCond orCond = +SearchCond.getOrCond(SearchCond.getLeafCond(rossiniCond), + SearchCond.getLeafCond(genderCond)); + +AttributeCond belliniCond = new AttributeCond(AttributeCond.Type.EQ); +belliniCond.setSchema("surname"); +belliniCond.setExpression("Bellini"); + +SearchCond searchCond = +SearchCond.getAndCond(orCond, SearchCond.getLeafCond(belliniCond)); + +List users = searchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()), +searchCond, SubjectType.USER); +assertNotNull(users); +assertEquals(1, users.size()); +}
syncope git commit: SYNCOPE-931 - Restart Camel Context after update
Repository: syncope Updated Branches: refs/heads/master 20aa1d77c -> aa90d8408 SYNCOPE-931 - Restart Camel Context after update Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/aa90d840 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/aa90d840 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/aa90d840 Branch: refs/heads/master Commit: aa90d840817101847626fed6e1388779d51d631a Parents: 20aa1d7 Author: Colm O hEigeartaighAuthored: Tue Sep 6 17:07:26 2016 +0100 Committer: Colm O hEigeartaigh Committed: Tue Sep 6 17:08:44 2016 +0100 -- .../core/provisioning/camel/SyncopeCamelContext.java | 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/aa90d840/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/SyncopeCamelContext.java -- diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/SyncopeCamelContext.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/SyncopeCamelContext.java index d034f08..d57c421 100644 --- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/SyncopeCamelContext.java +++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/SyncopeCamelContext.java @@ -109,6 +109,16 @@ public class SyncopeCamelContext { } else if (!camelContext.getRouteDefinitions().isEmpty()) { camelContext.getRouteDefinitions().remove(camelContext.getRouteDefinition(routeKey)); loadContext(Collections.singletonList(routeDAO.find(routeKey))); + +// Start the Camel Context if it's stopped, as maybe this update fixes a previous route error which +// caused startup to fail +if (camelContext.isStopped()) { +try { +camelContext.start(); +} catch (Exception e) { +LOG.error("While restarting Camel context", e); +} +} } }
syncope git commit: A few changes to the migration guide
Repository: syncope Updated Branches: refs/heads/master e83cac047 -> 10ed64658 A few changes to the migration guide Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/10ed6465 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/10ed6465 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/10ed6465 Branch: refs/heads/master Commit: 10ed646583e9545c80a13590875e4d9e77d32082 Parents: e83cac0 Author: Colm O hEigeartaighAuthored: Thu Sep 8 12:40:39 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Sep 8 12:40:39 2016 +0100 -- .../workingwithapachesyncope/migration.adoc | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/10ed6465/src/main/asciidoc/reference-guide/workingwithapachesyncope/migration.adoc -- diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/migration.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/migration.adoc index 5d85c61..7d891e3 100644 --- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/migration.adoc +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/migration.adoc @@ -19,9 +19,9 @@ === Migration from Apache Syncope 1.2 Apache Syncope 2.0 brings -https://cwiki.apache.org/confluence/display/SYNCOPE/Jazz[several enhancements and new features^], compared to 1.2. +https://cwiki.apache.org/confluence/display/SYNCOPE/Jazz[several enhancements and new features^], compared to the 1.2 release. -For this reason, it is not possible to _update_ an existing 1.2 deployment but it is rather necessary to _migrate_ the +For this reason, it is not possible to _update_ an existing 1.2 deployment, rather it is necessary to _migrate_ the whole configuration, users and roles to a brand new 2.0 deployment. Preparation @@ -36,7 +36,7 @@ endif::[] perform the following steps: . Install the CLI application -. Create a new Maven project for Apache Syncope 2.0 then add the following dependency to `core/pom.xml` +. Create a new Maven project for Apache Syncope 2.0 and then add the following dependency to `core/pom.xml` [source,xml,subs="verbatim,attributes"] @@ -78,7 +78,7 @@ follows: syncopeadm.bat migrate --conf \path\to\context.xml \dest\path\to\MasterContent.xml -The result of such invocation is the generated `MasterContent.xml` file and possibly an output message like as follows: +The result of this invocation is the generated `MasterContent.xml` file and possibly an output message such as the following: You are running: migrate --conf /path/to/context.xml /dest/path/to/MasterContent.xml @@ -125,9 +125,9 @@ If errors are found, make appropriate corrections into `core/src/test/resources/ involve migrating custom classes originally developed for 1.2 into their respective < >. -When no exceptions are reported in the logs, log in the admin console and check if all configuration items +When no exceptions are reported in the logs, log into the admin console and check if all configuration items (schema definitions, external resources, notifications, ...) were correctly migrated. If anything is missing, take care -of re-adding manually. +to re-add them manually. If using delegated administration under 1.2, reconstruct < > and < > under the new security model. @@ -140,8 +140,8 @@ If making modifications via the admin console, do not forget to <> @@ -187,7 +187,7 @@ and configure accordingly Create an External Resource for the Connector created above, and set the < > rules for: -* `USER` as `\\__ACCOUNT__`, with at the least the following mapping: +* `USER` as `\\__ACCOUNT__`, with at least the following mapping: |=== | Internal Attribute | External Attribute | Other @@ -208,7 +208,7 @@ Create an External Resource for the Connector created above, and set the <
syncope git commit: Docs update
Repository: syncope Updated Branches: refs/heads/master 35ae16a9c -> 85852fa1e Docs update Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/85852fa1 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/85852fa1 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/85852fa1 Branch: refs/heads/master Commit: 85852fa1ecf220575693eaccb522a38485a0818b Parents: 35ae16a Author: Colm O hEigeartaighAuthored: Thu Sep 8 14:34:33 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Sep 8 14:34:51 2016 +0100 -- .../workingwithapachesyncope/restfulservices.adoc| 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/85852fa1/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc -- diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc index 7c89989..d765788 100644 --- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc @@ -46,16 +46,17 @@ The < > might also help greatly when working with REST REST Headers -Besides the common HTTP headers as `Accept`, `Content-Type`, ... more are supported, as reported below. +Apache Syncope supports a number of HTTP headers as detailed below, in addition +to the common HTTP headers such as `Accept`, `Content-Type`, etc. [TIP] -Dealing with the headers below when using the <> is possible via the `SyncopeClient` class methods. +It is possible to deal with the headers below when using the <> via the `SyncopeClient` class methods. = X-Syncope-Domain `X-Syncope-Domain` can be optionally set for requests (when not set, `Master` is assumed) to select the target < >. + -Value for this header is provided in all responses. +The value for this header is provided in all responses. = X-Syncope-Key and Location @@ -75,13 +76,13 @@ and `X-Application-Error-Info` might be optionally populated with more details, = X-Syncope-Null-Priority-Async -When set to `true`, this request header instructs the < > to not wait for completion +When set to `true`, this request header instructs the < > not to wait for completion when communicating with < > with no priority set. = Prefer and Preference-Applied -Some REST endpoints - typically for creating, updating or deleting Users, Groups or Any Objects - return by default the -entity in the response payload. + +Some REST endpoints - typically for creating, updating or deleting Users, Groups or Any Objects - return the +entity in the response payload by default. + If this is not required, the `Prefer` request header can be set to `return-no-content` (`return-content` will instead keep the default behavior). @@ -96,7 +97,7 @@ Use `Prefer` in scenarios where it is important to avoid unnecessary data in the For each response containing Users, Groups or Any Objects, the https://en.wikipedia.org/wiki/HTTP_ETag[ETag^] header is generated, which contains the latest modification date. -This value can be passed, during subsequent modifying requests for the same entity, via the `If-Match` or +This value can be passed, during subsequent requests to modify the same entity, via the `If-Match` or `If-None-Match` headers. + When the provided `If-Match` value does not match the latest modification date of the entity, an error is reported and the requested operation is not performed.
syncope git commit: Minor doc corrections to getting started guide
Repository: syncope Updated Branches: refs/heads/master 451f89bf7 -> f49bb10d5 Minor doc corrections to getting started guide Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f49bb10d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f49bb10d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f49bb10d Branch: refs/heads/master Commit: f49bb10d5c29cc5382965904111ac7b926ffafb9 Parents: 451f89b Author: Colm O hEigeartaighAuthored: Tue Aug 30 16:13:29 2016 +0100 Committer: Colm O hEigeartaigh Committed: Tue Aug 30 16:13:29 2016 +0100 -- src/main/asciidoc/getting-started/introduction.adoc | 6 +++--- src/main/asciidoc/getting-started/movingForward.adoc | 2 +- src/main/asciidoc/getting-started/obtain.adoc| 2 +- src/site/xdoc/index.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/f49bb10d/src/main/asciidoc/getting-started/introduction.adoc -- diff --git a/src/main/asciidoc/getting-started/introduction.adoc b/src/main/asciidoc/getting-started/introduction.adoc index 88f27c3..8fafc8f 100644 --- a/src/main/asciidoc/getting-started/introduction.adoc +++ b/src/main/asciidoc/getting-started/introduction.adoc @@ -54,7 +54,7 @@ image::identityLifecycle.png[title="Identity Lifecycle",alt="Identity Lifecycle" With Apache Syncope 2.0.0, the managed identities are not limited anymore to Users and Groups. New object types can be defined so that Any Object's data can be managed through Syncope: workstations, printers, folders, sensors, services, -and so on. This positions Apache Syncope at the forefront for bringing Identity Management in the IoT world. +and so on. This positions Apache Syncope at the forefront for bringing Identity Management to the IoT world. === Identity and Access Management - Reference Scenario @@ -62,7 +62,7 @@ and so on. This positions Apache Syncope at the forefront for bringing Identity [.text-center] image::iam-scenario.png[title="IAM Scenario",alt="IAM Scenario"] -The picture above shows the tecnologies involved in a complete IAM solution: +The picture above shows the technologies involved in a complete IAM solution: * *_Identity Store_* (as RDBMS, LDAP, Active Directory, meta- and virtual-directories) - the repository for account data * *_Provisioning Engine_* - synchronizes account data across Identity Stores and a broad range of data formats, models, @@ -114,7 +114,7 @@ representation of Users, Groups and Any Objects. + This component often needs to be tailored to meet the requirements of a specific deployment, as it is the crucial decision point for defining and enforcing the consistency and transformations between internal and external data. The default all-Java implementation can be extended for this purpose. In addition, an http://camel.apache.org/[Apache Camel^]-based -implementation is also available as extension, which brings all the power of runtime changes and adaptation. +implementation is also available as an extension, which brings all the power of runtime changes and adaptation. * *_Workflow_* is one of the pluggable aspects of Apache Syncope: this lets every deployment choose the preferred engine from a provided list - including the one based on http://www.activiti.org/[Activiti BPM^], the reference open source http://www.bpmn.org/[BPMN 2.0^] implementation - or define new, custom ones. http://git-wip-us.apache.org/repos/asf/syncope/blob/f49bb10d/src/main/asciidoc/getting-started/movingForward.adoc -- diff --git a/src/main/asciidoc/getting-started/movingForward.adoc b/src/main/asciidoc/getting-started/movingForward.adoc index 0c072e3..7ebb7c6 100644 --- a/src/main/asciidoc/getting-started/movingForward.adoc +++ b/src/main/asciidoc/getting-started/movingForward.adoc @@ -19,7 +19,7 @@ == Moving Forward -Once obtained a working installation of Apache Syncope using one of the methods reported above, you should consider +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"] http://syncope.apache.org/docs/reference-guide.html[Apache Syncope Reference Guide] http://git-wip-us.apache.org/repos/asf/syncope/blob/f49bb10d/src/main/asciidoc/getting-started/obtain.adoc -- diff --git a/src/main/asciidoc/getting-started/obtain.adoc b/src/main/asciidoc/getting-started/obtain.adoc index 2b205cd..711eb67 100644 ---
syncope git commit: SYNCOPE-931 - Added a test
Repository: syncope Updated Branches: refs/heads/master 0d97f4515 -> a29cc8061 SYNCOPE-931 - Added a test Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a29cc806 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a29cc806 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a29cc806 Branch: refs/heads/master Commit: a29cc80615e8f066232c5cdf43dc5d25be8487c6 Parents: 0d97f45 Author: Colm O hEigeartaighAuthored: Wed Sep 7 14:56:41 2016 +0100 Committer: Colm O hEigeartaigh Committed: Wed Sep 7 14:56:41 2016 +0100 -- .../syncope/fit/core/CamelRouteITCase.java | 46 1 file changed, 46 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/a29cc806/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java index 20feec6..66fbcc1 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java @@ -33,6 +33,7 @@ import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.common.lib.types.AttrSchemaType; import org.apache.syncope.common.lib.types.SchemaType; import org.apache.syncope.fit.AbstractITCase; +import org.junit.Assert; import org.junit.Assume; import org.junit.Test; @@ -170,4 +171,49 @@ public class CamelRouteITCase extends AbstractITCase { } } +@Test +public void issueSYNCOPE931() { + Assume.assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService)); + +CamelRouteTO oldRoute = camelRouteService.read("createUser"); +assertNotNull(oldRoute); +String routeContent = "\n" ++ " \n" ++ " \n" ++ "${body}\n" ++ " \n" ++ " \n" ++ "\n" ++ "\n" ++ "\n" ++ "\n" ++ "\n" ++ " java.lang.RuntimeException\n" ++ " \n" ++ "false\n" ++ " \n" ++ " \n" ++ "\n" ++ " \n" ++ ""; + +// Try to update a route with an incorrect propagation type +try { +doUpdate("createUser", routeContent); +Assert.fail("Error expected on an incorrect propagation type"); +} catch (Exception ex) { +// Expected +} + +// Now update the route again with the correct propagation type +routeContent = routeContent.replaceFirst("create123", "create"); +try { +CamelRouteTO route = doUpdate("createUser", routeContent); +assertEquals(routeContent, route.getContent()); +} finally { +doUpdate(oldRoute.getKey(), oldRoute.getContent()); +} +} + }
syncope git commit: More docs review
Repository: syncope Updated Branches: refs/heads/master 92e8ecc48 -> e8c939772 More docs review Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e8c93977 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e8c93977 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e8c93977 Branch: refs/heads/master Commit: e8c93977299c714b3c4059ddd0db8df0730ba4f6 Parents: 92e8ecc Author: Colm O hEigeartaighAuthored: Fri Aug 26 10:20:30 2016 +0100 Committer: Colm O hEigeartaigh Committed: Fri Aug 26 10:20:30 2016 +0100 -- .../asciidoc/reference-guide/concepts/audit.adoc| 4 ++-- .../asciidoc/reference-guide/concepts/domains.adoc | 2 +- .../reference-guide/concepts/extensions.adoc| 10 +- .../asciidoc/reference-guide/concepts/reports.adoc | 16 .../asciidoc/reference-guide/concepts/tasks.adoc| 16 .../adminconsole/adminconsole.adoc | 2 +- .../adminconsole/approval.adoc | 2 +- .../adminconsole/configuration.adoc | 8 .../adminconsole/dashboard.adoc | 2 +- .../adminconsole/realms.adoc| 2 +- .../adminconsole/topology.adoc | 4 ++-- .../workingwithapachesyncope/cli/notification.adoc | 4 ++-- .../workingwithapachesyncope/cli/question.adoc | 4 ++-- .../workingwithapachesyncope/cli/resource.adoc | 2 +- .../workingwithapachesyncope/cli/role.adoc | 2 +- .../workingwithapachesyncope/cli/task.adoc | 2 +- .../workingwithapachesyncope/cli/user.adoc | 12 ++-- .../workingwithapachesyncope.adoc | 4 ++-- 18 files changed, 49 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/e8c93977/src/main/asciidoc/reference-guide/concepts/audit.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/audit.adoc b/src/main/asciidoc/reference-guide/concepts/audit.adoc index 5ae007a..476fdfd 100644 --- a/src/main/asciidoc/reference-guide/concepts/audit.adoc +++ b/src/main/asciidoc/reference-guide/concepts/audit.adoc @@ -30,5 +30,5 @@ An example of how audit entries can be extracted for reporting is shown by the < Audit Events -What described for < > is also valid for audit events, examples included - -except for admin console < >, which is naturally distinct. +The information provided for < > is also valid for audit events, including examples - +except for the admin console < >, which is naturally distinct. http://git-wip-us.apache.org/repos/asf/syncope/blob/e8c93977/src/main/asciidoc/reference-guide/concepts/domains.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/domains.adoc b/src/main/asciidoc/reference-guide/concepts/domains.adoc index cab6ef0..9ffdbd3 100644 --- a/src/main/asciidoc/reference-guide/concepts/domains.adoc +++ b/src/main/asciidoc/reference-guide/concepts/domains.adoc @@ -31,6 +31,6 @@ image::domains.png[title="Domains",alt="Domains"] [TIP] -Each domain's persistence unit can be configured to work with one of < >: `Master` can be +Each domain's persistence unit can be configured to work with one of the < >: `Master` can be on MySQL, `Domain1` on PostgreSQL, `DomainN` on Oracle and so on. http://git-wip-us.apache.org/repos/asf/syncope/blob/e8c93977/src/main/asciidoc/reference-guide/concepts/extensions.adoc -- diff --git a/src/main/asciidoc/reference-guide/concepts/extensions.adoc b/src/main/asciidoc/reference-guide/concepts/extensions.adoc index 62b545e..360395e 100644 --- a/src/main/asciidoc/reference-guide/concepts/extensions.adoc +++ b/src/main/asciidoc/reference-guide/concepts/extensions.adoc @@ -18,8 +18,8 @@ // === Extensions -Extensions allow to optionally enrich the _vanilla_ Apache Syncope with useful features, without the need of bloating -every single deployment with non-needed libraries and configurations. +The _vanilla_ Apache Syncope deployment can be optional enriched with useful features via an Extension, instead of bloating +every single deployment with unneeded libraries and configurations. With reference to < >, an extension might add a <> endpoint, manage the < > of additional entities, extend the
syncope git commit: More reference guide grammatical fixes
Repository: syncope Updated Branches: refs/heads/master cfd499d3b -> 715820744 More reference guide grammatical fixes Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/71582074 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/71582074 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/71582074 Branch: refs/heads/master Commit: 715820744403fcab711e1de531885f762b2a68f2 Parents: cfd499d Author: Colm O hEigeartaighAuthored: Mon Aug 29 10:56:57 2016 +0100 Committer: Colm O hEigeartaigh Committed: Mon Aug 29 10:56:57 2016 +0100 -- .../workingwithapachesyncope/customization.adoc | 24 ++-- .../restfulservices.adoc| 12 +- .../systemadministration/activitimodeler.adoc | 4 ++-- .../configurationparameters.adoc| 6 ++--- .../configureconnidlocations.adoc | 4 ++-- .../systemadministration/dbms.adoc | 2 +- .../systemadministration/domainsmanagement.adoc | 4 ++-- .../systemadministration/highavailability.adoc | 2 +- .../systemadministration/importexport.adoc | 15 ++-- .../systemadministration.adoc | 14 ++-- 10 files changed, 44 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/71582074/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc -- diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc index 4d73273..dff29f6 100644 --- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc @@ -19,14 +19,14 @@ === Customization [CAUTION] -Only Maven projects can be customized: if using Standalone, Debian packages or GUI installer, none of the customizations +Only Maven projects can be customized: if using Standalone, Debian packages or the GUI installer, none of the customizations discussed below can be applied. -Apache Syncope is conceived for being as much flexible as possible, to best suite the various environments +Apache Syncope is designed to be as flexible as possible, to best suit the various environments in which it can be deployed. Besides other aspects, this means that every feature and component can be extended or replaced. -Once created the project from the provided Maven archetype, the generated source tree is available for either adding +Once the project has been created from the provided Maven archetype, the generated source tree is available for either adding new features or replacing existing components. [[override-behavior]] @@ -63,19 +63,19 @@ endif::[] This general behavior might have exceptions, as highlighted below. -As a general way to operate, the Embedded Mode (see the +In general, the Embedded Mode (see the ifeval::["{backend}" == "html5"] http://syncope.apache.org/docs/getting-started.html[Apache Syncope Getting Started Guide] endif::[] ifeval::["{backend}" == "pdf"] http://syncope.apache.org/docs/getting-started.pdf[Apache Syncope Getting Started Guide] endif::[] -for details) allows to work comfortably from a single workstation, with no need of additional setup; such mode is +for details) allows the user to work comfortably from a single workstation, with no need of additional setup; it is effectively implemented as the `all` https://maven.apache.org/guides/introduction/introduction-to-profiles.html[Maven profile^], where the available optional components and extensions are enabled. + When deploying the generated WAR artifacts into an external <> however, the required components and -extensions need to be explicitly selected and enabled, as shown in the following. +extensions need to be explicitly selected and enabled, as shown in the following text. [[deployment-directories]] .Deployment directories @@ -83,7 +83,7 @@ extensions need to be explicitly selected and enabled, as shown in the following Apache Syncope needs three base directories to be defined: * bundles - where the < > are stored; -* log - where all system logs are written; +* log - where all the system logs are written; * conf (optional) - where configuration files are located, if overriding the default values is needed. [WARNING] @@ -109,7 +109,7 @@ mvn clean verify \ -Dlog.directory=/opt/syncope/log -After downloading all of the needed dependencies, three WAR files will be produced: +After downloading all of the dependencies that are needed, three WAR
syncope git commit: Switch to use PreparedStatements in a few places for the fit tests
Repository: syncope Updated Branches: refs/heads/master f1d294d6f -> 9b5121d08 Switch to use PreparedStatements in a few places for the fit tests Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/9b5121d0 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/9b5121d0 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/9b5121d0 Branch: refs/heads/master Commit: 9b5121d0866f37bce16fc0802b1202e2380acbc0 Parents: f1d294d Author: Colm O hEigeartaighAuthored: Thu Dec 8 16:35:42 2016 + Committer: Colm O hEigeartaigh Committed: Thu Dec 8 16:36:32 2016 + -- .../fit/buildtools/cxf/ProvisioningImpl.java| 24 +--- 1 file changed, 16 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/9b5121d0/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java -- diff --git a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java index e5854d7..e384734 100644 --- a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java +++ b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java @@ -19,6 +19,7 @@ package org.apache.syncope.fit.buildtools.cxf; import java.sql.Connection; +import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; @@ -63,12 +64,14 @@ public class ProvisioningImpl implements Provisioning { try { conn = DataSourceUtils.getConnection(dataSource); -Statement statement = conn.createStatement(); +PreparedStatement statement = +conn.prepareStatement("DELETE FROM user WHERE userId=?"); +statement.setString(1, accountid); String query = "DELETE FROM user WHERE userId='" + accountid + "';"; LOG.debug("Execute query: " + query); -statement.executeUpdate(query); +statement.executeUpdate(); return accountid; } catch (SQLException e) { @@ -113,7 +116,6 @@ public class ProvisioningImpl implements Provisioning { try { conn = DataSourceUtils.getConnection(dataSource); -final Statement statement = conn.createStatement(); String value; @@ -155,10 +157,13 @@ public class ProvisioningImpl implements Provisioning { } if (set.length() > 0) { +PreparedStatement statement = +conn.prepareStatement("UPDATE user SET " + set.toString() + " WHERE userId=?"); +statement.setString(1, accountid); String query = "UPDATE user SET " + set.toString() + " WHERE userId='" + accountid + "';"; LOG.debug("Execute query: " + query); -statement.executeUpdate(query); +statement.executeUpdate(); } return accountid; @@ -339,22 +344,25 @@ public class ProvisioningImpl implements Provisioning { Connection conn = null; try { conn = DataSourceUtils.getConnection(dataSource); -Statement statement = conn.createStatement(); +PreparedStatement statement = +conn.prepareStatement("SELECT userId FROM user WHERE userId=?"); +statement.setString(1, username); final String query = "SELECT userId FROM user WHERE userId='" + username + "';"; LOG.debug("Execute query: " + query); -ResultSet rs = statement.executeQuery(query); +ResultSet rs = statement.executeQuery(); resolved = rs.next() ? rs.getString(1) : null; if (resolved == null) { -statement = conn.createStatement(); +statement = conn.prepareStatement("SELECT roleName FROM role WHERE roleName=?"); +statement.setString(1, username); final String roleQuery = "SELECT roleName FROM role WHERE roleName='" + username + "';"; LOG.debug("Execute query: " + roleQuery); -rs = statement.executeQuery(roleQuery); +rs = statement.executeQuery(); resolved = rs.next() ? rs.getString(1) : null; }
syncope git commit: Findbugs sweep of the client module
Repository: syncope Updated Branches: refs/heads/master 18e67bbd2 -> 380386ee8 Findbugs sweep of the client module Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/380386ee Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/380386ee Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/380386ee Branch: refs/heads/master Commit: 380386ee8e4050db6485121bc440214fe9436319 Parents: 18e67bb Author: Colm O hEigeartaighAuthored: Fri Dec 9 11:36:31 2016 + Committer: Colm O hEigeartaigh Committed: Fri Dec 9 11:36:31 2016 + -- .../java/org/apache/syncope/client/cli/SyncopeServices.java | 9 + .../commands/entitlement/EntitlementSyncopeOperations.java | 5 +++-- .../client/cli/commands/self/WorkflowExportDefinition.java | 4 +--- .../client/cli/commands/self/WorkflowExportDiagram.java | 7 --- .../org/apache/syncope/client/cli/util/CommandUtils.java| 2 +- .../java/org/apache/syncope/client/cli/view/Messages.java | 4 ++-- .../main/java/org/apache/syncope/client/cli/view/Table.java | 2 +- .../syncope/client/console/SyncopeConsoleApplication.java | 5 +++-- .../apache/syncope/client/console/approvals/Approval.java | 3 --- .../client/console/commons/ResourceStatusDataProvider.java | 2 +- .../syncope/client/console/commons/status/StatusUtils.java | 4 ++-- .../syncope/client/console/events/EventCategoryPanel.java | 2 +- .../syncope/client/console/panels/RealmChoicePanel.java | 2 +- .../console/wicket/markup/html/form/DateTimeFieldPanel.java | 2 +- .../apache/syncope/client/console/widgets/AlertWidget.java | 2 +- .../syncope/client/console/widgets/ApprovalsWidget.java | 9 +++-- .../widgets/reconciliation/ReconciliationReport.java| 6 +- .../widgets/reconciliation/ReconciliationReportParser.java | 6 +++--- .../client/console/wizards/AjaxWizardMgtButtonBar.java | 1 - .../syncope/client/console/wizards/any/AbstractAttrs.java | 8 +++- .../client/console/wizards/any/GroupWizardBuilder.java | 6 +++--- .../console/wizards/resources/ProvisionWizardBuilder.java | 4 ++-- .../client/console/wizards/role/RoleWizardBuilder.java | 8 .../syncope/client/enduser/SyncopeEnduserApplication.java | 5 +++-- 24 files changed, 61 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/380386ee/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java index 2fecf4a..d534930 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java @@ -20,6 +20,7 @@ package org.apache.syncope.client.cli; import java.io.FileInputStream; import java.io.IOException; +import java.io.InputStream; import java.util.Properties; import org.apache.commons.lang3.BooleanUtils; import org.apache.syncope.client.cli.commands.install.InstallConfigFileTemplate; @@ -38,8 +39,8 @@ public final class SyncopeServices { public static T get(final Class clazz) { final Properties properties = new Properties(); -try { -properties.load(new FileInputStream(InstallConfigFileTemplate.configurationFilePath())); +try (InputStream is = new FileInputStream(InstallConfigFileTemplate.configurationFilePath())) { +properties.load(is); } catch (final IOException e) { LOG.error("Error opening properties file", e); } @@ -62,8 +63,8 @@ public final class SyncopeServices { public static void testUsernameAndPassword(final String username, final String password) { final Properties properties = new Properties(); -try { -properties.load(new FileInputStream(InstallConfigFileTemplate.configurationFilePath())); +try (InputStream is = new FileInputStream(InstallConfigFileTemplate.configurationFilePath())) { +properties.load(is); } catch (final IOException e) { LOG.error("Error opening properties file", e); } http://git-wip-us.apache.org/repos/asf/syncope/blob/380386ee/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementSyncopeOperations.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementSyncopeOperations.java
syncope git commit: Final FindBugs improvements
Repository: syncope Updated Branches: refs/heads/master 40b417883 -> ad4546ee2 Final FindBugs improvements Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ad4546ee Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ad4546ee Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ad4546ee Branch: refs/heads/master Commit: ad4546ee23db9f224aca15e765d0414174bf2d7c Parents: 40b4178 Author: Colm O hEigeartaighAuthored: Wed Dec 14 10:25:25 2016 + Committer: Colm O hEigeartaigh Committed: Wed Dec 14 10:25:25 2016 + -- .../syncope/core/logic/MailTemplateLogic.java | 4 +- .../syncope/core/logic/ReportTemplateLogic.java | 4 +- .../apache/syncope/core/logic/UserLogic.java| 4 +- .../syncope/core/logic/init/JobManagerImpl.java | 6 ++- .../core/logic/report/GroupReportlet.java | 48 ++-- .../core/rest/cxf/service/TaskServiceImpl.java | 4 +- 6 files changed, 37 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/ad4546ee/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java index 978b2bd..5abf4ae 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java @@ -169,14 +169,14 @@ public class MailTemplateLogic extends AbstractTransactionalLogichttp://git-wip-us.apache.org/repos/asf/syncope/blob/ad4546ee/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java index 11a7f38..a1d8bfe 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java @@ -182,14 +182,14 @@ public class ReportTemplateLogic extends AbstractTransactionalLogichttp://git-wip-us.apache.org/repos/asf/syncope/blob/ad4546ee/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java index 3273759..b5a41da 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java @@ -520,7 +520,7 @@ public class UserLogic extends AbstractAnyLogic { @Override protected UserTO resolveReference(final Method method, final Object... args) throws UnresolvedReferenceException { -Object key = null; +String key = null; if (!"confirmPasswordReset".equals(method.getName()) && ArrayUtils.isNotEmpty(args)) { for (int i = 0; key == null && i < args.length; i++) { @@ -534,7 +534,7 @@ public class UserLogic extends AbstractAnyLogic { } } -if (key instanceof String) { +if (key != null) { try { return binder.getUserTO((String) key); } catch (Throwable ignore) { http://git-wip-us.apache.org/repos/asf/syncope/blob/ad4546ee/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java b/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java index 25d232d..d8b08f1 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java @@ -20,6 +20,7 @@ package org.apache.syncope.core.logic.init; import java.sql.Connection; import java.sql.PreparedStatement; +import java.sql.ResultSet; import java.sql.SQLException; import java.util.Date; import java.util.HashMap; @@ -115,6 +116,7 @@ public class JobManagerImpl implements JobManager, SyncopeLoader { Connection conn = DataSourceUtils.getConnection(domainsHolder.getDomains().get(SyncopeConstants.MASTER_DOMAIN)); PreparedStatement stmt = null; +ResultSet resultSet = null;
syncope git commit: SYNCOPE-981 - Oracle/SQLServer configuration does not work
Repository: syncope Updated Branches: refs/heads/master a221f8dd7 -> 367bf6160 SYNCOPE-981 - Oracle/SQLServer configuration does not work Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/367bf616 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/367bf616 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/367bf616 Branch: refs/heads/master Commit: 367bf616046d9a31bb32529653560926832dbf1d Parents: a221f8d Author: Colm O hEigeartaighAuthored: Mon Dec 12 10:44:21 2016 + Committer: Colm O hEigeartaigh Committed: Mon Dec 12 10:44:21 2016 + -- .../org/apache/syncope/installer/files/MasterProperties.java| 5 ++--- .../apache/syncope/installer/processes/PersistenceProcess.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/367bf616/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java b/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java index b1fb223..259795d 100644 --- a/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java +++ b/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java @@ -70,7 +70,7 @@ public final class MasterProperties { public static final String ORACLE = "" + "Master.driverClassName=oracle.jdbc.OracleDriver\n" -+ "Master.url=jdbc:oracle:thin:@pioppo:1521:orcl\n" ++ "Master.url=%s\n" + "Master.schema=%s\n" + "Master.username=%s\n" + "Master.password=%s\n" @@ -81,8 +81,7 @@ public final class MasterProperties { public static final String SQLSERVER = "" + "Master.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver\n" -+ "Master.url=jdbc:sqlserver://acacia:1433;database=syncope;selectMethod=cursor;" -+ "sendStringParametersAsUnicode=false\n" ++ "Master.url=%s\n" + "Master.schema=%s\n" + "Master.username=%s\n" + "Master.password=%s\n" http://git-wip-us.apache.org/repos/asf/syncope/blob/367bf616/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java b/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java index a36b759..801390d 100644 --- a/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java +++ b/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java @@ -93,13 +93,13 @@ public class PersistenceProcess extends BaseProcess { case ORACLE: provisioningProperties.append(ProvisioningProperties.ORACLE); masterProperties.append(String.format( -MasterProperties.ORACLE, schema, persistenceUrl, persistenceUser, persistencePassword)); +MasterProperties.ORACLE, persistenceUrl, schema, persistenceUser, persistencePassword)); break; case SQLSERVER: provisioningProperties.append(ProvisioningProperties.SQLSERVER); masterProperties.append(String.format( -MasterProperties.SQLSERVER, schema, persistenceUrl, persistenceUser, persistencePassword)); +MasterProperties.SQLSERVER, persistenceUrl, schema, persistenceUser, persistencePassword)); break; default:
syncope git commit: SYNCOPE-981 - Oracle/SQLServer configuration does not work
Repository: syncope Updated Branches: refs/heads/2_0_X d2db342ef -> 778cb32ca SYNCOPE-981 - Oracle/SQLServer configuration does not work Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/778cb32c Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/778cb32c Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/778cb32c Branch: refs/heads/2_0_X Commit: 778cb32ca3858cec8050a1259c541aaf0deb9cb6 Parents: d2db342 Author: Colm O hEigeartaighAuthored: Mon Dec 12 10:44:21 2016 + Committer: Colm O hEigeartaigh Committed: Mon Dec 12 10:45:30 2016 + -- .../org/apache/syncope/installer/files/MasterProperties.java| 5 ++--- .../apache/syncope/installer/processes/PersistenceProcess.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/778cb32c/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java b/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java index b1fb223..259795d 100644 --- a/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java +++ b/installer/src/main/java/org/apache/syncope/installer/files/MasterProperties.java @@ -70,7 +70,7 @@ public final class MasterProperties { public static final String ORACLE = "" + "Master.driverClassName=oracle.jdbc.OracleDriver\n" -+ "Master.url=jdbc:oracle:thin:@pioppo:1521:orcl\n" ++ "Master.url=%s\n" + "Master.schema=%s\n" + "Master.username=%s\n" + "Master.password=%s\n" @@ -81,8 +81,7 @@ public final class MasterProperties { public static final String SQLSERVER = "" + "Master.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver\n" -+ "Master.url=jdbc:sqlserver://acacia:1433;database=syncope;selectMethod=cursor;" -+ "sendStringParametersAsUnicode=false\n" ++ "Master.url=%s\n" + "Master.schema=%s\n" + "Master.username=%s\n" + "Master.password=%s\n" http://git-wip-us.apache.org/repos/asf/syncope/blob/778cb32c/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java b/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java index a36b759..801390d 100644 --- a/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java +++ b/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java @@ -93,13 +93,13 @@ public class PersistenceProcess extends BaseProcess { case ORACLE: provisioningProperties.append(ProvisioningProperties.ORACLE); masterProperties.append(String.format( -MasterProperties.ORACLE, schema, persistenceUrl, persistenceUser, persistencePassword)); +MasterProperties.ORACLE, persistenceUrl, schema, persistenceUser, persistencePassword)); break; case SQLSERVER: provisioningProperties.append(ProvisioningProperties.SQLSERVER); masterProperties.append(String.format( -MasterProperties.SQLSERVER, schema, persistenceUrl, persistenceUser, persistencePassword)); +MasterProperties.SQLSERVER, persistenceUrl, schema, persistenceUser, persistencePassword)); break; default:
syncope git commit: Finished Findbugs sweep apart from core
Repository: syncope Updated Branches: refs/heads/master 367bf6160 -> e9fa33703 Finished Findbugs sweep apart from core Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e9fa3370 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e9fa3370 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e9fa3370 Branch: refs/heads/master Commit: e9fa33703e97f738db468380eff8dd8f43d29c67 Parents: 367bf61 Author: Colm O hEigeartaighAuthored: Mon Dec 12 11:17:19 2016 + Committer: Colm O hEigeartaigh Committed: Mon Dec 12 11:17:19 2016 + -- .../buildtools/ApacheDSStartStopListener.java | 6 +- .../fit/buildtools/cxf/ProvisioningImpl.java| 11 +++ .../core/reference/DoubleValueLogicActions.java | 4 +- .../ide/eclipse/plugin/views/SyncopeView.java | 4 +- .../installer/files/ConsoleProperties.java | 4 +- .../installer/files/EnduserProperties.java | 4 +- .../installer/files/MasterProperties.java | 90 ++-- .../syncope/installer/utilities/HttpUtils.java | 2 +- 8 files changed, 68 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/e9fa3370/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java -- diff --git a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java index 50049c8..7fae668 100644 --- a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java +++ b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java @@ -77,7 +77,7 @@ public class ApacheDSStartStopListener implements ServletContextListener { private Partition addPartition(final String partitionId, final String partitionDn, final DnFactory dnFactory) throws Exception { -// Create a new partition with the given partition id +// Create a new partition with the given partition id JdbmPartition partition = new JdbmPartition(service.getSchemaManager(), dnFactory); partition.setId(partitionId); partition.setPartitionPath(new File(service.getInstanceLayout().getPartitionsDirectory(), partitionId).toURI()); @@ -173,7 +173,7 @@ public class ApacheDSStartStopListener implements ServletContextListener { // then the system partition // this is a MANDATORY partition // DO NOT add this via addPartition() method, trunk code complains about duplicate partition -// while initializing +// while initializing JdbmPartition systemPartition = new JdbmPartition(service.getSchemaManager(), service.getDnFactory()); systemPartition.setId("system"); systemPartition.setPartitionPath( @@ -229,7 +229,7 @@ public class ApacheDSStartStopListener implements ServletContextListener { initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent); server = new LdapServer(); -server.setTransports(new TcpTransport(Integer.valueOf( +server.setTransports(new TcpTransport(Integer.parseInt( WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext()). getBean("testds.port", String.class; server.setDirectoryService(service); http://git-wip-us.apache.org/repos/asf/syncope/blob/e9fa3370/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java -- diff --git a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java index e384734..6eefe5c 100644 --- a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java +++ b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java @@ -73,6 +73,8 @@ public class ProvisioningImpl implements Provisioning { statement.executeUpdate(); +statement.close(); + return accountid; } catch (SQLException e) { throw new ProvisioningException("Delete operation failed", e); @@ -164,6 +166,7 @@ public class ProvisioningImpl implements Provisioning { LOG.debug("Execute query: " + query); statement.executeUpdate(); +statement.close(); } return accountid; @@ -225,6 +228,8 @@ public class
syncope git commit: Finished Findbugs sweep apart from core
Repository: syncope Updated Branches: refs/heads/2_0_X 778cb32ca -> b738c07b9 Finished Findbugs sweep apart from core Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b738c07b Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b738c07b Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b738c07b Branch: refs/heads/2_0_X Commit: b738c07b9d7e1a3c89300dbd0b557a8525f45e4b Parents: 778cb32 Author: Colm O hEigeartaighAuthored: Mon Dec 12 11:17:19 2016 + Committer: Colm O hEigeartaigh Committed: Mon Dec 12 11:17:54 2016 + -- .../buildtools/ApacheDSStartStopListener.java | 6 +- .../fit/buildtools/cxf/ProvisioningImpl.java| 11 +++ .../core/reference/DoubleValueLogicActions.java | 4 +- .../ide/eclipse/plugin/views/SyncopeView.java | 4 +- .../installer/files/ConsoleProperties.java | 4 +- .../installer/files/EnduserProperties.java | 4 +- .../installer/files/MasterProperties.java | 90 ++-- .../syncope/installer/utilities/HttpUtils.java | 2 +- 8 files changed, 68 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/b738c07b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java -- diff --git a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java index 50049c8..7fae668 100644 --- a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java +++ b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java @@ -77,7 +77,7 @@ public class ApacheDSStartStopListener implements ServletContextListener { private Partition addPartition(final String partitionId, final String partitionDn, final DnFactory dnFactory) throws Exception { -// Create a new partition with the given partition id +// Create a new partition with the given partition id JdbmPartition partition = new JdbmPartition(service.getSchemaManager(), dnFactory); partition.setId(partitionId); partition.setPartitionPath(new File(service.getInstanceLayout().getPartitionsDirectory(), partitionId).toURI()); @@ -173,7 +173,7 @@ public class ApacheDSStartStopListener implements ServletContextListener { // then the system partition // this is a MANDATORY partition // DO NOT add this via addPartition() method, trunk code complains about duplicate partition -// while initializing +// while initializing JdbmPartition systemPartition = new JdbmPartition(service.getSchemaManager(), service.getDnFactory()); systemPartition.setId("system"); systemPartition.setPartitionPath( @@ -229,7 +229,7 @@ public class ApacheDSStartStopListener implements ServletContextListener { initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent); server = new LdapServer(); -server.setTransports(new TcpTransport(Integer.valueOf( +server.setTransports(new TcpTransport(Integer.parseInt( WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext()). getBean("testds.port", String.class; server.setDirectoryService(service); http://git-wip-us.apache.org/repos/asf/syncope/blob/b738c07b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java -- diff --git a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java index e384734..6eefe5c 100644 --- a/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java +++ b/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/cxf/ProvisioningImpl.java @@ -73,6 +73,8 @@ public class ProvisioningImpl implements Provisioning { statement.executeUpdate(); +statement.close(); + return accountid; } catch (SQLException e) { throw new ProvisioningException("Delete operation failed", e); @@ -164,6 +166,7 @@ public class ProvisioningImpl implements Provisioning { LOG.debug("Execute query: " + query); statement.executeUpdate(); +statement.close(); } return accountid; @@ -225,6 +228,8 @@ public class
syncope git commit: Some FindBugs improvements in the core
Repository: syncope Updated Branches: refs/heads/2_0_X b738c07b9 -> 74814a09c Some FindBugs improvements in the core Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/74814a09 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/74814a09 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/74814a09 Branch: refs/heads/2_0_X Commit: 74814a09cc96cc37f1dfc0b77245a0f21ac8da34 Parents: b738c07 Author: Colm O hEigeartaighAuthored: Tue Dec 13 13:16:18 2016 + Committer: Colm O hEigeartaigh Committed: Tue Dec 13 13:16:52 2016 + -- .../validation/InvalidEntityException.java | 5 +++-- .../core/persistence/jpa/dao/JPAConfDAO.java| 6 -- .../jpa/entity/AbstractAnnotatedEntity.java | 8 +++- .../persistence/jpa/entity/JPAConnInstance.java | 4 ++-- .../persistence/jpa/entity/task/JPASchedTask.java | 11 +-- .../core/persistence/jpa/entity/user/JPAUser.java | 13 ++--- .../provisioning/api/cache/VirAttrCacheValue.java | 16 +--- .../provisioning/java/ConnectorFacadeProxy.java | 4 +--- .../java/data/PolicyDataBinderImpl.java | 6 -- 9 files changed, 49 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/74814a09/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java -- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java index e0d6974..89ff590 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java @@ -21,6 +21,7 @@ package org.apache.syncope.core.persistence.api.attrvalue.validation; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import javax.validation.ConstraintViolation; import javax.validation.ValidationException; @@ -120,8 +121,8 @@ public class InvalidEntityException extends ValidationException { public String getMessage() { StringBuilder sb = new StringBuilder(); -for (Class entity : violations.keySet()) { -sb.append(entity.getSimpleName()).append(' ').append(violations.get(entity).toString()).append(", "); +for (Entry entry : violations.entrySet()) { +sb.append(entry.getKey().getSimpleName()).append(' ').append(entry.getValue().toString()).append(", "); } sb.delete(sb.lastIndexOf(", "), sb.length()); http://git-wip-us.apache.org/repos/asf/syncope/blob/74814a09/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java -- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java index d1df518..2366016 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java @@ -21,10 +21,12 @@ package org.apache.syncope.core.persistence.jpa.dao; import org.apache.syncope.core.persistence.api.dao.ConfDAO; import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO; import org.apache.syncope.core.persistence.api.entity.PlainAttrUniqueValue; +import org.apache.syncope.core.persistence.api.entity.PlainAttrValue; import org.apache.syncope.core.persistence.api.entity.PlainSchema; import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr; import org.apache.syncope.core.persistence.api.entity.conf.Conf; import org.apache.syncope.core.persistence.jpa.entity.conf.JPACPlainAttr; +import org.apache.syncope.core.persistence.jpa.entity.conf.JPACPlainAttrUniqueValue; import org.apache.syncope.core.persistence.jpa.entity.conf.JPACPlainAttrValue; import org.apache.syncope.core.persistence.jpa.entity.conf.JPAConf; import org.springframework.beans.factory.annotation.Autowired; @@ -68,9 +70,9 @@ public class JPAConfDAO extends AbstractDAO implements ConfDAO { JPACPlainAttr newAttr = new JPACPlainAttr(); newAttr.setSchema(schemaDAO.find(key)); -
syncope git commit: Some FindBugs improvements in the core
Repository: syncope Updated Branches: refs/heads/master e9fa33703 -> 06fef3620 Some FindBugs improvements in the core Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/06fef362 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/06fef362 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/06fef362 Branch: refs/heads/master Commit: 06fef3620a08a371fd590bf74a5410a9dd98f478 Parents: e9fa337 Author: Colm O hEigeartaighAuthored: Tue Dec 13 13:16:18 2016 + Committer: Colm O hEigeartaigh Committed: Tue Dec 13 13:16:18 2016 + -- .../validation/InvalidEntityException.java | 5 +++-- .../core/persistence/jpa/dao/JPAConfDAO.java| 6 -- .../jpa/entity/AbstractAnnotatedEntity.java | 8 +++- .../persistence/jpa/entity/JPAConnInstance.java | 4 ++-- .../persistence/jpa/entity/task/JPASchedTask.java | 11 +-- .../core/persistence/jpa/entity/user/JPAUser.java | 13 ++--- .../provisioning/api/cache/VirAttrCacheValue.java | 16 +--- .../provisioning/java/ConnectorFacadeProxy.java | 4 +--- .../java/data/PolicyDataBinderImpl.java | 6 -- 9 files changed, 49 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/06fef362/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java -- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java index e0d6974..89ff590 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/validation/InvalidEntityException.java @@ -21,6 +21,7 @@ package org.apache.syncope.core.persistence.api.attrvalue.validation; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import javax.validation.ConstraintViolation; import javax.validation.ValidationException; @@ -120,8 +121,8 @@ public class InvalidEntityException extends ValidationException { public String getMessage() { StringBuilder sb = new StringBuilder(); -for (Class entity : violations.keySet()) { -sb.append(entity.getSimpleName()).append(' ').append(violations.get(entity).toString()).append(", "); +for (Entry entry : violations.entrySet()) { +sb.append(entry.getKey().getSimpleName()).append(' ').append(entry.getValue().toString()).append(", "); } sb.delete(sb.lastIndexOf(", "), sb.length()); http://git-wip-us.apache.org/repos/asf/syncope/blob/06fef362/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java -- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java index d1df518..2366016 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConfDAO.java @@ -21,10 +21,12 @@ package org.apache.syncope.core.persistence.jpa.dao; import org.apache.syncope.core.persistence.api.dao.ConfDAO; import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO; import org.apache.syncope.core.persistence.api.entity.PlainAttrUniqueValue; +import org.apache.syncope.core.persistence.api.entity.PlainAttrValue; import org.apache.syncope.core.persistence.api.entity.PlainSchema; import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr; import org.apache.syncope.core.persistence.api.entity.conf.Conf; import org.apache.syncope.core.persistence.jpa.entity.conf.JPACPlainAttr; +import org.apache.syncope.core.persistence.jpa.entity.conf.JPACPlainAttrUniqueValue; import org.apache.syncope.core.persistence.jpa.entity.conf.JPACPlainAttrValue; import org.apache.syncope.core.persistence.jpa.entity.conf.JPAConf; import org.springframework.beans.factory.annotation.Autowired; @@ -68,9 +70,9 @@ public class JPAConfDAO extends AbstractDAO implements ConfDAO { JPACPlainAttr newAttr = new JPACPlainAttr(); newAttr.setSchema(schemaDAO.find(key)); -
syncope git commit: FindBugs sweep of common
Repository: syncope Updated Branches: refs/heads/master 8a78765ee -> 5cab8afc9 FindBugs sweep of common Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/5cab8afc Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/5cab8afc Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/5cab8afc Branch: refs/heads/master Commit: 5cab8afc94a1520accfcbeac30ab7da4a3dcc1ab Parents: 8a78765 Author: Colm O hEigeartaighAuthored: Wed Dec 7 11:48:38 2016 + Committer: Colm O hEigeartaigh Committed: Wed Dec 7 11:48:38 2016 + -- .../common/lib/to/AbstractAnnotatedBean.java| 22 -- .../apache/syncope/common/lib/to/UserTO.java| 31 ++ .../syncope/common/lib/to/WorkflowFormTO.java | 22 -- .../syncope/common/rest/api/beans/AnyQuery.java | 2 +- .../rest/api/beans/BulkExecDeleteQuery.java | 44 .../rest/api/beans/ConnObjectTOListQuery.java | 4 +- .../common/rest/api/beans/ExecuteQuery.java | 13 -- .../common/rest/api/beans/TaskQuery.java| 2 +- 8 files changed, 110 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/5cab8afc/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java -- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java index c0f7155..1459211 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java @@ -73,11 +73,18 @@ public class AbstractAnnotatedBean extends AbstractBaseBean { } public Date getCreationDate() { -return creationDate; +if (creationDate != null) { +return new Date(creationDate.getTime()); +} +return null; } public void setCreationDate(final Date creationDate) { -this.creationDate = creationDate; +if (creationDate != null) { +this.creationDate = new Date(creationDate.getTime()); +} else { +this.creationDate = null; +} } public String getLastModifier() { @@ -89,11 +96,18 @@ public class AbstractAnnotatedBean extends AbstractBaseBean { } public Date getLastChangeDate() { -return lastChangeDate; +if (lastChangeDate != null) { +return new Date(lastChangeDate.getTime()); +} +return null; } public void setLastChangeDate(final Date lastChangeDate) { -this.lastChangeDate = lastChangeDate; +if (lastChangeDate != null) { +this.lastChangeDate = new Date(lastChangeDate.getTime()); +} else { +this.lastChangeDate = null; +} } @JsonIgnore http://git-wip-us.apache.org/repos/asf/syncope/blob/5cab8afc/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java -- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java index 4ec8181..c575d90 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java @@ -113,14 +113,17 @@ public class UserTO extends AnyTO implements GroupableRelatableTO { } public Date getTokenExpireTime() { -return tokenExpireTime == null -? null -: new Date(tokenExpireTime.getTime()); +if (tokenExpireTime != null) { +return new Date(tokenExpireTime.getTime()); +} +return null; } public void setTokenExpireTime(final Date tokenExpireTime) { if (tokenExpireTime != null) { this.tokenExpireTime = new Date(tokenExpireTime.getTime()); +} else { +this.tokenExpireTime = null; } } @@ -133,7 +136,10 @@ public class UserTO extends AnyTO implements GroupableRelatableTO { } public Date getChangePwdDate() { -return changePwdDate; +if (changePwdDate != null) { +return new Date(changePwdDate.getTime()); +} +return null; } public Integer getFailedLogins() { @@ -141,11 +147,18 @@ public class UserTO extends AnyTO implements GroupableRelatableTO { } public Date getLastLoginDate() { -return lastLoginDate; +if (lastLoginDate != null) { +return new
syncope git commit: Updating to WSS4J release
Repository: syncope Updated Branches: refs/heads/master cc6132dd0 -> 4fe838d2d Updating to WSS4J release Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/4fe838d2 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/4fe838d2 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/4fe838d2 Branch: refs/heads/master Commit: 4fe838d2d7c09ebb3063c7baa3739bfe6c9e8325 Parents: cc6132d Author: Colm O hEigeartaighAuthored: Mon Apr 3 12:32:15 2017 +0100 Committer: Colm O hEigeartaigh Committed: Mon Apr 3 12:32:15 2017 +0100 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/4fe838d2/pom.xml -- diff --git a/pom.xml b/pom.xml index 636ff18..27c69a9 100644 --- a/pom.xml +++ b/pom.xml @@ -588,7 +588,7 @@ under the License. org.apache.wss4j wss4j-ws-security-dom - 2.1.9-SNAPSHOT + 2.1.9 org.jasypt
syncope git commit: Switch to using Mime decoder
Repository: syncope Updated Branches: refs/heads/master 4ba66c335 -> eb69eb8dd Switch to using Mime decoder Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/eb69eb8d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/eb69eb8d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/eb69eb8d Branch: refs/heads/master Commit: eb69eb8dd511c9e77d4cea2fc2dbd2cf65616ee2 Parents: 4ba66c3 Author: Colm O hEigeartaighAuthored: Mon Apr 3 15:01:51 2017 +0100 Committer: Colm O hEigeartaigh Committed: Mon Apr 3 15:01:51 2017 +0100 -- .../java/org/apache/syncope/core/logic/saml2/SAML2IdPEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/eb69eb8d/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2IdPEntity.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2IdPEntity.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2IdPEntity.java index 40cecf7..a9b1b0d 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2IdPEntity.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2IdPEntity.java @@ -98,7 +98,7 @@ public class SAML2IdPEntity { for (X509Data x509Data : key.getKeyInfo().getX509Datas()) { for (org.opensaml.xmlsec.signature.X509Certificate cert : x509Data.getX509Certificates()) { try (ByteArrayInputStream bais = new ByteArrayInputStream( -Base64.getDecoder().decode(cert.getValue( { +Base64.getMimeDecoder().decode(cert.getValue( { chain.add(X509Certificate.class.cast(cf.generateCertificate(bais))); } }
syncope git commit: SYNCOPE-1179 - JWT "Date" claims are interpreted using milliseconds instead of seconds
Repository: syncope Updated Branches: refs/heads/master b41675a33 -> 2b4053df1 SYNCOPE-1179 - JWT "Date" claims are interpreted using milliseconds instead of seconds Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2b4053df Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2b4053df Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2b4053df Branch: refs/heads/master Commit: 2b4053df14d74e47c55ced76b713fc1baba0abda Parents: b41675a Author: Colm O hEigeartaighAuthored: Fri Jul 28 14:50:03 2017 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jul 28 14:50:03 2017 +0100 -- .../java/data/AccessTokenDataBinderImpl.java| 24 .../security/JWTAuthenticationProvider.java | 4 +- .../org/apache/syncope/fit/core/JWTITCase.java | 58 +++- 3 files changed, 48 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/2b4053df/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java -- diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java index f30562d..d886db6 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java @@ -87,16 +87,16 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { credentialChecker.checkIsDefaultJWSKeyInUse(); -Date now = new Date(); -Date expiry = new Date(now.getTime() + 60L * 1000L * duration); +long currentTime = new Date().getTime() / 1000L; +long expiryTime = currentTime + 60L * duration; JwtClaims jwtClaims = new JwtClaims(); jwtClaims.setTokenId(UUID_GENERATOR.generate().toString()); jwtClaims.setSubject(subject); -jwtClaims.setIssuedAt(now.getTime()); +jwtClaims.setIssuedAt(currentTime); jwtClaims.setIssuer(jwtIssuer); -jwtClaims.setExpiryTime(expiry.getTime()); -jwtClaims.setNotBefore(now.getTime()); +jwtClaims.setExpiryTime(expiryTime); +jwtClaims.setNotBefore(currentTime); for (Map.Entry entry : claims.entrySet()) { jwtClaims.setClaim(entry.getKey(), entry.getValue()); } @@ -107,7 +107,7 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { String signed = producer.signWith(jwsSignatureProvider); -return Triple.of(jwtClaims.getTokenId(), signed, expiry); +return Triple.of(jwtClaims.getTokenId(), signed, new Date(expiryTime * 1000L)); } @Override @@ -164,10 +164,11 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { credentialChecker.checkIsDefaultJWSKeyInUse(); -Date now = new Date(); long duration = confDAO.find("jwt.lifetime.minutes", 120L); -Date expiry = new Date(now.getTime() + 60L * 1000L * duration); -consumer.getJwtClaims().setExpiryTime(expiry.getTime()); +long currentTime = new Date().getTime() / 1000L; +long expiry = currentTime + 60L * duration; +consumer.getJwtClaims().setExpiryTime(expiry); +Date expiryDate = new Date(expiry * 1000L); JwsHeaders jwsHeaders = new JwsHeaders(JoseType.JWT, jwsSignatureProvider.getAlgorithm()); JwtToken token = new JwtToken(jwsHeaders, consumer.getJwtClaims()); @@ -176,7 +177,8 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { String body = producer.signWith(jwsSignatureProvider); accessToken.setBody(body); -accessToken.setExpiryTime(expiry); +// AccessToken stores expiry time in milliseconds, as opposed to seconds for the JWT tokens. +accessToken.setExpiryTime(expiryDate); if (!adminUser.equals(accessToken.getOwner())) { try { @@ -190,7 +192,7 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { accessTokenDAO.save(accessToken); -return Pair.of(body, expiry); +return Pair.of(body, expiryDate); } @Override http://git-wip-us.apache.org/repos/asf/syncope/blob/2b4053df/core/spring/src/main/java/org/apache/syncope/core/spring/security/JWTAuthenticationProvider.java -- diff --git
syncope git commit: SYNCOPE-1179 - JWT "Date" claims are interpreted using milliseconds instead of seconds
Repository: syncope Updated Branches: refs/heads/2_0_X 98ab61e06 -> c522ac058 SYNCOPE-1179 - JWT "Date" claims are interpreted using milliseconds instead of seconds Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/c522ac05 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/c522ac05 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/c522ac05 Branch: refs/heads/2_0_X Commit: c522ac05821dd23e3326c01525ebdd233ad66dd2 Parents: 98ab61e Author: Colm O hEigeartaighAuthored: Fri Jul 28 14:50:03 2017 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jul 28 14:50:27 2017 +0100 -- .../java/data/AccessTokenDataBinderImpl.java| 24 .../security/JWTAuthenticationProvider.java | 4 +- .../org/apache/syncope/fit/core/JWTITCase.java | 58 +++- 3 files changed, 48 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/c522ac05/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java -- diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java index f30562d..d886db6 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java @@ -87,16 +87,16 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { credentialChecker.checkIsDefaultJWSKeyInUse(); -Date now = new Date(); -Date expiry = new Date(now.getTime() + 60L * 1000L * duration); +long currentTime = new Date().getTime() / 1000L; +long expiryTime = currentTime + 60L * duration; JwtClaims jwtClaims = new JwtClaims(); jwtClaims.setTokenId(UUID_GENERATOR.generate().toString()); jwtClaims.setSubject(subject); -jwtClaims.setIssuedAt(now.getTime()); +jwtClaims.setIssuedAt(currentTime); jwtClaims.setIssuer(jwtIssuer); -jwtClaims.setExpiryTime(expiry.getTime()); -jwtClaims.setNotBefore(now.getTime()); +jwtClaims.setExpiryTime(expiryTime); +jwtClaims.setNotBefore(currentTime); for (Map.Entry entry : claims.entrySet()) { jwtClaims.setClaim(entry.getKey(), entry.getValue()); } @@ -107,7 +107,7 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { String signed = producer.signWith(jwsSignatureProvider); -return Triple.of(jwtClaims.getTokenId(), signed, expiry); +return Triple.of(jwtClaims.getTokenId(), signed, new Date(expiryTime * 1000L)); } @Override @@ -164,10 +164,11 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { credentialChecker.checkIsDefaultJWSKeyInUse(); -Date now = new Date(); long duration = confDAO.find("jwt.lifetime.minutes", 120L); -Date expiry = new Date(now.getTime() + 60L * 1000L * duration); -consumer.getJwtClaims().setExpiryTime(expiry.getTime()); +long currentTime = new Date().getTime() / 1000L; +long expiry = currentTime + 60L * duration; +consumer.getJwtClaims().setExpiryTime(expiry); +Date expiryDate = new Date(expiry * 1000L); JwsHeaders jwsHeaders = new JwsHeaders(JoseType.JWT, jwsSignatureProvider.getAlgorithm()); JwtToken token = new JwtToken(jwsHeaders, consumer.getJwtClaims()); @@ -176,7 +177,8 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { String body = producer.signWith(jwsSignatureProvider); accessToken.setBody(body); -accessToken.setExpiryTime(expiry); +// AccessToken stores expiry time in milliseconds, as opposed to seconds for the JWT tokens. +accessToken.setExpiryTime(expiryDate); if (!adminUser.equals(accessToken.getOwner())) { try { @@ -190,7 +192,7 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { accessTokenDAO.save(accessToken); -return Pair.of(body, expiry); +return Pair.of(body, expiryDate); } @Override http://git-wip-us.apache.org/repos/asf/syncope/blob/c522ac05/core/spring/src/main/java/org/apache/syncope/core/spring/security/JWTAuthenticationProvider.java -- diff --git
syncope git commit: Trivial formatting change
Repository: syncope Updated Branches: refs/heads/master 2b4053df1 -> a9cc9e760 Trivial formatting change Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a9cc9e76 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a9cc9e76 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a9cc9e76 Branch: refs/heads/master Commit: a9cc9e76005a10fc75dec63665951e042aef72bc Parents: 2b4053d Author: Colm O hEigeartaighAuthored: Fri Jul 28 15:28:15 2017 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jul 28 15:28:15 2017 +0100 -- .../workingwithapachesyncope/customization.adoc | 16 1 file changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/a9cc9e76/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc -- diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc index 5a115e4..07c4384 100644 --- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc @@ -407,14 +407,14 @@ classpath*:/workflow*Context.xml with - classpath*:/coreContext.xml - classpath*:/elasticsearchClientContext.xml - classpath*:/securityContext.xml - classpath*:/logicContext.xml - classpath*:/restCXFContext.xml - classpath*:/persistenceContext.xml - classpath*:/provisioning*Context.xml - classpath*:/workflow*Context.xml +classpath*:/coreContext.xml +classpath*:/elasticsearchClientContext.xml +classpath*:/securityContext.xml +classpath*:/logicContext.xml +classpath*:/restCXFContext.xml +classpath*:/persistenceContext.xml +classpath*:/provisioning*Context.xml +classpath*:/workflow*Context.xml [[customization-console]]
syncope git commit: Trivial formatting change
Repository: syncope Updated Branches: refs/heads/2_0_X c522ac058 -> 0819aec66 Trivial formatting change Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/0819aec6 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/0819aec6 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/0819aec6 Branch: refs/heads/2_0_X Commit: 0819aec664ef220a0251c3b418e1f864109a9daf Parents: c522ac0 Author: Colm O hEigeartaighAuthored: Fri Jul 28 15:28:15 2017 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jul 28 15:28:32 2017 +0100 -- .../workingwithapachesyncope/customization.adoc | 16 1 file changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/0819aec6/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc -- diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc index eb0db34..50977ac 100644 --- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc @@ -410,14 +410,14 @@ classpath*:/workflow*Context.xml with - classpath*:/coreContext.xml - classpath*:/elasticsearchClientContext.xml - classpath*:/securityContext.xml - classpath*:/logicContext.xml - classpath*:/restCXFContext.xml - classpath*:/persistenceContext.xml - classpath*:/provisioning*Context.xml - classpath*:/workflow*Context.xml +classpath*:/coreContext.xml +classpath*:/elasticsearchClientContext.xml +classpath*:/securityContext.xml +classpath*:/logicContext.xml +classpath*:/restCXFContext.xml +classpath*:/persistenceContext.xml +classpath*:/provisioning*Context.xml +classpath*:/workflow*Context.xml [[customization-console]]
syncope git commit: Some trivial grammatical changes
Repository: syncope Updated Branches: refs/heads/2_0_X bf35449ca -> 6008f3eb1 Some trivial grammatical changes Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6008f3eb Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6008f3eb Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6008f3eb Branch: refs/heads/2_0_X Commit: 6008f3eb1b61b214c5592f05022c75fe9a432642 Parents: bf35449 Author: Colm O hEigeartaighAuthored: Tue Aug 1 17:27:04 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Aug 1 21:28:03 2017 +0100 -- .../main/java/org/apache/syncope/core/logic/AccessTokenLogic.java | 2 +- .../src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/6008f3eb/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java index c495392..e6b0099 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java @@ -54,7 +54,7 @@ public class AccessTokenLogic extends AbstractTransactionalLogic @PreAuthorize("isAuthenticated()") public Pair login() { if (anonymousUser.equals(AuthContextUtils.getUsername())) { -throw new IllegalArgumentException(anonymousUser + " cannot be granted for an access token"); +throw new IllegalArgumentException(anonymousUser + " cannot be granted an access token"); } return binder.create(AuthContextUtils.getUsername(), Collections. emptyMap(), false); http://git-wip-us.apache.org/repos/asf/syncope/blob/6008f3eb/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java index bb26b34..d7337b3 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java @@ -165,7 +165,7 @@ public class SAML2IdPLogic extends AbstractSAML2Logic { } else if (idp.getSSOLocation(SAML2BindingType.REDIRECT) != null) { idpTO.setBindingType(SAML2BindingType.REDIRECT); } else { -throw new IllegalArgumentException("Not POST nor REDIRECT artifacts supported by " + idp.getId()); +throw new IllegalArgumentException("Neither POST nor REDIRECT artifacts supported by " + idp.getId()); } result.add(idpTO);
[2/2] syncope git commit: Some trivial grammatical changes
Some trivial grammatical changes Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/508c8cc8 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/508c8cc8 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/508c8cc8 Branch: refs/heads/master Commit: 508c8cc823118d2015aa12f323de7bf5afd77019 Parents: f533b2f Author: Colm O hEigeartaighAuthored: Tue Aug 1 17:27:04 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Aug 1 21:27:45 2017 +0100 -- .../main/java/org/apache/syncope/core/logic/AccessTokenLogic.java | 2 +- .../src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/508c8cc8/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java index c495392..e6b0099 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java @@ -54,7 +54,7 @@ public class AccessTokenLogic extends AbstractTransactionalLogic @PreAuthorize("isAuthenticated()") public Pair login() { if (anonymousUser.equals(AuthContextUtils.getUsername())) { -throw new IllegalArgumentException(anonymousUser + " cannot be granted for an access token"); +throw new IllegalArgumentException(anonymousUser + " cannot be granted an access token"); } return binder.create(AuthContextUtils.getUsername(), Collections. emptyMap(), false); http://git-wip-us.apache.org/repos/asf/syncope/blob/508c8cc8/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java index f86b633..b432c04 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java @@ -165,7 +165,7 @@ public class SAML2IdPLogic extends AbstractSAML2Logic { } else if (idp.getSSOLocation(SAML2BindingType.REDIRECT) != null) { idpTO.setBindingType(SAML2BindingType.REDIRECT); } else { -throw new IllegalArgumentException("Not POST nor REDIRECT artifacts supported by " + idp.getId()); +throw new IllegalArgumentException("Neither POST nor REDIRECT artifacts supported by " + idp.getId()); } result.add(idpTO);
[1/2] syncope git commit: Fixed WSS4J version on master + added a few lambdas in the SAML SSO code
Repository: syncope Updated Branches: refs/heads/master f533b2f73 -> 2f182750b Fixed WSS4J version on master + added a few lambdas in the SAML SSO code Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2f182750 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2f182750 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2f182750 Branch: refs/heads/master Commit: 2f182750bdef9e260c4e267f95e816c76a7fbccc Parents: 508c8cc Author: Colm O hEigeartaighAuthored: Tue Aug 1 17:27:20 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Aug 1 21:27:45 2017 +0100 -- .../core/rest/cxf/service/SAML2SPServiceImpl.java | 10 +- .../java/org/apache/syncope/fit/core/SAML2ITCase.java | 14 ++ pom.xml | 2 +- 3 files changed, 8 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/2f182750/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java -- diff --git a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java index 94d14f1..4ec2074 100644 --- a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java +++ b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java @@ -18,9 +18,6 @@ */ package org.apache.syncope.core.rest.cxf.service; -import java.io.IOException; -import java.io.OutputStream; - import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -42,13 +39,8 @@ public class SAML2SPServiceImpl extends AbstractServiceImpl implements SAML2SPSe @Override public Response getMetadata(final String spEntityID, final String urlContext) { -StreamingOutput sout = new StreamingOutput() { +StreamingOutput sout = (os) -> logic.getMetadata(StringUtils.appendIfMissing(spEntityID, "/"), urlContext, os); -@Override -public void write(final OutputStream os) throws IOException { -logic.getMetadata(StringUtils.appendIfMissing(spEntityID, "/"), urlContext, os); -} -}; return Response.ok(sout). type(MediaType.APPLICATION_XML). build(); http://git-wip-us.apache.org/repos/asf/syncope/blob/2f182750/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java index 948c426..2df4530 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java @@ -28,11 +28,11 @@ import static org.junit.Assert.fail; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; +import java.util.Optional; + import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.commons.codec.binary.Base64; -import org.apache.commons.collections4.IterableUtils; -import org.apache.commons.collections4.Predicate; import org.apache.cxf.jaxrs.client.WebClient; import org.apache.cxf.staxutils.StaxUtils; import org.apache.syncope.client.lib.AnonymousAuthenticationHandler; @@ -135,13 +135,11 @@ public class SAML2ITCase extends AbstractITCase { public void setIdPMapping() { Assume.assumeTrue(SAML2SPDetector.isSAML2SPAvailable()); -SAML2IdPTO ssoCircle = IterableUtils.find(saml2IdPService.list(), new Predicate() { +Optional ssoCircleOpt = +saml2IdPService.list().stream().filter(o -> "https://idp.ssocircle.com".equals(o.getEntityID())).findFirst(); +assertTrue(ssoCircleOpt.isPresent()); -@Override -public boolean evaluate(final SAML2IdPTO object) { -return "https://idp.ssocircle.com".equals(object.getEntityID()); -} -}); +SAML2IdPTO ssoCircle = ssoCircleOpt.get(); assertNotNull(ssoCircle); assertFalse(ssoCircle.getMappingItems().isEmpty()); assertNotNull(ssoCircle.getConnObjectKeyItem()); http://git-wip-us.apache.org/repos/asf/syncope/blob/2f182750/pom.xml -- diff --git a/pom.xml b/pom.xml index
syncope git commit: Use the Santuario JCEMapper instead to get the JCE signature algorithm
Repository: syncope Updated Branches: refs/heads/master 278525b7c -> 1afd1a705 Use the Santuario JCEMapper instead to get the JCE signature algorithm Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1afd1a70 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1afd1a70 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1afd1a70 Branch: refs/heads/master Commit: 1afd1a7053a2fb5d56b9f9ec4a858909e1957c6c Parents: 278525b Author: Colm O hEigeartaighAuthored: Wed Aug 16 16:00:11 2017 +0100 Committer: Colm O hEigeartaigh Committed: Wed Aug 16 16:00:11 2017 +0100 -- .../org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/1afd1a70/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java index 4aebdbb..8bf0c47 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java @@ -52,6 +52,7 @@ import org.apache.syncope.core.logic.init.SAML2SPLoader; import org.apache.wss4j.common.crypto.Merlin; import org.apache.wss4j.common.ext.WSSecurityException; import org.apache.wss4j.common.saml.OpenSAMLUtil; +import org.apache.xml.security.algorithms.JCEMapper; import org.opensaml.core.xml.XMLObject; import org.opensaml.saml.common.SignableSAMLObject; import org.opensaml.saml.saml2.core.RequestAbstractType; @@ -99,15 +100,13 @@ public class SAML2ReaderWriter { keyInfoGenerator = keyInfoGeneratorFactory.newInstance(); sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1; -jceSigAlgo = "SHA1withRSA"; String pubKeyAlgo = loader.getCredential().getPublicKey().getAlgorithm(); if (pubKeyAlgo.equalsIgnoreCase("DSA")) { sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_DSA_SHA1; -jceSigAlgo = "SHA1withDSA"; } else if (pubKeyAlgo.equalsIgnoreCase("EC")) { sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_ECDSA_SHA1; -jceSigAlgo = "SHA1withECDSA"; } +jceSigAlgo = JCEMapper.translateURItoJCEID(sigAlgo); callbackHandler = new SAMLSPCallbackHandler(loader.getKeyPass()); }
[2/5] syncope git commit: Dynamically generate a keypair for use in the SAML signing tests
Dynamically generate a keypair for use in the SAML signing tests Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1d8b6c62 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1d8b6c62 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1d8b6c62 Branch: refs/heads/2_0_X Commit: 1d8b6c62110564b57eb615b405346f1c978ee65e Parents: 919584f Author: Colm O hEigeartaighAuthored: Fri Aug 11 12:38:06 2017 +0100 Committer: Colm O hEigeartaigh Committed: Fri Aug 11 13:16:06 2017 +0100 -- fit/core-reference/pom.xml | 7 ++ .../apache/syncope/fit/core/SAML2ITCase.java| 104 +-- fit/core-reference/src/test/resources/fediz.xml | 14 +-- pom.xml | 2 + 4 files changed, 108 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/1d8b6c62/fit/core-reference/pom.xml -- diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml index de491a3..d28eb06 100644 --- a/fit/core-reference/pom.xml +++ b/fit/core-reference/pom.xml @@ -176,6 +176,13 @@ under the License. junit test + + org.bouncycastle + bcpkix-jdk15on + ${bouncycastle.version} + test + + http://git-wip-us.apache.org/repos/asf/syncope/blob/1d8b6c62/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java index e8a5add..4ae8c8f 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java @@ -26,12 +26,23 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; +import java.math.BigInteger; import java.nio.charset.StandardCharsets; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.KeyPair; +import java.security.KeyPairGenerator; import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Collections; +import java.util.Date; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.xml.namespace.QName; @@ -72,6 +83,13 @@ import org.apache.wss4j.common.util.Loader; import org.apache.wss4j.dom.WSConstants; import org.apache.wss4j.dom.engine.WSSConfig; import org.apache.xml.security.signature.XMLSignature; +import org.bouncycastle.asn1.x500.X500Name; +import org.bouncycastle.asn1.x500.style.RFC4519Style; +import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; +import org.bouncycastle.cert.X509v3CertificateBuilder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; +import org.bouncycastle.operator.ContentSigner; +import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; import org.joda.time.DateTime; import org.junit.AfterClass; import org.junit.Assume; @@ -86,6 +104,8 @@ import org.w3c.dom.Element; public class SAML2ITCase extends AbstractITCase { private static SyncopeClient anonymous; +private static Path keystorePath; +private static Path truststorePath; @BeforeClass public static void setup() { @@ -98,13 +118,17 @@ public class SAML2ITCase extends AbstractITCase { } @BeforeClass -public static void importFromIdPMetadata() { +public static void importFromIdPMetadata() throws Exception { if (!SAML2SPDetector.isSAML2SPAvailable()) { return; } assertTrue(saml2IdPService.list().isEmpty()); +createKeystores(); + +updateMetadataWithCert(); + WebClient.client(saml2IdPService). accept(MediaType.APPLICATION_XML_TYPE). type(MediaType.APPLICATION_XML_TYPE); @@ -124,7 +148,7 @@ public class SAML2ITCase extends AbstractITCase { } @AfterClass -public static void clearIdPs() { +public static void clearIdPs() throws Exception { if (!SAML2SPDetector.isSAML2SPAvailable()) { return; } @@ -132,6 +156,9 @@ public class SAML2ITCase extends AbstractITCase { for (SAML2IdPTO idp : saml2IdPService.list()) { saml2IdPService.delete(idp.getKey()); } + +
[2/2] syncope git commit: Support EC keys for signing in the SAML SSO module
Support EC keys for signing in the SAML SSO module Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3b24fd10 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3b24fd10 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3b24fd10 Branch: refs/heads/2_0_X Commit: 3b24fd10f1901430a42993da9d7f30f46cf2ab39 Parents: d70b33a Author: Colm O hEigeartaighAuthored: Thu Aug 10 17:02:26 2017 +0100 Committer: Colm O hEigeartaigh Committed: Thu Aug 10 17:56:35 2017 +0100 -- .../org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java| 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/3b24fd10/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java index 6fe20e6..62e90e7 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java @@ -102,6 +102,9 @@ public class SAML2ReaderWriter { if (pubKeyAlgo.equalsIgnoreCase("DSA")) { sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_DSA_SHA1; jceSigAlgo = "SHA1withDSA"; +} else if (pubKeyAlgo.equalsIgnoreCase("EC")) { +sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_ECDSA_SHA1; +jceSigAlgo = "SHA1withECDSA"; } callbackHandler = new SAMLSPCallbackHandler(loader.getKeyPass());
[1/2] syncope git commit: Avoid an NPE if the SAML Response Issuer is null
Repository: syncope Updated Branches: refs/heads/master 97744afe7 -> 8e73cd830 Avoid an NPE if the SAML Response Issuer is null Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/13230e26 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/13230e26 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/13230e26 Branch: refs/heads/master Commit: 13230e268b9361dbb056c8960a2e10e7cb7333b1 Parents: 97744af Author: Colm O hEigeartaighAuthored: Thu Aug 10 13:15:51 2017 +0100 Committer: Colm O hEigeartaigh Committed: Thu Aug 10 13:15:51 2017 +0100 -- .../src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/13230e26/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java index f6953e6..87b7eb6 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java @@ -363,6 +363,9 @@ public class SAML2SPLogic extends AbstractSAML2Logic { } // 3. validate the SAML response and, if needed, decrypt the provided assertion(s) +if (samlResponse.getIssuer() == null || samlResponse.getIssuer().getValue() == null) { +throw new IllegalArgumentException("The SAML Response must contain an Issuer"); +} final SAML2IdPEntity idp = getIdP(samlResponse.getIssuer().getValue()); if (idp.getConnObjectKeyItem() == null) { throw new IllegalArgumentException("No mapping provided for SAML 2.0 IdP '" + idp.getId() + "'");
[2/2] syncope git commit: Support EC keys for signing in the SAML SSO module
Support EC keys for signing in the SAML SSO module Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8e73cd83 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8e73cd83 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8e73cd83 Branch: refs/heads/master Commit: 8e73cd830305a5ed72fe3d57b225c2ed5a7a9280 Parents: 13230e2 Author: Colm O hEigeartaighAuthored: Thu Aug 10 17:02:26 2017 +0100 Committer: Colm O hEigeartaigh Committed: Thu Aug 10 17:02:26 2017 +0100 -- .../org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java| 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/8e73cd83/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java index 096dccb..e83af5e 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java @@ -103,6 +103,9 @@ public class SAML2ReaderWriter { if (pubKeyAlgo.equalsIgnoreCase("DSA")) { sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_DSA_SHA1; jceSigAlgo = "SHA1withDSA"; +} else if (pubKeyAlgo.equalsIgnoreCase("EC")) { +sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_ECDSA_SHA1; +jceSigAlgo = "SHA1withECDSA"; } callbackHandler = new SAMLSPCallbackHandler(loader.getKeyPass());
[1/3] syncope git commit: Take the valid SAML Assertion from the validator response instead.
Repository: syncope Updated Branches: refs/heads/master 5da5326ac -> 883911633 Take the valid SAML Assertion from the validator response instead. Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/88391163 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/88391163 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/88391163 Branch: refs/heads/master Commit: 88391163320f5d73ca51e4c03b0edc5371ab6e1e Parents: d8d5fe5 Author: Colm O hEigeartaighAuthored: Fri Aug 11 12:51:22 2017 +0100 Committer: Colm O hEigeartaigh Committed: Fri Aug 11 13:15:07 2017 +0100 -- .../apache/syncope/core/logic/SAML2SPLogic.java | 65 ++-- .../core/logic/saml2/SAML2ReaderWriter.java | 8 ++- 2 files changed, 39 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/88391163/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java index 31ef8c4..03576ab 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java @@ -37,6 +37,7 @@ import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Triple; import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer; import org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifier; +import org.apache.cxf.rs.security.saml.sso.SSOValidatorResponse; import org.apache.syncope.common.lib.AbstractBaseBean; import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.AttrTO; @@ -371,8 +372,10 @@ public class SAML2SPLogic extends AbstractSAML2Logic { if (idp.getConnObjectKeyItem() == null) { throw new IllegalArgumentException("No mapping provided for SAML 2.0 IdP '" + idp.getId() + "'"); } + +SSOValidatorResponse validatorResponse = null; try { -saml2rw.validate( +validatorResponse = saml2rw.validate( samlResponse, idp, getAssertionConsumerURL(response.getSpEntityID(), response.getUrlContext()), @@ -390,47 +393,45 @@ public class SAML2SPLogic extends AbstractSAML2Logic { responseTO.setIdp(idp.getId()); responseTO.setSloSupported(idp.getSLOLocation(idp.getBindingType()) != null); -NameID nameID = null; +Assertion assertion = validatorResponse.getOpensamlAssertion(); +NameID nameID = assertion.getSubject().getNameID(); String keyValue = null; -for (Assertion assertion : samlResponse.getAssertions()) { -nameID = assertion.getSubject().getNameID(); -if (StringUtils.isNotBlank(nameID.getValue()) -&& idp.getConnObjectKeyItem().getExtAttrName().equals("NameID")) { +if (StringUtils.isNotBlank(nameID.getValue()) +&& idp.getConnObjectKeyItem().getExtAttrName().equals("NameID")) { -keyValue = nameID.getValue(); -} +keyValue = nameID.getValue(); +} -if (assertion.getConditions().getNotOnOrAfter() != null) { - responseTO.setNotOnOrAfter(assertion.getConditions().getNotOnOrAfter().toDate()); -} -for (AuthnStatement authnStmt : assertion.getAuthnStatements()) { -responseTO.setSessionIndex(authnStmt.getSessionIndex()); +if (assertion.getConditions().getNotOnOrAfter() != null) { + responseTO.setNotOnOrAfter(assertion.getConditions().getNotOnOrAfter().toDate()); +} +for (AuthnStatement authnStmt : assertion.getAuthnStatements()) { +responseTO.setSessionIndex(authnStmt.getSessionIndex()); - responseTO.setAuthInstant(authnStmt.getAuthnInstant().toDate()); -if (authnStmt.getSessionNotOnOrAfter() != null) { - responseTO.setNotOnOrAfter(authnStmt.getSessionNotOnOrAfter().toDate()); -} +responseTO.setAuthInstant(authnStmt.getAuthnInstant().toDate()); +if (authnStmt.getSessionNotOnOrAfter() != null) { + responseTO.setNotOnOrAfter(authnStmt.getSessionNotOnOrAfter().toDate()); } +} -for (AttributeStatement attrStmt : assertion.getAttributeStatements()) { -for (Attribute attr : attrStmt.getAttributes()) { -if
[2/3] syncope git commit: Dynamically generate a keypair for use in the SAML signing tests
Dynamically generate a keypair for use in the SAML signing tests Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d8d5fe5e Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d8d5fe5e Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d8d5fe5e Branch: refs/heads/master Commit: d8d5fe5ee8c7e887f5c2fda8362aa9a0296635c9 Parents: a22a6b5 Author: Colm O hEigeartaighAuthored: Fri Aug 11 12:38:06 2017 +0100 Committer: Colm O hEigeartaigh Committed: Fri Aug 11 13:15:07 2017 +0100 -- fit/core-reference/pom.xml | 7 ++ .../apache/syncope/fit/core/SAML2ITCase.java| 104 +-- fit/core-reference/src/test/resources/fediz.xml | 14 +-- pom.xml | 2 + 4 files changed, 108 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/d8d5fe5e/fit/core-reference/pom.xml -- diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml index 5762a33..45a6214 100644 --- a/fit/core-reference/pom.xml +++ b/fit/core-reference/pom.xml @@ -176,6 +176,13 @@ under the License. junit test + + org.bouncycastle + bcpkix-jdk15on + ${bouncycastle.version} + test + + http://git-wip-us.apache.org/repos/asf/syncope/blob/d8d5fe5e/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java index 93608c2..9ee5653 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java @@ -26,12 +26,23 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; +import java.math.BigInteger; import java.nio.charset.StandardCharsets; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.KeyPair; +import java.security.KeyPairGenerator; import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Collections; +import java.util.Date; import java.util.Optional; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -71,6 +82,13 @@ import org.apache.wss4j.common.util.Loader; import org.apache.wss4j.dom.WSConstants; import org.apache.wss4j.dom.engine.WSSConfig; import org.apache.xml.security.signature.XMLSignature; +import org.bouncycastle.asn1.x500.X500Name; +import org.bouncycastle.asn1.x500.style.RFC4519Style; +import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; +import org.bouncycastle.cert.X509v3CertificateBuilder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; +import org.bouncycastle.operator.ContentSigner; +import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; import org.joda.time.DateTime; import org.junit.AfterClass; import org.junit.Assume; @@ -85,6 +103,8 @@ import org.w3c.dom.Element; public class SAML2ITCase extends AbstractITCase { private static SyncopeClient anonymous; +private static Path keystorePath; +private static Path truststorePath; @BeforeClass public static void setup() { @@ -97,13 +117,17 @@ public class SAML2ITCase extends AbstractITCase { } @BeforeClass -public static void importFromIdPMetadata() { +public static void importFromIdPMetadata() throws Exception { if (!SAML2SPDetector.isSAML2SPAvailable()) { return; } assertTrue(saml2IdPService.list().isEmpty()); +createKeystores(); + +updateMetadataWithCert(); + WebClient.client(saml2IdPService). accept(MediaType.APPLICATION_XML_TYPE). type(MediaType.APPLICATION_XML_TYPE); @@ -123,7 +147,7 @@ public class SAML2ITCase extends AbstractITCase { } @AfterClass -public static void clearIdPs() { +public static void clearIdPs() throws Exception { if (!SAML2SPDetector.isSAML2SPAvailable()) { return; } @@ -131,6 +155,9 @@ public class SAML2ITCase extends AbstractITCase { for (SAML2IdPTO idp : saml2IdPService.list()) { saml2IdPService.delete(idp.getKey()); } + +
[3/3] syncope git commit: SYNCOPE-1194 - Sign the SAML SSO Service Provider Metadata
SYNCOPE-1194 - Sign the SAML SSO Service Provider Metadata Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a22a6b55 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a22a6b55 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a22a6b55 Branch: refs/heads/master Commit: a22a6b55f83846bf06bbb322e9acc234a9425ea5 Parents: 5da5326 Author: Colm O hEigeartaighAuthored: Fri Aug 11 11:59:08 2017 +0100 Committer: Colm O hEigeartaigh Committed: Fri Aug 11 13:15:07 2017 +0100 -- .../apache/syncope/core/logic/SAML2SPLogic.java | 1 + .../core/logic/saml2/SAML2ReaderWriter.java | 3 +-- .../org/apache/syncope/fit/core/SAML2ITCase.java | 18 ++ 3 files changed, 20 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/a22a6b55/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java index 87b7eb6..31ef8c4 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java @@ -200,6 +200,7 @@ public class SAML2SPLogic extends AbstractSAML2Logic { } spEntityDescriptor.getRoleDescriptors().add(spSSODescriptor); +saml2rw.sign(spEntityDescriptor); saml2rw.write(new OutputStreamWriter(os), spEntityDescriptor, true); } catch (Exception e) { http://git-wip-us.apache.org/repos/asf/syncope/blob/a22a6b55/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java -- diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java index e83af5e..fa48e77 100644 --- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java +++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2ReaderWriter.java @@ -152,14 +152,13 @@ public class SAML2ReaderWriter { return responseObject; } -public void sign(final RequestAbstractType request) throws SecurityException { +public void sign(final SignableSAMLObject signableObject) throws SecurityException { org.opensaml.xmlsec.signature.Signature signature = OpenSAMLUtil.buildSignature(); signature.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); signature.setSignatureAlgorithm(sigAlgo); signature.setSigningCredential(loader.getCredential()); signature.setKeyInfo(keyInfoGenerator.generate(loader.getCredential())); -SignableSAMLObject signableObject = (SignableSAMLObject) request; signableObject.setSignature(signature); signableObject.releaseDOM(); signableObject.releaseChildrenDOM(true); http://git-wip-us.apache.org/repos/asf/syncope/blob/a22a6b55/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java index b87db1b..93608c2 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java @@ -30,10 +30,13 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.security.KeyStore; +import java.security.cert.X509Certificate; import java.util.Collections; import java.util.Optional; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import javax.xml.namespace.QName; + import org.apache.commons.codec.binary.Base64; import org.apache.cxf.helpers.DOMUtils; import org.apache.cxf.jaxrs.client.WebClient; @@ -67,6 +70,7 @@ import org.apache.wss4j.common.util.DOM2Writer; import org.apache.wss4j.common.util.Loader; import org.apache.wss4j.dom.WSConstants; import org.apache.wss4j.dom.engine.WSSConfig; +import org.apache.xml.security.signature.XMLSignature; import org.joda.time.DateTime; import org.junit.AfterClass; import org.junit.Assume; @@ -74,6 +78,7 @@ import org.junit.BeforeClass; import org.junit.Test; import
syncope git commit: Filter security.properties for the spring tests as well
Repository: syncope Updated Branches: refs/heads/master 2d444f625 -> 3faef350f Filter security.properties for the spring tests as well Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3faef350 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3faef350 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3faef350 Branch: refs/heads/master Commit: 3faef350fd2d9fdaf3d20ab6bd73ce6b83e4c695 Parents: 2d444f6 Author: Colm O hEigeartaighAuthored: Mon Jul 17 19:15:53 2017 +0100 Committer: Colm O hEigeartaigh Committed: Mon Jul 17 19:15:53 2017 +0100 -- core/spring/pom.xml | 7 +++ .../apache/syncope/core/spring/security/EncryptorTest.java| 7 +++ 2 files changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/3faef350/core/spring/pom.xml -- diff --git a/core/spring/pom.xml b/core/spring/pom.xml index d92d4e0..d33a01f 100644 --- a/core/spring/pom.xml +++ b/core/spring/pom.xml @@ -104,5 +104,12 @@ under the License. maven-checkstyle-plugin + + +src/main/resources +true + + + http://git-wip-us.apache.org/repos/asf/syncope/blob/3faef350/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java -- diff --git a/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java b/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java index 4bfa0fa..98c3f16 100644 --- a/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java +++ b/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java @@ -20,6 +20,7 @@ package org.apache.syncope.core.spring.security; import org.apache.syncope.core.spring.security.Encryptor; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -57,4 +58,10 @@ public class EncryptorTest { } } } + +@Test +public void testDecodeDefaultAESKey() throws Exception { +String password = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES); +assertEquals("password", password); +} }
syncope git commit: SYNCOPE-1168 - Encryptor pads short secret keys with "0" instead of random characters
Repository: syncope Updated Branches: refs/heads/master eebca673e -> 4214a3892 SYNCOPE-1168 - Encryptor pads short secret keys with "0" instead of random characters Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/4214a389 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/4214a389 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/4214a389 Branch: refs/heads/master Commit: 4214a38925ea07d6ab2a9d8bbf32fcd3fe0841d0 Parents: eebca67 Author: Colm O hEigeartaighAuthored: Tue Jul 18 11:02:40 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jul 18 11:36:21 2017 +0100 -- .../apache/syncope/core/spring/security/Encryptor.java | 11 +++ .../syncope/core/spring/security/EncryptorTest.java| 13 +++-- 2 files changed, 18 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/4214a389/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java -- diff --git a/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java b/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java index af64177..a97094a 100644 --- a/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java +++ b/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java @@ -154,11 +154,14 @@ public final class Encryptor { String actualKey = secretKey; if (actualKey.length() < 16) { StringBuilder actualKeyPadding = new StringBuilder(actualKey); -for (int i = 0; i < 16 - actualKey.length(); i++) { -actualKeyPadding.append('0'); -} +int length = 16 - actualKey.length(); +String randomChars = SecureRandomUtils.generateRandomPassword(length); + +actualKeyPadding.append(randomChars); actualKey = actualKeyPadding.toString(); -LOG.debug("actualKey too short, adding some random characters"); +LOG.warn("The secret key is too short (< 16), adding some random characters. " + + "Passwords encrypted with AES and this key will not be recoverable " + + "as a result if the container is restarted."); } try { http://git-wip-us.apache.org/repos/asf/syncope/blob/4214a389/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java -- diff --git a/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java b/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java index 98c3f16..064d970 100644 --- a/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java +++ b/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java @@ -61,7 +61,16 @@ public class EncryptorTest { @Test public void testDecodeDefaultAESKey() throws Exception { -String password = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES); -assertEquals("password", password); +String decPassword = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES); +assertEquals(password, decPassword); } + +@Test +public void testSmallKey() throws Exception { +Encryptor smallKeyEncryptor = Encryptor.getInstance("123"); +String encPassword = smallKeyEncryptor.encode(password, CipherAlgorithm.AES); +String decPassword = smallKeyEncryptor.decode(encPassword, CipherAlgorithm.AES); +assertEquals(password, decPassword); +} + }
syncope git commit: SYNCOPE-1168 - Encryptor pads short secret keys with "0" instead of random characters
Repository: syncope Updated Branches: refs/heads/2_0_X e21971bf5 -> 852dec694 SYNCOPE-1168 - Encryptor pads short secret keys with "0" instead of random characters Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/852dec69 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/852dec69 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/852dec69 Branch: refs/heads/2_0_X Commit: 852dec6946813ac4756b8868988e145316bd6f94 Parents: e21971b Author: Colm O hEigeartaighAuthored: Tue Jul 18 11:02:40 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jul 18 12:02:32 2017 +0100 -- .../apache/syncope/core/spring/security/Encryptor.java | 11 +++ .../syncope/core/spring/security/EncryptorTest.java| 13 +++-- 2 files changed, 18 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/852dec69/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java -- diff --git a/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java b/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java index af64177..a97094a 100644 --- a/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java +++ b/core/spring/src/main/java/org/apache/syncope/core/spring/security/Encryptor.java @@ -154,11 +154,14 @@ public final class Encryptor { String actualKey = secretKey; if (actualKey.length() < 16) { StringBuilder actualKeyPadding = new StringBuilder(actualKey); -for (int i = 0; i < 16 - actualKey.length(); i++) { -actualKeyPadding.append('0'); -} +int length = 16 - actualKey.length(); +String randomChars = SecureRandomUtils.generateRandomPassword(length); + +actualKeyPadding.append(randomChars); actualKey = actualKeyPadding.toString(); -LOG.debug("actualKey too short, adding some random characters"); +LOG.warn("The secret key is too short (< 16), adding some random characters. " + + "Passwords encrypted with AES and this key will not be recoverable " + + "as a result if the container is restarted."); } try { http://git-wip-us.apache.org/repos/asf/syncope/blob/852dec69/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java -- diff --git a/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java b/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java index 98c3f16..064d970 100644 --- a/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java +++ b/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java @@ -61,7 +61,16 @@ public class EncryptorTest { @Test public void testDecodeDefaultAESKey() throws Exception { -String password = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES); -assertEquals("password", password); +String decPassword = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES); +assertEquals(password, decPassword); } + +@Test +public void testSmallKey() throws Exception { +Encryptor smallKeyEncryptor = Encryptor.getInstance("123"); +String encPassword = smallKeyEncryptor.encode(password, CipherAlgorithm.AES); +String decPassword = smallKeyEncryptor.decode(encPassword, CipherAlgorithm.AES); +assertEquals(password, decPassword); +} + }
[1/2] syncope git commit: Filter security.properties for the spring tests as well
Repository: syncope Updated Branches: refs/heads/1_2_X 42b1b5f8d -> d4edbaa81 Filter security.properties for the spring tests as well Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ea687551 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ea687551 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ea687551 Branch: refs/heads/1_2_X Commit: ea68755183514cacbb48b966c14baec71c5dbfef Parents: 42b1b5f Author: Colm O hEigeartaighAuthored: Mon Jul 17 19:15:53 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jul 18 13:03:21 2017 +0100 -- .../java/org/apache/syncope/core/security/EncryptorTest.java | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/ea687551/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java -- diff --git a/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java b/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java index 7d8fdb6..626416f 100644 --- a/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java +++ b/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java @@ -18,6 +18,7 @@ */ package org.apache.syncope.core.security; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -56,4 +57,10 @@ public class EncryptorTest { } } } + +@Test +public void testDecodeDefaultAESKey() throws Exception { +String password = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES); +assertEquals("password", password); +} }
[2/2] syncope git commit: SYNCOPE-1168 - Encryptor pads short secret keys with "0" instead of random characters
SYNCOPE-1168 - Encryptor pads short secret keys with "0" instead of random characters Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d4edbaa8 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d4edbaa8 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d4edbaa8 Branch: refs/heads/1_2_X Commit: d4edbaa814bd50e0a7c8373c8624eb5e4b02763c Parents: ea68755 Author: Colm O hEigeartaighAuthored: Tue Jul 18 11:02:40 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jul 18 13:21:13 2017 +0100 -- .../java/org/apache/syncope/core/util/Encryptor.java| 11 +++ .../org/apache/syncope/core/security/EncryptorTest.java | 12 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/d4edbaa8/core/src/main/java/org/apache/syncope/core/util/Encryptor.java -- diff --git a/core/src/main/java/org/apache/syncope/core/util/Encryptor.java b/core/src/main/java/org/apache/syncope/core/util/Encryptor.java index 270f2f8..2e8c111 100644 --- a/core/src/main/java/org/apache/syncope/core/util/Encryptor.java +++ b/core/src/main/java/org/apache/syncope/core/util/Encryptor.java @@ -172,11 +172,14 @@ public final class Encryptor { String actualKey = secretKey; if (actualKey.length() < 16) { StringBuilder actualKeyPadding = new StringBuilder(actualKey); -for (int i = 0; i < 16 - actualKey.length(); i++) { -actualKeyPadding.append('0'); -} +int length = 16 - actualKey.length(); +String randomChars = SecureRandomUtil.generateRandomPassword(length); + +actualKeyPadding.append(randomChars); actualKey = actualKeyPadding.toString(); -LOG.debug("actualKey too short, adding some random characters"); +LOG.warn("The secret key is too short (< 16), adding some random characters. " + + "Passwords encrypted with AES and this key will not be recoverable " + + "as a result if the container is restarted."); } try { http://git-wip-us.apache.org/repos/asf/syncope/blob/d4edbaa8/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java -- diff --git a/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java b/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java index 626416f..c7fed5c 100644 --- a/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java +++ b/core/src/test/java/org/apache/syncope/core/security/EncryptorTest.java @@ -60,7 +60,15 @@ public class EncryptorTest { @Test public void testDecodeDefaultAESKey() throws Exception { -String password = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES); -assertEquals("password", password); +String decPassword = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES); +assertEquals(password, decPassword); +} + +@Test +public void testSmallKey() throws Exception { +Encryptor smallKeyEncryptor = Encryptor.getInstance("123"); +String encPassword = smallKeyEncryptor.encode(password, CipherAlgorithm.AES); +String decPassword = smallKeyEncryptor.decode(encPassword, CipherAlgorithm.AES); +assertEquals(password, decPassword); } }
syncope git commit: SYNCOPE-1165 - Switch the default password cipher algorithm from SHA1 to SSHA256
Repository: syncope Updated Branches: refs/heads/master 7ee0bf22c -> 0913da283 SYNCOPE-1165 - Switch the default password cipher algorithm from SHA1 to SSHA256 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/0913da28 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/0913da28 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/0913da28 Branch: refs/heads/master Commit: 0913da283a378fd87207b55b75b48266d3e98b18 Parents: 7ee0bf2 Author: Colm O hEigeartaighAuthored: Tue Jul 18 15:51:06 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jul 18 15:51:06 2017 +0100 -- .../src/main/resources/domains/MasterContent.xml | 2 +- .../core/spring/security/DefaultCredentialChecker.java | 3 ++- core/spring/src/main/resources/security.properties | 2 +- .../apache/syncope/core/spring/security/EncryptorTest.java | 8 pom.xml | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/0913da28/core/persistence-jpa/src/main/resources/domains/MasterContent.xml -- diff --git a/core/persistence-jpa/src/main/resources/domains/MasterContent.xml b/core/persistence-jpa/src/main/resources/domains/MasterContent.xml index 9d42535..875647b 100644 --- a/core/persistence-jpa/src/main/resources/domains/MasterContent.xml +++ b/core/persistence-jpa/src/main/resources/domains/MasterContent.xml @@ -28,7 +28,7 @@ under the License. + attribute_id="56db89b9-119e-4923-a16e-f42823b90c66" stringValue="SSHA256"/> anonymousKey 1abcdefghilmnopqrstuvz2!
syncope git commit: Changed the admin password for the archetype as well
Repository: syncope Updated Branches: refs/heads/master 0913da283 -> 030defd12 Changed the admin password for the archetype as well Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/030defd1 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/030defd1 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/030defd1 Branch: refs/heads/master Commit: 030defd12e45d3c6bf203b8668f5be047801b941 Parents: 0913da2 Author: Colm O hEigeartaighAuthored: Tue Jul 18 17:52:04 2017 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jul 18 17:52:04 2017 +0100 -- archetype/src/main/resources/META-INF/maven/archetype-metadata.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/030defd1/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml -- diff --git a/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml index f3ba98c..391cd25 100644 --- a/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -25,7 +25,7 @@ under the License. -5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 + DE088591C00CC98B36F5ADAAF7DA2B004CF7F2FE7BBB45B766B6409876E2F3DB13C7905C6AA59464
[1/2] syncope git commit: SYNCOPE-1173 - Replace List dynGroups with List dynMemberships
Repository: syncope Updated Branches: refs/heads/2_0_X 4a9964872 -> fffee9f15 SYNCOPE-1173 - Replace List dynGroups with List dynMemberships Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/025441a3 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/025441a3 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/025441a3 Branch: refs/heads/2_0_X Commit: 025441a36cf89f02b1b82e0ea617daa27b2ce9ac Parents: 4a99648 Author: Colm O hEigeartaighAuthored: Wed Jul 26 16:36:29 2017 +0100 Committer: Colm O hEigeartaigh Committed: Thu Jul 27 11:14:22 2017 +0100 -- .../client/console/wizards/any/Groups.java | 4 +- .../syncope/common/lib/to/AnyObjectTO.java | 12 +++--- .../common/lib/to/GroupableRelatableTO.java | 2 +- .../apache/syncope/common/lib/to/UserTO.java| 12 +++--- .../test/resources/domains/MasterContent.xml| 8 ++-- .../java/data/AnyObjectDataBinderImpl.java | 14 ++- .../java/data/UserDataBinderImpl.java | 15 +-- .../apache/syncope/fit/core/GroupITCase.java| 42 +--- .../org/apache/syncope/fit/core/RoleITCase.java | 2 +- .../syncope/fit/core/UserIssuesITCase.java | 5 ++- 10 files changed, 74 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/025441a3/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java index 8e640fd..499bc26 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java @@ -313,8 +313,8 @@ public class Groups extends WizardStep implements ICondition { GroupFiqlSearchConditionBuilder searchConditionBuilder = SyncopeClient.getGroupSearchConditionBuilder(); ArrayList conditions = new ArrayList<>(); -for (String groupKey : GroupableRelatableTO.class.cast(anyTO).getDynGroups()) { - conditions.add(searchConditionBuilder.is("key").equalTo(groupKey).wrap()); +for (MembershipTO membership : GroupableRelatableTO.class.cast(anyTO).getDynMemberships()) { + conditions.add(searchConditionBuilder.is("key").equalTo(membership.getGroupKey()).wrap()); } Map assignedGroups = new HashMap<>(); http://git-wip-us.apache.org/repos/asf/syncope/blob/025441a3/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyObjectTO.java -- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyObjectTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyObjectTO.java index 231504b..af8b0ea 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyObjectTO.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyObjectTO.java @@ -41,7 +41,7 @@ public class AnyObjectTO extends AnyTO implements GroupableRelatableTO { private final List memberships = new ArrayList<>(); -private final List dynGroups = new ArrayList<>(); +private final List dynMemberships = new ArrayList<>(); public String getName() { return name; @@ -91,11 +91,11 @@ public class AnyObjectTO extends AnyTO implements GroupableRelatableTO { return memberships; } -@XmlElementWrapper(name = "dynGroups") -@XmlElement(name = "role") -@JsonProperty("dynGroups") +@XmlElementWrapper(name = "dynMemberships") +@XmlElement(name = "dynMembership") +@JsonProperty("dynMemberships") @Override -public List getDynGroups() { -return dynGroups; +public List getDynMemberships() { +return dynMemberships; } } http://git-wip-us.apache.org/repos/asf/syncope/blob/025441a3/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupableRelatableTO.java -- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupableRelatableTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupableRelatableTO.java index 0dba26d..f2b8dbc 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupableRelatableTO.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupableRelatableTO.java @@ -26,7 +26,7 @@ public interface GroupableRelatableTO { List getMemberships(); -
[2/2] syncope git commit: Removing Java 8 idioms
Removing Java 8 idioms Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/fffee9f1 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/fffee9f1 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/fffee9f1 Branch: refs/heads/2_0_X Commit: fffee9f15d2a7dfdc49524e983e1cb0d9254271f Parents: 025441a Author: Colm O hEigeartaighAuthored: Thu Jul 27 12:46:35 2017 +0100 Committer: Colm O hEigeartaigh Committed: Thu Jul 27 12:46:35 2017 +0100 -- .../apache/syncope/fit/core/GroupITCase.java| 65 +--- .../syncope/fit/core/UserIssuesITCase.java | 12 +++- 2 files changed, 69 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/fffee9f1/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java index 9d833cc..fe9129d 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java @@ -38,6 +38,8 @@ import javax.naming.directory.SearchResult; import javax.ws.rs.ForbiddenException; import javax.ws.rs.core.GenericType; import javax.ws.rs.core.Response; + +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.IterableUtils; import org.apache.commons.collections4.Predicate; import org.apache.commons.lang3.SerializationUtils; @@ -652,7 +654,14 @@ public class GroupITCase extends AbstractITCase { List memberships = userService.read( "c9b2dec2-00a7-4855-97c0-d854842b4b24").getDynMemberships(); -assertTrue(memberships.stream().anyMatch(m -> m.getGroupKey().equals(groupKey))); +assertFalse(CollectionUtils.select(memberships, new Predicate() { + +public boolean evaluate(MembershipTO object) { +return object.getGroupKey().equals(groupKey); +} + + +}).isEmpty()); GroupPatch patch = new GroupPatch(); patch.setKey(group.getKey()); @@ -683,14 +692,35 @@ public class GroupITCase extends AbstractITCase { assertNotNull(newAny.getPlainAttr("location")); List memberships = anyObjectService.read( "fc6dbc3a-6c07-4965-8781-921e7401a4a5").getDynMemberships(); -assertTrue(memberships.stream().anyMatch(m -> m.getGroupKey().equals(groupKey))); +assertFalse(CollectionUtils.select(memberships, new Predicate() { + +public boolean evaluate(MembershipTO object) { +return object.getGroupKey().equals(groupKey); +} + + +}).isEmpty()); memberships = anyObjectService.read( "8559d14d-58c2-46eb-a2d4-a7d35161e8f8").getDynMemberships(); -assertTrue(memberships.stream().anyMatch(m -> m.getGroupKey().equals(groupKey))); +assertFalse(CollectionUtils.select(memberships, new Predicate() { + +public boolean evaluate(MembershipTO object) { +return object.getGroupKey().equals(groupKey); +} + + +}).isEmpty()); memberships = anyObjectService.read(newAny.getKey()).getDynMemberships(); -assertTrue(memberships.stream().anyMatch(m -> m.getGroupKey().equals(groupKey))); +assertFalse(CollectionUtils.select(memberships, new Predicate() { + +public boolean evaluate(MembershipTO object) { +return object.getGroupKey().equals(groupKey); +} + + +}).isEmpty()); // 2. update group and change aDynMembership condition fiql = SyncopeClient.getAnyObjectSearchConditionBuilder("PRINTER").is("location").nullValue().query(); @@ -717,12 +747,33 @@ public class GroupITCase extends AbstractITCase { memberships = anyObjectService.read( "fc6dbc3a-6c07-4965-8781-921e7401a4a5").getDynMemberships(); -assertFalse(memberships.stream().anyMatch(m -> m.getGroupKey().equals(groupKey))); +assertTrue(CollectionUtils.select(memberships, new Predicate() { + +public boolean evaluate(MembershipTO object) { +return object.getGroupKey().equals(groupKey); +} + + +}).isEmpty()); memberships = anyObjectService.read( "8559d14d-58c2-46eb-a2d4-a7d35161e8f8").getDynMemberships(); -assertFalse(memberships.stream().anyMatch(m -> m.getGroupKey().equals(groupKey))); +assertTrue(CollectionUtils.select(memberships, new Predicate() { + +public boolean
syncope git commit: SYNCOPE-1174 - NPE in AccessTokenDataBinderImpl if no 'jwt.lifetime.minutes' schema is present
Repository: syncope Updated Branches: refs/heads/master aa11ac9b4 -> 64ef5bf18 SYNCOPE-1174 - NPE in AccessTokenDataBinderImpl if no 'jwt.lifetime.minutes' schema is present Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/64ef5bf1 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/64ef5bf1 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/64ef5bf1 Branch: refs/heads/master Commit: 64ef5bf1800f699168f59fbd27be113c76cd0baa Parents: aa11ac9 Author: Colm O hEigeartaighAuthored: Thu Jul 27 16:47:35 2017 +0100 Committer: Colm O hEigeartaigh Committed: Thu Jul 27 16:47:35 2017 +0100 -- .../java/data/AccessTokenDataBinderImpl.java | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/64ef5bf1/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java -- diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java index 13a5b93..b415fb2 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java @@ -38,6 +38,7 @@ import org.apache.syncope.core.persistence.api.dao.AccessTokenDAO; import org.apache.syncope.core.persistence.api.dao.ConfDAO; import org.apache.syncope.core.persistence.api.entity.AccessToken; import org.apache.syncope.core.persistence.api.entity.EntityFactory; +import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr; import org.apache.syncope.core.provisioning.api.data.AccessTokenDataBinder; import org.apache.syncope.core.provisioning.api.serialization.POJOHelper; import org.apache.syncope.core.spring.BeanUtils; @@ -124,9 +125,17 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { } if (replaceExisting || body == null) { +int duration = 120; +CPlainAttr jwtLifetimeMins = confDAO.find("jwt.lifetime.minutes", "120"); +if (jwtLifetimeMins != null) { +duration = jwtLifetimeMins.getValues().get(0).getLongValue().intValue(); +} else { +LOG.warn("No schema found for 'jwt.lifetime.minutes'. Using default value of '120'"); +} + Triple created = generateJWT( subject, -confDAO.find("jwt.lifetime.minutes", "120").getValues().get(0).getLongValue().intValue(), +duration, claims); body = created.getMiddle();
syncope git commit: SYNCOPE-1174 - NPE in AccessTokenDataBinderImpl if no 'jwt.lifetime.minutes' schema is present
Repository: syncope Updated Branches: refs/heads/2_0_X fffee9f15 -> 6634daaee SYNCOPE-1174 - NPE in AccessTokenDataBinderImpl if no 'jwt.lifetime.minutes' schema is present Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6634daae Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6634daae Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6634daae Branch: refs/heads/2_0_X Commit: 6634daaeebbe95fea9e1c104bc64d7b2e0d45e4b Parents: fffee9f Author: Colm O hEigeartaighAuthored: Thu Jul 27 16:47:35 2017 +0100 Committer: Colm O hEigeartaigh Committed: Thu Jul 27 16:48:02 2017 +0100 -- .../java/data/AccessTokenDataBinderImpl.java | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/6634daae/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java -- diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java index 13a5b93..b415fb2 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java @@ -38,6 +38,7 @@ import org.apache.syncope.core.persistence.api.dao.AccessTokenDAO; import org.apache.syncope.core.persistence.api.dao.ConfDAO; import org.apache.syncope.core.persistence.api.entity.AccessToken; import org.apache.syncope.core.persistence.api.entity.EntityFactory; +import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr; import org.apache.syncope.core.provisioning.api.data.AccessTokenDataBinder; import org.apache.syncope.core.provisioning.api.serialization.POJOHelper; import org.apache.syncope.core.spring.BeanUtils; @@ -124,9 +125,17 @@ public class AccessTokenDataBinderImpl implements AccessTokenDataBinder { } if (replaceExisting || body == null) { +int duration = 120; +CPlainAttr jwtLifetimeMins = confDAO.find("jwt.lifetime.minutes", "120"); +if (jwtLifetimeMins != null) { +duration = jwtLifetimeMins.getValues().get(0).getLongValue().intValue(); +} else { +LOG.warn("No schema found for 'jwt.lifetime.minutes'. Using default value of '120'"); +} + Triple created = generateJWT( subject, -confDAO.find("jwt.lifetime.minutes", "120").getValues().get(0).getLongValue().intValue(), +duration, claims); body = created.getMiddle();