Re: [DISCUSS] Remove Camel Provisioning Manager

2022-08-24 Thread Jean-Baptiste Onofré
No objection from my side.

Regards
JB

On Wed, Aug 24, 2022 at 1:16 PM Francesco Chicchiriccò
 wrote:
>
> Hi all,
> working for SYNCOPE-1692, which involves some changes in the provisioning 
> process, I've realized that the Camel Provisioning Manager extension [1], 
> while featuring some very smart code has probably never been used in any 
> production deployment, at least none that I am aware of.
>
> Over time, the cost of managing such (possibly unused) extension has become 
> quite relevant, hence I am proposing to remove it from the master branch, so 
> that next 3.0.0 release will not contain it anymore.
>
> Thoughts?
> Regards.
>
> [1] https://github.com/apache/syncope/tree/master/ext/camel
>
> --
> Francesco Chicchiriccò
>
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
>
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
>


[GitHub] [syncope] github-code-scanning[bot] commented on a diff in pull request #370: [SYNCOPE-1692] Refactoring the propagation process to allow for ConnId's updateDelta

2022-08-24 Thread GitBox


github-code-scanning[bot] commented on code in PR #370:
URL: https://github.com/apache/syncope/pull/370#discussion_r953914138


##
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/serialization/AbstractValueSerializer.java:
##
@@ -0,0 +1,64 @@
+/*
+ * 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.api.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import java.io.IOException;
+import java.util.Base64;
+import java.util.List;
+import org.identityconnectors.common.security.GuardedString;
+
+public abstract class AbstractValueSerializer extends 
JsonSerializer {
+
+public static final String BYTE_ARRAY_PREFIX = "";
+
+public static final String BYTE_ARRAY_SUFFIX = "";
+
+protected void doSerialize(final List value, final JsonGenerator 
jgen) throws IOException {
+if (value == null) {
+jgen.writeNull();
+} else {
+jgen.writeStartArray();
+for (Object v : value) {
+if (v == null) {

Review Comment:
   ## Chain of 'instanceof' tests
   
   This if block performs a chain of 6 type tests - consider alternatives, e.g. 
polymorphism or the visitor pattern.
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/1123)



##
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PropagationData.java:
##
@@ -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.persistence.api.entity.task;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.io.Serializable;
+import java.util.Set;
+import org.identityconnectors.framework.common.objects.Attribute;
+import org.identityconnectors.framework.common.objects.AttributeDelta;
+
+public class PropagationData implements Serializable {
+
+private static final long serialVersionUID = -6193849782964810456L;
+
+public static class Builder {
+
+private final PropagationData instance;
+
+public Builder() {
+instance = new PropagationData();
+}
+
+public Builder attributes(final Set attributes) {
+instance.setAttributes(attributes);
+return this;
+}
+
+public Builder attributeDeltas(final Set 
attributeDeltas) {
+instance.setAttributeDeltas(attributeDeltas);
+return this;
+}
+
+public PropagationData build() {
+return instance;
+}
+}
+
+private Set attributes;
+
+private Set attributeDeltas;
+
+public Set getAttributes() {

Review Comment:
   ## Exposing internal representation
   
   getAttributes exposes the internal representation stored in field 
attributes. The value may be modified [after this call to getAttributes](1).
   getAttributes exposes the internal representation stored in field 
attributes. The value may be modified [after this call to getAttributes](2).
   getAttributes exposes the internal representation stored in field 
attributes. The value may be modified [after this call to getAttributes](3).
   getAttributes exposes the internal representation stored in field 
attributes. The value may be modified [after this call to getAttributes](4).
   getAttributes exposes the internal representation stored in field 

[GitHub] [syncope] ilgrosso opened a new pull request, #370: [SYNCOPE-1692] Refactoring the propagation process to allow for ConnId's updateDelta

2022-08-24 Thread GitBox


ilgrosso opened a new pull request, #370:
URL: https://github.com/apache/syncope/pull/370

   Missing:
   
   - [ ] additional tests
   - [ ] docs update


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@syncope.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [DISCUSS] Remove Camel Provisioning Manager

2022-08-24 Thread Misagh Moayyed
In general, I am in favor of this approach, but just to be on the safe
side, would it make sense to deprecate the feature first? Just in case
someone out there is using it, or would keeping the code around cause
complications and maintenance issues?

On Wed, Aug 24, 2022 at 4:16 AM Francesco Chicchiriccò
 wrote:
>
> Hi all,
> working for SYNCOPE-1692, which involves some changes in the provisioning 
> process, I've realized that the Camel Provisioning Manager extension [1], 
> while featuring some very smart code has probably never been used in any 
> production deployment, at least none that I am aware of.
>
> Over time, the cost of managing such (possibly unused) extension has become 
> quite relevant, hence I am proposing to remove it from the master branch, so 
> that next 3.0.0 release will not contain it anymore.
>
> Thoughts?
> Regards.
>
> [1] https://github.com/apache/syncope/tree/master/ext/camel
>
> --
> Francesco Chicchiriccò
>
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
>
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
>


[DISCUSS] Remove Camel Provisioning Manager

2022-08-24 Thread Francesco Chicchiriccò

Hi all,
working for SYNCOPE-1692, which involves some changes in the provisioning 
process, I've realized that the Camel Provisioning Manager extension [1], while 
featuring some very smart code has probably never been used in any production 
deployment, at least none that I am aware of.

Over time, the cost of managing such (possibly unused) extension has become 
quite relevant, hence I am proposing to remove it from the master branch, so 
that next 3.0.0 release will not contain it anymore.

Thoughts?
Regards.

[1] https://github.com/apache/syncope/tree/master/ext/camel

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/