[GitHub] [syncope] ilgrosso commented on a change in pull request #189: SYNCOPE-1562: Manage tokens for WA GoogleAuth MFA
ilgrosso commented on a change in pull request #189: URL: https://github.com/apache/syncope/pull/189#discussion_r430202043 ## File path: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/auth/AuthProfile.java ## @@ -0,0 +1,40 @@ +/* + * 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.auth; + +import org.apache.syncope.common.lib.types.GoogleMfaAuthToken; +import org.apache.syncope.core.persistence.api.entity.Entity; + +import java.util.List; + +public interface AuthProfile extends Entity { + +String getOwner(); + +void setOwner(String owner); + +List getGoogleMfaAuthTokens(); + +void setGoogleMfaAuthTokens(List tokens); Review comment: exactly, it is not needed, following the general approach we use everywhere else ## File path: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/auth/AuthProfileDAO.java ## @@ -0,0 +1,37 @@ +/* + * 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.dao.auth; + +import org.apache.syncope.core.persistence.api.dao.DAO; +import org.apache.syncope.core.persistence.api.entity.auth.AuthProfile; + +import java.util.List; +import java.util.Optional; + +public interface AuthProfileDAO extends DAO { + +List findAll(); Review comment: for administration purpose, I mean; I think we should also have an `AuthProfileService` allowing to browse and delete the available profiles. ## File path: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/auth/AuthProfile.java ## @@ -0,0 +1,40 @@ +/* + * 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.auth; + +import org.apache.syncope.common.lib.types.GoogleMfaAuthToken; +import org.apache.syncope.core.persistence.api.entity.Entity; + +import java.util.List; + +public interface AuthProfile extends Entity { + +String getOwner(); + +void setOwner(String owner); + +List getGoogleMfaAuthTokens(); + +void setGoogleMfaAuthTokens(List tokens); Review comment: I was referring to the fact of having setter for collection, which we don't generally do; however, it seems that [JPAConnInstance](https://github.com/apache/syncope/blob/master/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPAConnInstance.java#L195) is exactly in the same situation, as the collection is being serialized to JSON. Sorry for the noise! ## File path:
[GitHub] [syncope] mmoayyed commented on a change in pull request #189: SYNCOPE-1562: Manage tokens for WA GoogleAuth MFA
mmoayyed commented on a change in pull request #189: URL: https://github.com/apache/syncope/pull/189#discussion_r430200152 ## File path: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/auth/AuthProfileDAO.java ## @@ -0,0 +1,37 @@ +/* + * 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.dao.auth; + +import org.apache.syncope.core.persistence.api.dao.DAO; +import org.apache.syncope.core.persistence.api.entity.auth.AuthProfile; + +import java.util.List; +import java.util.Optional; + +public interface AuthProfileDAO extends DAO { + +List findAll(); Review comment: Why would you delete an auth-profile? ## File path: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/auth/AuthProfile.java ## @@ -0,0 +1,40 @@ +/* + * 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.auth; + +import org.apache.syncope.common.lib.types.GoogleMfaAuthToken; +import org.apache.syncope.core.persistence.api.entity.Entity; + +import java.util.List; + +public interface AuthProfile extends Entity { + +String getOwner(); + +void setOwner(String owner); + +List getGoogleMfaAuthTokens(); + +void setGoogleMfaAuthTokens(List tokens); Review comment: Sorry I dont follow. Do you mean this should be removed? ## File path: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/auth/AuthProfileDAO.java ## @@ -0,0 +1,37 @@ +/* + * 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.dao.auth; + +import org.apache.syncope.core.persistence.api.dao.DAO; +import org.apache.syncope.core.persistence.api.entity.auth.AuthProfile; + +import java.util.List; +import java.util.Optional; + +public interface AuthProfileDAO extends DAO { + +List findAll(); Review comment: Gotcha, sure. I'll make it happen. ## File path: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/auth/AuthProfile.java ## @@ -0,0 +1,40 @@ +/* + * 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
Broken: apache/syncope#6535 (2_0_X - 9dd15ce)
Build Update for apache/syncope - Build: #6535 Status: Broken Duration: 25 mins and 14 secs Commit: 9dd15ce (2_0_X) Author: Francesco Chicchiriccò Message: [SYNCOPE-1565] Fix JAXB View the changeset: https://github.com/apache/syncope/compare/cb7ea4f0e043...9dd15ced2455 View the full build log and details: https://travis-ci.org/github/apache/syncope/builds/691251617?utm_medium=notification_source=email -- You can unsubscribe from build emails from the apache/syncope repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=3236582_medium=notification_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.
Broken: apache/syncope#6535 (2_0_X - 9dd15ce)
Build Update for apache/syncope - Build: #6535 Status: Broken Duration: 35 mins and 32 secs Commit: 9dd15ce (2_0_X) Author: Francesco Chicchiriccò Message: [SYNCOPE-1565] Fix JAXB View the changeset: https://github.com/apache/syncope/compare/cb7ea4f0e043...9dd15ced2455 View the full build log and details: https://travis-ci.org/github/apache/syncope/builds/691251617?utm_medium=notification_source=email -- You can unsubscribe from build emails from the apache/syncope repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=3236582_medium=notification_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.
[jira] [Commented] (SYNCOPE-1565) Integration tests run with XML payloads are failing
[ https://issues.apache.org/jira/browse/SYNCOPE-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17116608#comment-17116608 ] ASF subversion and git services commented on SYNCOPE-1565: -- Commit 9dd15ced2455457c75b76849c8ea0e73ee57829e in syncope's branch refs/heads/2_0_X from Francesco Chicchiriccò [ https://gitbox.apache.org/repos/asf?p=syncope.git;h=9dd15ce ] [SYNCOPE-1565] Fix JAXB > Integration tests run with XML payloads are failing > --- > > Key: SYNCOPE-1565 > URL: https://issues.apache.org/jira/browse/SYNCOPE-1565 > Project: Syncope > Issue Type: Bug > Components: client, core >Affects Versions: 2.0.15, 2.1.6 >Reporter: Francesco Chicchiriccò >Assignee: Francesco Chicchiriccò >Priority: Major > Fix For: 2.0.16, 2.1.7, 3.0.0 > > > When running integration tests via > {code:java} > mvn clean verify \ > -Djaxrs.content.type=application/xml \ > -Dit.test=org.apache.syncope.fit.core.*ITCase > {code} > several failures are reported -- This message was sent by Atlassian Jira (v8.3.4#803005)
Re: 2.1.x XML regression?
I committed the fix yesterday on 2_1_X for > > https://issues.apache.org/jira/browse/SYNCOPE-1565 > > If you run the curl command as above against 2.1.7-SNAPSHOT it will work > as expected, as you can see for example by > > curl -H "Accept: application/xml" -u "admin:password" > https://syncope-vm.apache.org/syncope/rest/groups Thanks Francesco! Colm. > > > Regards. > > -- > 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/ > >
Re: 2.1.x XML regression?
On 26/05/20 11:07, Colm O hEigeartaigh wrote: > Hi all, > > I'm just migrating some test-cases from Syncope 2.0.13 to 2.1.6. I've > noticed what seems like a regression. I'm creating a group called "boss" in > Syncope. With 2.0.X I can query the REST API as follows: > > curl -H "Accept: application/xml" -u "admin:password" > http://localhost:9080/syncope/rest/groups - > v > > and I see: > > standalone="yes"?>http://syncope.apache.org/2.0;>1http://www.w3.org/2001/XMLSchema-instance; > xsi:type="syncope2:groupTO">2020-05-26T09:57:32.237+01:00admin2020-05-26T09:57:32.237+01:00adminorg.apache.syncope.common.lib.to.GroupTO374fdc23-9aad-455d-8fdc-239aada55d34/GROUP00boss0011 > > However, with 2.1.6 I only see: > > standalone="yes"?>http://syncope.apache.org/2.1 > ">111 > > With JSON in 2.1.6 it's OK: > > {"prev":null,"next":null,"page":1,"size":1,"totalCount":1,"result":[{"@class":"org.apache.syncope.common.lib.to.GroupTO","@class":"org.apache.syncope.common.lib.to.GroupTO","key":"5cc6e67e-5321-46c4-86e6-7e532176c4ba","type":"GROUP","realm":"/","name":"boss","creator":"admin","creationDate":"2020-05-26T09:03:23.911+","lastModifier":"admin","lastChangeDate":"2020-05-26T09:03:23.911+","status":null,"userOwner":null,"groupOwner":null,"udynMembershipCond":null,"staticUserMembershipCount":0,"dynamicUserMembershipCount":0,"staticAnyObjectMembershipCount":0,"dynamicAnyObjectMembershipCount":0,"adynMembershipConds":{},"dynRealms":[],"auxClasses":[],"plainAttrs":[],"derAttrs":[],"virAttrs":[],"resources":[],"typeExtensions":[]}]} > > Should I create a JIRA for this, or am I making a mistake somewhere? Hi Colm, I committed the fix yesterday on 2_1_X for https://issues.apache.org/jira/browse/SYNCOPE-1565 If you run the curl command as above against 2.1.7-SNAPSHOT it will work as expected, as you can see for example by curl -H "Accept: application/xml" -u "admin:password" https://syncope-vm.apache.org/syncope/rest/groups Regards. -- 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/
2.1.x XML regression?
Hi all, I'm just migrating some test-cases from Syncope 2.0.13 to 2.1.6. I've noticed what seems like a regression. I'm creating a group called "boss" in Syncope. With 2.0.X I can query the REST API as follows: curl -H "Accept: application/xml" -u "admin:password" http://localhost:9080/syncope/rest/groups - v and I see: http://syncope.apache.org/2.0;>1http://www.w3.org/2001/XMLSchema-instance; xsi:type="syncope2:groupTO">2020-05-26T09:57:32.237+01:00admin2020-05-26T09:57:32.237+01:00adminorg.apache.syncope.common.lib.to.GroupTO374fdc23-9aad-455d-8fdc-239aada55d34/GROUP00boss0011 However, with 2.1.6 I only see: http://syncope.apache.org/2.1 ">111 With JSON in 2.1.6 it's OK: {"prev":null,"next":null,"page":1,"size":1,"totalCount":1,"result":[{"@class":"org.apache.syncope.common.lib.to.GroupTO","@class":"org.apache.syncope.common.lib.to.GroupTO","key":"5cc6e67e-5321-46c4-86e6-7e532176c4ba","type":"GROUP","realm":"/","name":"boss","creator":"admin","creationDate":"2020-05-26T09:03:23.911+","lastModifier":"admin","lastChangeDate":"2020-05-26T09:03:23.911+","status":null,"userOwner":null,"groupOwner":null,"udynMembershipCond":null,"staticUserMembershipCount":0,"dynamicUserMembershipCount":0,"staticAnyObjectMembershipCount":0,"dynamicAnyObjectMembershipCount":0,"adynMembershipConds":{},"dynRealms":[],"auxClasses":[],"plainAttrs":[],"derAttrs":[],"virAttrs":[],"resources":[],"typeExtensions":[]}]} Should I create a JIRA for this, or am I making a mistake somewhere? Colm.
Fixed: apache/syncope#6533 (2_1_X - 9a6335e)
Build Update for apache/syncope - Build: #6533 Status: Fixed Duration: 37 mins and 30 secs Commit: 9a6335e (2_1_X) Author: Francesco Chicchiriccò Message: Fix checkstyle View the changeset: https://github.com/apache/syncope/compare/7619c6d69079...9a6335ee9905 View the full build log and details: https://travis-ci.org/github/apache/syncope/builds/691195178?utm_medium=notification_source=email -- You can unsubscribe from build emails from the apache/syncope repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=3236582_medium=notification_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.