[GitHub] [cxf-fediz] amergey opened a new pull request #57: Add support for RSA_SHA256 signature with SAMLProtocol

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf-fediz] amergey opened a new pull request #57: Add support for RSA_SHA256 signature with SAMLProtocol

GitBox

amergey opened a new pull request #57:
URL: https://github.com/apache/cxf-fediz/pull/57


   Some IDPs are not supporting RSA_SHA1 signature for signin request signature.
   
   This pull request is a proposal to allow configuring alternative signature algorithm


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf-fediz] coheigea commented on a change in pull request #57: Add support for RSA_SHA256 signature with SAMLProtocol

GitBox

coheigea commented on a change in pull request #57:
URL: https://github.com/apache/cxf-fediz/pull/57#discussion_r441412085



##########
File path: plugins/core/src/main/java/org/apache/cxf/fediz/core/config/SignAlgorithm.java
##########
@@ -0,0 +1,53 @@
+/**
+ * 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.cxf.fediz.core.config;
+
+import org.apache.cxf.fediz.core.config.jaxb.SignAlgorithmType;
+
+public enum SignAlgorithm {

Review comment:
       As per below, I think rename this to SignatureDigestAlgorithm.

##########
File path: plugins/core/src/main/java/org/apache/cxf/fediz/core/config/SAMLProtocol.java
##########
@@ -53,11 +53,23 @@ protected void setSAMLProtocol(SamlProtocolType samlProtocol) {
     }
 
     public boolean isSignRequest() {
-        return getSAMLProtocol().isSignRequest();
+        if (getSAMLProtocol().getSignRequest() != null) {
+            return getSAMLProtocol().getSignRequest().isValue();
+        } else {
+            return false;
+        }
+    }
+    
+    public SignAlgorithm getSignRequestAlgorithm() {

Review comment:
       Rename to getSignatureDigestAlgorithm

##########
File path: plugins/core/src/main/resources/schemas/FedizConfig.xsd
##########
@@ -205,6 +205,21 @@
             <xs:element ref="reply" />
         </xs:sequence>
     </xs:complexType>
+    
+     <xs:complexType name="SignRequestType">
+        <xs:simpleContent>
+            <xs:extension base="xs:boolean">
+                <xs:attribute name="algorithm" type="signAlgorithmType" />
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    
+    <xs:simpleType name="signAlgorithmType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="SHA1" />
+            <xs:enumeration value="SHA256" />
+        </xs:restriction>
+    </xs:simpleType>

Review comment:
       The algorithms here are actually digest algorithms. I think it would be more accurate to rename "signAlgorithmType" as "signatureDigestAlgorithmType", and change "algorithm" to "signatureDigestAlgorithm".




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf-fediz] amergey commented on a change in pull request #57: Add support for RSA_SHA256 signature with SAMLProtocol

GitBox
In reply to this post by GitBox

amergey commented on a change in pull request #57:
URL: https://github.com/apache/cxf-fediz/pull/57#discussion_r441617301



##########
File path: plugins/core/src/main/java/org/apache/cxf/fediz/core/config/SAMLProtocol.java
##########
@@ -53,11 +53,23 @@ protected void setSAMLProtocol(SamlProtocolType samlProtocol) {
     }
 
     public boolean isSignRequest() {
-        return getSAMLProtocol().isSignRequest();
+        if (getSAMLProtocol().getSignRequest() != null) {
+            return getSAMLProtocol().getSignRequest().isValue();
+        } else {
+            return false;
+        }
+    }
+    
+    public SignAlgorithm getSignRequestAlgorithm() {

Review comment:
       I have also renamed enum values




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf-fediz] coheigea merged pull request #57: Add support for RSA_SHA256 signature with SAMLProtocol

GitBox
In reply to this post by GitBox

coheigea merged pull request #57:
URL: https://github.com/apache/cxf-fediz/pull/57


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf-fediz] coheigea commented on pull request #57: Add support for RSA_SHA256 signature with SAMLProtocol

GitBox
In reply to this post by GitBox

coheigea commented on pull request #57:
URL: https://github.com/apache/cxf-fediz/pull/57#issuecomment-645850492


   @amergey  - Do you have any more imminent PRs? I want to call a vote on Fediz 1.5.0 ASAP.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf-fediz] amergey commented on pull request #57: Add support for RSA_SHA256 signature with SAMLProtocol

GitBox
In reply to this post by GitBox

amergey commented on pull request #57:
URL: https://github.com/apache/cxf-fediz/pull/57#issuecomment-645854161


   No that's all for me now :)


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf-fediz] amergey edited a comment on pull request #57: Add support for RSA_SHA256 signature with SAMLProtocol

GitBox
In reply to this post by GitBox

amergey edited a comment on pull request #57:
URL: https://github.com/apache/cxf-fediz/pull/57#issuecomment-645854161


   No more planned for now :)


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]