Skip to content

Commit

Permalink
# This is a combination of 2 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

ws-security test changes (2)

# This is the commit message OpenLiberty#2:

Readd removed javaMail-1.6 tolerates
  • Loading branch information
arunavemulapalli committed Jun 9, 2022
1 parent 3454309 commit b069f7b
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Subsystem-Name: Java Web Services 2.2
com.ibm.websphere.appserver.internal.slf4j-1.7.7, \
com.ibm.websphere.appserver.internal.cxf.common-3.2, \
com.ibm.websphere.appserver.internal.optional.jaxws-2.2, \
com.ibm.websphere.appserver.javax.mail-1.5
com.ibm.websphere.appserver.javax.mail-1.5; ibm.tolerates:="1.6"
-bundles=\
com.ibm.ws.javaee.ddmodel.ws, \
com.ibm.ws.jaxws.2.3.wsat, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
CxfX509MigTests.class,

//Full TODO: 03/25/22 - once we complete the feature, runtime updates of jaxws-2.2, complete the testing updates
/*CxfSha2SigTests.class,
CxfWss11SigTests.class,
CxfSha2SigTests.class,
/*CxfWss11SigTests.class,
CxfWss11EncTests.class,
CxfX509BasicTests.class,
CxfX509EncTests.class,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2021 IBM Corporation and others.
* Copyright (c) 2020, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -14,19 +14,18 @@
import static componenttest.annotation.SkipForRepeat.EE9_FEATURES;

import java.io.File;
import java.util.Set;

import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.ibm.websphere.simplicity.ShrinkHelper;
import com.ibm.websphere.simplicity.config.ServerConfiguration;
import com.ibm.websphere.simplicity.log.Log;
import com.ibm.ws.wssecurity.fat.utils.common.CommonTests;
import com.ibm.ws.wssecurity.fat.utils.common.PrepCommonSetup;

import componenttest.annotation.AllowedFFDC;
import componenttest.annotation.ExpectedFFDC;
import componenttest.annotation.Server;
import componenttest.annotation.SkipForRepeat;
import componenttest.custom.junit.runner.FATRunner;
Expand Down Expand Up @@ -55,21 +54,11 @@ public class CxfSha2SigTests extends CommonTests {
@BeforeClass
public static void setUp() throws Exception {

ServerConfiguration config = server.getServerConfiguration();
Set<String> features = config.getFeatureManager().getFeatures();
if (features.contains("jaxws-2.2")) {
server.copyFileToLibertyInstallRoot("usr/extension/lib/", "bundles/com.ibm.ws.wssecurity.example.cbh.jar");
server.copyFileToLibertyInstallRoot("usr/extension/lib/features/", "features/wsseccbh-1.0.mf");
//issue 18363
featureVersion = "EE7";
} else if (features.contains("jaxws-2.3")) {
server.copyFileToLibertyInstallRoot("usr/extension/lib/", "bundles/com.ibm.ws.wssecurity.example.cbhwss4j.jar");
server.copyFileToLibertyInstallRoot("usr/extension/lib/features/", "features/wsseccbh-2.0.mf");
copyServerXml(System.getProperty("user.dir") + File.separator + server.getPathToAutoFVTNamedServer() + "server_wss4j.xml");
//issue 18363
featureVersion = "EE8";
}

server.copyFileToLibertyInstallRoot("usr/extension/lib/", "bundles/com.ibm.ws.wssecurity.example.cbhwss4j.jar");
server.copyFileToLibertyInstallRoot("usr/extension/lib/features/", "features/wsseccbh-2.0.mf");
copyServerXml(System.getProperty("user.dir") + File.separator + server.getPathToAutoFVTNamedServer() + "server_wss4j.xml");
//issue 18363
featureVersion = "EE8";
ShrinkHelper.defaultDropinApp(server, "sha2sigclient", "com.ibm.ws.wssecurity.fat.sha2sigclient", "test.wssecfvt.sha2sig", "test.wssecfvt.sha2sig.types");
ShrinkHelper.defaultDropinApp(server, "sha2sig", "com.ibm.ws.wssecurity.fat.sha2sig");

Expand Down Expand Up @@ -297,8 +286,7 @@ public void testCxfSha512SigAlgorithm() throws Exception {
*/

