You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2020/04/03 10:39:38 UTC

[ws-wss4j] branch master updated (f25b842 -> b10fe73)

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

coheigea pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git.


    from f25b842  WSS-667 - Support JDK14
     new 5ae82ac  Adding a test case for Santuario config properties
     new b10fe73  Updating to OpenSAML 3.4.5

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:
 parent/pom.xml                                     |  2 +-
 .../stax/test/ConfigurationPropertiesTest.java     | 57 ++++++++++++++++++++++
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationPropertiesTest.java


[ws-wss4j] 02/02: Updating to OpenSAML 3.4.5

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

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git

commit b10fe73f24443178de3d82352dc796116fb3c7fd
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Apr 3 11:35:29 2020 +0100

    Updating to OpenSAML 3.4.5
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index fc73da0..7f9cbef 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -42,7 +42,7 @@
         <junit.version>5.5.1</junit.version>
         <kerby.version>2.0.0</kerby.version>
         <neethi.version>3.1.1</neethi.version>
-        <opensaml.version>3.4.3</opensaml.version>
+        <opensaml.version>3.4.5</opensaml.version>
         <slf4j.version>1.7.29</slf4j.version>
         <wsdl4j.version>1.6.3</wsdl4j.version>
         <xalan.version>2.7.2</xalan.version>


[ws-wss4j] 01/02: Adding a test case for Santuario config properties

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

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git

commit 5ae82ac2c0e93f8ed02a700a9d8ef77414888c48
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Apr 3 11:35:15 2020 +0100

    Adding a test case for Santuario config properties
---
 .../stax/test/ConfigurationPropertiesTest.java     | 57 ++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationPropertiesTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationPropertiesTest.java
new file mode 100644
index 0000000..7c40f1f
--- /dev/null
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationPropertiesTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.wss4j.stax.test;
+
+import org.apache.wss4j.stax.setup.WSSec;
+import org.apache.xml.security.stax.config.ConfigurationProperties;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * Test that the configuration defaults defined in security-config.xml in Santuario are still picked up
+ * correctly via wss-config.xml
+ */
+public class ConfigurationPropertiesTest extends AbstractTestBase {
+
+    /*
+        <Property NAME="MaximumAllowedTransformsPerReference" VAL="5"/>
+        <Property NAME="MaximumAllowedReferencesPerManifest" VAL="30"/>
+        <Property NAME="DoNotThrowExceptionForManifests" VAL="false"/>
+        <Property NAME="AllowMD5Algorithm" VAL="false"/>
+        <Property NAME="MaximumAllowedXMLStructureDepth" VAL="100"/>
+        <Property NAME="MaximumAllowedEncryptedDataEvents" VAL="200"/>
+     */
+    @Test
+    public void testConfigurationProperties() throws Exception {
+        WSSec.init();
+        assertEquals("5", ConfigurationProperties.getProperty("MaximumAllowedTransformsPerReference"));
+        assertEquals("30", ConfigurationProperties.getProperty("MaximumAllowedReferencesPerManifest"));
+        assertEquals("false", ConfigurationProperties.getProperty("DoNotThrowExceptionForManifests"));
+        assertEquals("false", ConfigurationProperties.getProperty("AllowMD5Algorithm"));
+        assertEquals("100", ConfigurationProperties.getProperty("MaximumAllowedXMLStructureDepth"));
+        assertEquals("5", ConfigurationProperties.getProperty("MaximumAllowedTransformsPerReference"));
+        assertEquals("200", ConfigurationProperties.getProperty("MaximumAllowedEncryptedDataEvents"));
+
+        // This one is overridden in wss-config.xml
+        assertEquals("true", ConfigurationProperties.getProperty("AllowNotSameDocumentReferences"));
+    }
+
+}
\ No newline at end of file