You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2026/09/14 06:29:03 UTC

(syncope) branch 4_0_X updated (02ce8a5f92 -> 3616f4a4d5)

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a change to branch 4_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


    from 02ce8a5f92 Bump org.sonarsource.scanner.maven:sonar-maven-plugin
     new 23531c0ce7 [SYNCOPE-1997] - Fix connectivity check and improve topology UI to prevent scrolling (#1530)
     new 3616f4a4d5 hide timestamp in generated OpenAPI code (#1533)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../resources/META-INF/resources/css/topology.scss |  2 +-
 .../syncope/client/console/topology/Topology.html  |  2 +-
 .../apache/syncope/core/logic/ResourceLogic.java   |  9 ++++
 .../provisioning/api/data/ResourceDataBinder.java  | 49 ++++++++++++++++++++++
 ext/openfga/client-openfga/pom.xml                 |  1 +
 5 files changed, 61 insertions(+), 2 deletions(-)


(syncope) 01/02: [SYNCOPE-1997] - Fix connectivity check and improve topology UI to prevent scrolling (#1530)

Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 4_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git

commit 23531c0ce7e2f868d3c04a419bd235b445c2d46b
Author: Matteo Tatoni <ta...@gmail.com>
AuthorDate: Mon Sep 14 08:22:15 2026 +0200

    [SYNCOPE-1997] - Fix connectivity check and improve topology UI to prevent scrolling (#1530)
---
 .../resources/META-INF/resources/css/topology.scss |  2 +-
 .../syncope/client/console/topology/Topology.html  |  2 +-
 .../apache/syncope/core/logic/ResourceLogic.java   |  9 ++++
 .../provisioning/api/data/ResourceDataBinder.java  | 49 ++++++++++++++++++++++
 4 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/client/idm/console/src/main/resources/META-INF/resources/css/topology.scss b/client/idm/console/src/main/resources/META-INF/resources/css/topology.scss
index 52674d114b..de890ca91c 100644
--- a/client/idm/console/src/main/resources/META-INF/resources/css/topology.scss
+++ b/client/idm/console/src/main/resources/META-INF/resources/css/topology.scss
@@ -32,7 +32,7 @@
 #topology {
   position: relative;
   border: 0;
-  height: 780px;
+  height: calc(100vh - 175px);
   overflow: hidden;
   cursor: grab;
 }
diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html
index 17ccca0022..d2ec3c78a5 100644
--- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html
+++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html
@@ -40,7 +40,7 @@ under the License.
   <wicket:extend>
     <span wicket:id="toggle"/>
 
-    <div id="zoom" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+    <div id="zoom" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only pt-2 pe-2 pb-1">
       <span wicket:id="zoom">[Actions]</span>
     </div>
     <div id="topology">
diff --git a/core/idm/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java b/core/idm/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
index 7e26fd99cc..1ea04a7c13 100644
--- a/core/idm/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
+++ b/core/idm/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
@@ -33,6 +33,7 @@ import org.apache.syncope.common.lib.to.Item;
 import org.apache.syncope.common.lib.to.Provision;
 import org.apache.syncope.common.lib.to.ResourceTO;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
 import org.apache.syncope.common.lib.types.IdMEntitlement;
 import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO;
 import org.apache.syncope.core.persistence.api.dao.ConnInstanceDAO;
@@ -429,6 +430,14 @@ public class ResourceLogic extends AbstractTransactionalLogic<ResourceTO> {
         ConnInstance connInstance = connInstanceDAO.findById(resourceTO.getConnector()).
                 orElseThrow(() -> new NotFoundException("Connector " + resourceTO.getConnector()));
 
+        Optional.ofNullable(resourceTO.getKey()).flatMap(resourceDAO::findById).
+                ifPresent(externalResource -> {
+                    Optional<List<ConnConfProperty>> newConfOverride =
+                            ResourceDataBinder.newConf(externalResource.getConfOverride(),
+                                    resourceTO.getConfOverride());
+                    resourceTO.setConfOverride(newConfOverride);
+                });
+
         connectorManager.createConnector(
                 connectorManager.buildConnInstanceOverride(
                         connInstance,
diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
index eb72ae70a6..e45cbaf2cd 100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
@@ -18,8 +18,13 @@
  */
 package org.apache.syncope.core.provisioning.api.data;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
 import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
 import org.apache.syncope.core.persistence.api.entity.ExternalResource;
+import org.identityconnectors.common.security.GuardedString;
 
 public interface ResourceDataBinder {
 
@@ -28,4 +33,48 @@ public interface ResourceDataBinder {
     ExternalResource create(ResourceTO resourceTO);
 
     ExternalResource update(ExternalResource resource, ResourceTO resourceTO);
+
+    static Optional<List<ConnConfProperty>> newConf(
+            final Optional<List<ConnConfProperty>> previousConfOverride,
+            final Optional<List<ConnConfProperty>> toConfOverride) {
+
+        if (toConfOverride.isEmpty()) {
+            return Optional.empty();
+        }
+
+        if (previousConfOverride.isEmpty()) {
+            return toConfOverride;
+        }
+
+        List<ConnConfProperty> newConf = new ArrayList<>();
+
+        toConfOverride.get().forEach(property -> {
+            if (property.getSchema().isConfidential()
+                    || GuardedString.class.getName().equals(property.getSchema().getType())) {
+
+                if (property.getValues().isEmpty()) {
+                    // no values provided, keep existing
+                    previousConfOverride.get().stream().
+                            filter(p -> p.getSchema().getName().equals(property.getSchema().getName())).
+                            findFirst().ifPresent(newConf::add);
+                } else {
+                    // translate confidential properties' cleartext values into GuardedStrings
+                    ConnConfProperty newProperty = new ConnConfProperty();
+                    newProperty.setSchema(property.getSchema());
+                    newProperty.setOverridable(property.isOverridable());
+                    property.getValues().forEach(value -> {
+                        if (value instanceof String string) {
+                            newProperty.getValues().add(new GuardedString(string.toCharArray()));
+                        } else {
+                            newProperty.getValues().add(value);
+                        }
+                    });
+                }
+            }
+
+            newConf.add(property);
+        });
+
+        return Optional.of(newConf);
+    }
 }


(syncope) 02/02: hide timestamp in generated OpenAPI code (#1533)

Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 4_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git

commit 3616f4a4d5dab6c4f0eb2f08a24fe9749ff4fbcb
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Mon Sep 14 08:19:06 2026 +0200

    hide timestamp in generated OpenAPI code (#1533)
---
 ext/openfga/client-openfga/pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ext/openfga/client-openfga/pom.xml b/ext/openfga/client-openfga/pom.xml
index 5e2d08b3f2..c895c8f083 100644
--- a/ext/openfga/client-openfga/pom.xml
+++ b/ext/openfga/client-openfga/pom.xml
@@ -89,6 +89,7 @@ under the License.
                 <useJakartaEe>true</useJakartaEe>
                 <openApiNullable>false</openApiNullable>
                 <sourceFolder>/</sourceFolder>
+                <hideGenerationTimestamp>true</hideGenerationTimestamp>
               </configOptions>
             </configuration>
           </execution>