@Test
@AllowedFFDC(value = { "org.apache.ws.security.WSSecurityException" }, repeatAction = { EmptyAction.ID })
@AllowedFFDC(value = { "org.apache.wss4j.common.ext.WSSecurityException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@ExpectedFFDC(value = { "org.apache.wss4j.common.ext.WSSecurityException" }, repeatAction = { EmptyAction.ID })
public void testCxfSha1ToSha2SigAlgorithm() throws Exception {

String thisMethod = "testCxfSha1ToSha2SigAlgorithm";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2021 IBM Corporation and others.
* Copyright (c) 2020, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -18,7 +18,6 @@
import static org.junit.Assert.assertTrue;

import java.io.File;
import java.util.Set;

import javax.crypto.Cipher;

Expand All @@ -28,7 +27,6 @@
import org.junit.runner.RunWith;

import com.ibm.websphere.simplicity.ShrinkHelper;
import com.ibm.websphere.simplicity.config.ServerConfiguration;
import com.ibm.websphere.simplicity.log.Log;
import com.ibm.ws.wssecurity.fat.utils.common.SharedTools;
import com.meterware.httpunit.GetMethodWebRequest;
Expand All @@ -44,7 +42,7 @@
import componenttest.topology.impl.LibertyFileManager;
import componenttest.topology.impl.LibertyServer;

@SkipForRepeat({ NO_MODIFICATION, EE8_FEATURES })
@SkipForRepeat({ NO_MODIFICATION })
@RunWith(FATRunner.class)
public class CxfX509MigTests {

Expand Down Expand Up @@ -82,20 +80,12 @@ public class CxfX509MigTests {
public static void setUp() throws Exception {

String thisMethod = "setup";

ServerConfiguration config = server.getServerConfiguration();
Set<String> features = config.getFeatureManager().getFeatures();
if (features.contains("jaxws-2.2")) {
server.copyFileToLibertyInstallRoot("usr/extension/lib/", "bundles/com.ibm.ws.wssecurity.example.cbh.jar");
server.copyFileToLibertyInstallRoot("usr/extension/lib/features/", "features/wsseccbh-1.0.mf");
errMsgVersion = "EE7";
} else if ((features.contains("jaxws-2.3")) || (features.contains("xmlWS-3.0"))) {
server.copyFileToLibertyInstallRoot("usr/extension/lib/", "bundles/com.ibm.ws.wssecurity.example.cbhwss4j.jar");
server.copyFileToLibertyInstallRoot("usr/extension/lib/features/", "features/wsseccbh-2.0.mf");
copyServerXml(System.getProperty("user.dir") + File.separator + server.getPathToAutoFVTNamedServer() + "server_wss4j.xml");
errMsgVersion = "EE8";
}


server.copyFileToLibertyInstallRoot("usr/extension/lib/", "bundles/com.ibm.ws.wssecurity.example.cbhwss4j.jar");
server.copyFileToLibertyInstallRoot("usr/extension/lib/features/", "features/wsseccbh-2.0.mf");
copyServerXml(System.getProperty("user.dir") + File.separator + server.getPathToAutoFVTNamedServer() + "server_wss4j.xml");
errMsgVersion = "EE8";

ShrinkHelper.defaultDropinApp(server, "x509migclient", "com.ibm.ws.wssecurity.fat.x509migclient", "test.libertyfat.x509mig.contract", "test.libertyfat.x509mig.types");
ShrinkHelper.defaultDropinApp(server, "x509migbadclient", "com.ibm.ws.wssecurity.fat.x509migbadclient", "test.libertyfat.x509mig.contract",
"test.libertyfat.x509mig.types");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,30 @@

<wsSecurityProvider
id="default"
ws-security.callback-handler="com.ibm.ws.wssecurity.example.cbh.CommonPasswordCallback"
ws-security.signature.username="soapprovider"
security.callback-handler="com.ibm.ws.wssecurity.example.cbhwss4j.CommonPasswordCallbackWss4j"
security.signature.username="soapprovider"
>
<signatureProperties
signatureAlgorithm="sha256"
org.apache.ws.security.crypto.merlin.keystore.type="jks"
org.apache.ws.security.crypto.merlin.keystore.password="server"
org.apache.ws.security.crypto.merlin.keystore.alias="soapprovider"
org.apache.ws.security.crypto.merlin.file="${server.config.dir}/dsig-receiver.ks" />
org.apache.wss4j.crypto.merlin.keystore.type="jks"
org.apache.wss4j.crypto.merlin.keystore.password="server"
org.apache.wss4j.crypto.merlin.keystore.alias="soapprovider"
org.apache.wss4j.crypto.merlin.file="${server.config.dir}/dsig-receiver.ks" />
</wsSecurityProvider>

<wsSecurityClient
id="default"
ws-security.password="security"
ws-security.username="user1"
ws-security.callback-handler="com.ibm.ws.wssecurity.example.cbh.CommonPasswordCallback"
ws-security.signature.username="soaprequester"
security.password="security"
security.username="user1"
security.callback-handler="com.ibm.ws.wssecurity.example.cbhwss4j.CommonPasswordCallbackWss4j"
security.signature.username="soaprequester"
>
<signatureProperties
signatureAlgorithm="sha256"
org.apache.ws.security.crypto.merlin.keystore.type="jks"
org.apache.ws.security.crypto.merlin.keystore.password="client"
org.apache.ws.security.crypto.merlin.keystore.alias="soaprequester"
org.apache.ws.security.crypto.merlin.file="${server.config.dir}/dsig-sender.ks" />
org.apache.wss4j.crypto.merlin.keystore.type="jks"
org.apache.wss4j.crypto.merlin.keystore.password="client"
org.apache.wss4j.crypto.merlin.keystore.alias="soaprequester"
org.apache.wss4j.crypto.merlin.file="${server.config.dir}/dsig-sender.ks" />

</wsSecurityClient>
<!-- this is in use by CxfSha2SigTests -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,32 @@

<wsSecurityProvider
id="default"
ws-security.callback-handler="com.ibm.ws.wssecurity.example.cbh.CommonPasswordCallback"
ws-security.signature.username="soapprovider"
security.callback-handler="com.ibm.ws.wssecurity.example.cbhwss4j.CommonPasswordCallbackWss4j"
security.signature.username="soapprovider"
>

<signatureProperties
signatureAlgorithm="sha256"
org.apache.ws.security.crypto.merlin.keystore.type="jks"
org.apache.ws.security.crypto.merlin.keystore.password="server"
org.apache.ws.security.crypto.merlin.keystore.alias="soapprovider"
org.apache.ws.security.crypto.merlin.file="${server.config.dir}/dsig-receiver.ks" />
org.apache.wss4j.crypto.merlin.keystore.type="jks"
org.apache.wss4j.crypto.merlin.keystore.password="server"
org.apache.wss4j.crypto.merlin.keystore.alias="soapprovider"
org.apache.wss4j.crypto.merlin.file="${server.config.dir}/dsig-receiver.ks" />
</wsSecurityProvider>

<wsSecurityClient
id="default"
ws-security.password="security"
ws-security.username="user1"
ws-security.callback-handler="com.ibm.ws.wssecurity.example.cbh.CommonPasswordCallback"
ws-security.signature.username="soaprequester"
security.password="security"
security.username="user1"
security.callback-handler="com.ibm.ws.wssecurity.example.cbhwss4j.CommonPasswordCallbackWss4j"
security.signature.username="soaprequester"
>

<signatureProperties
signatureAlgorithm="sha256"
org.apache.ws.security.crypto.merlin.keystore.type="jks"
org.apache.ws.security.crypto.merlin.keystore.password="client"
org.apache.ws.security.crypto.merlin.keystore.alias="soaprequester"
org.apache.ws.security.crypto.merlin.file="${server.config.dir}/dsig-sender.ks" />
org.apache.wss4j.crypto.merlin.keystore.type="jks"
org.apache.wss4j.crypto.merlin.keystore.password="client"
org.apache.wss4j.crypto.merlin.keystore.alias="soaprequester"
org.apache.wss4j.crypto.merlin.file="${server.config.dir}/dsig-sender.ks" />

</wsSecurityClient>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -13,7 +13,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2020, 2021 IBM Corporation and others.
Copyright (c) 2020, 2022 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand All @@ -12,7 +12,7 @@
<server>
<featureManager>
<feature>ssl-1.0</feature>
<feature>usr:wsseccbh-1.0</feature>
<feature>usr:wsseccbh-2.0</feature>
<feature>servlet-3.1</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
Expand Down

0 comments on commit b069f7b

Please sign in to comment.