diff --git a/smp-server-library/src/test/java/eu/europa/ec/edelivery/smp/testutil/TestConstants.java b/smp-server-library/src/test/java/eu/europa/ec/edelivery/smp/testutil/TestConstants.java
index e829a6553a25199f087b9d3266c60ff4b353e6bd..ae4482f8e4da7d690fba061c23f0f6227c2310b2 100644
--- a/smp-server-library/src/test/java/eu/europa/ec/edelivery/smp/testutil/TestConstants.java
+++ b/smp-server-library/src/test/java/eu/europa/ec/edelivery/smp/testutil/TestConstants.java
@@ -41,9 +41,9 @@ public class TestConstants {
     public static final String USERNAME_2 = "test-user_002";
     public static final String USERNAME_3 = "test-user_003";
 
-    public static final String USER_CERT_1="CN=utest comon name 01,O=org,C=BE:0000000000000066";
-    public static final String USER_CERT_2="CN=utest comon name 02,O=org,C=BE:0000000000000077";
-    public static final String USER_CERT_3="CN=utest comon name 03,O=org,C=BE:0000000000000077";
+    public static final String USER_CERT_1="CN=utest common name 01,O=org,C=BE:0000000000000066";
+    public static final String USER_CERT_2="CN=utest common name 02,O=org,C=BE:0000000000000077";
+    public static final String USER_CERT_3="CN=utest common name 03,O=org,C=BE:0000000000000077";
 
 
     public static final String SERVICE_GROUP_POLAND_XML_PATH = "/examples/services/ServiceGroupPoland.xml";
@@ -54,8 +54,8 @@ public class TestConstants {
     public static final ParticipantIdentifierType SERVICE_GROUP_ID = asParticipantId("participant-scheme-qns::urn:eu:ncpb");
 
     public static final String ADMIN_USERNAME = "test_admin";
-    public static final String CERT_USER="CN=comon name,O=org,C=BE:0000000000000066";
-    public static final String CERT_USER_ENCODED="CN%3Dcomon%20name%2CO%3Dorg%2CC%3DBE%3A0000000000000066";
+    public static final String CERT_USER="CN=common name,O=org,C=BE:0000000000000066";
+    public static final String CERT_USER_ENCODED="CN%3Dcommon%20name%2CO%3Dorg%2CC%3DBE%3A0000000000000066";
 
     // parameter: custom string as conntent
     public static final String SIMPLE_EXTENSION_XML ="<Extension xmlns=\"http://docs.oasis-open.org/bdxr/ns/SMP/2016/05\"><ex:dummynode xmlns:ex=\"http://test.eu\">Sample not mandatory extension: %s</ex:dummynode></Extension>";
diff --git a/smp-server-library/src/test/resources/service_integration_test_data.sql b/smp-server-library/src/test/resources/service_integration_test_data.sql
index bf74a2882bb7096fdd9a2bae290f06e02a7914f0..52032e0b0162609d540701eeeca6e91623e48b3d 100644
--- a/smp-server-library/src/test/resources/service_integration_test_data.sql
+++ b/smp-server-library/src/test/resources/service_integration_test_data.sql
@@ -1,4 +1,4 @@
 insert into smp_user(username, password, isadmin) values ('test_admin',                                '$2a$06$k.Q/6anG4Eq/nNTZ0C1UIuAKxpr6ra5oaMkMSrlESIyA5jKEsUdyS', 1);
 insert into smp_user(username, password, isadmin) values ('test_user_hashed_pass',                     '$2a$06$k.Q/6anG4Eq/nNTZ0C1UIuAKxpr6ra5oaMkMSrlESIyA5jKEsUdyS', 0);
 insert into smp_user(username, password, isadmin) values ('test_user_clear_pass',                      'gutek123',                                                     0);
-insert into smp_user(username, password, isadmin) values ('CN=comon name,O=org,C=BE:0000000000000066', '',                                                             0);
+insert into smp_user(username, password, isadmin) values ('CN=common name,O=org,C=BE:0000000000000066', '',                                                             0);
diff --git a/smp-webapp/src/test/java/eu/europa/ec/cipa/smp/server/security/SecurityConfigurationClientCertTest.java b/smp-webapp/src/test/java/eu/europa/ec/cipa/smp/server/security/SecurityConfigurationClientCertTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..efe3dbb05f5f4215142db31e16cec7c3a7e11f20
--- /dev/null
+++ b/smp-webapp/src/test/java/eu/europa/ec/cipa/smp/server/security/SecurityConfigurationClientCertTest.java
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2017 European Commission | CEF eDelivery
+ *
+ * Licensed under the EUPL, Version 1.2 or – as soon they will be approved by the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ *
+ * You may obtain a copy of the Licence attached in file: LICENCE-EUPL-v1.2.pdf
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and limitations under the Licence.
+ */
+
+package eu.europa.ec.cipa.smp.server.security;
+
+
+import eu.europa.ec.edelivery.smp.config.*;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpHeaders;
+import org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.jdbc.Sql;
+import org.springframework.test.context.junit4.rules.SpringClassRule;
+import org.springframework.test.context.junit4.rules.SpringMethodRule;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.context.WebApplicationContext;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Arrays;
+
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+/**
+ * Created by gutowpa on 20/02/2017.
+ */
+
+@RunWith(Parameterized.class)
+@ContextConfiguration(classes = {
+        PropertiesTestConfig.class,
+        SmpAppConfig.class,
+        SmpWebAppConfig.class,
+        DatabaseConfig.class,
+        SpringSecurityConfig.class,
+        SpringSecurityTestConfig.class,
+})
+@WebAppConfiguration
+@Sql("classpath:/cleanup-database.sql")
+@Sql("classpath:/webapp_integration_test_data.sql")
+public class SecurityConfigurationClientCertTest {
+
+    //Jul++9+23:59:00+2019+GMT"
+    private static DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("MMM  dd HH:mm:ss yyyy 'GMT'");
+    private static String CLIENT_CERT_FORMAT = "sno=%s" +
+            "&subject=%s" +
+            "&validfrom=%s" +
+            "&validto=%s" +
+            "&issuer=%s";
+
+    public static final String RETURN_LOGGED_USER_PATH = "/getLoggedUsername";
+
+    @Parameterized.Parameters
+    public static Iterable<Object[]> data() {
+        return Arrays.asList(new Object[][]{
+                {
+                        "Simple case",
+                        "CN=common name,O=org,C=BE:000000000000bb66",
+                        "C=BE,O=org,CN=common name",
+                        "bb66",
+                },
+                {
+                        "Upper serial number",
+                        "CN=common name,O=org,C=BE:000000000000bb66",
+                        "C=BE,O=org,CN=common name",
+                        "BB66",
+                },
+                {
+                        "Serial number with colon",
+                        "CN=common name,O=org,C=BE:000000000000bb66",
+                        "C=BE,O=org,CN=common name",
+                        "BB:66",
+                },
+                {
+                        "Email, serial number, street, towm formatted asl BC before  ",
+                        "CN=common name,O=org,C=BE:000000000000bb66",
+                        "CN=common name/emailAddress\\=CEF-EDELIVERY-SUPPORT@ec.europa.eu/serialNumber\\=1,O=org,ST=My town/postalCode\\=2151, L=GreatTown/street\\=My Street. 20, C=BE",
+                        "BB66",
+                },
+                {
+                        "Email, serial number, street, town formatted asl BC before = is not escaped  ",
+                        "CN=common name,O=org,C=BE:000000000000bb66",
+                        "CN=common name/emailAddress=CEF-EDELIVERY-SUPPORT@ec.europa.eu/serialNumber=1,O=org,ST=My town/postalCode=2151, L=GreatTown/street=My Street. 20, C=BE",
+                        "BB66",
+                },
+                {
+                        "Email, serial number, street, town formatted - new RP",
+                        "CN=common name,O=org,C=BE:000000000000bb66",
+                        "C=BE,ST=My town, postalCode=2151, L=GreatTown, street=My Street. 20, O=org,CN=common name, emailAddress=CEF-EDELIVERY-SUPPORT@ec.europa.eu,common name, serialNumber=1",
+                        "BB66",
+                },
+                {
+                        "Test with colon",
+                        "CN=GRP:test_proxy_01,O=European Commission,C=BE:0000000000001234",
+                        "CN=GRP:test_proxy_01,OU=CEF_eDelivery.europa.eu,OU=SML,OU=testabc,O=European Commission,C=BE",
+                        "1234",
+                },
+                {
+                        "Test with Utf8 chars - in url encoded",
+                        "CN=GRP:TEST_\\+\\,& \\=eau!,O=European Commission,C=BE:0000000000001234",
+                        "C%3DBE%2C+O%3DEuropean+Commission%2C+OU%3DCEF_eDelivery.europa.eu%2C+OU%3Dtestabc%2C+OU%3DSMP%2C+CN%3DGRP%3ATEST_%2B%2C%26+%3D%5CxC3%5CxA9%5CxC3%5CxA1%5CxC5%5CxB1%21%2FemailAddress%3DCEF-EDELIVERY-SUPPORT%40ec.europa.eu",
+                        "1234",
+                },
+
+
+
+                {
+                        "Issue test one",
+                        "CN=ncp.fi.ehealth.testa.eu,O=Kansanelakelaitos,C=FI:f71ee8b11cb3b787",
+                        "C=FI, O=Kansanelakelaitos, OU=CEF_eDelivery.testa.eu, OU=eHealth, OU=Kanta, CN=ncp.fi.ehealth.testa.eu, emailAddress=tekninentuki@kanta.fi",
+                        "f71ee8b11cb3b787",
+                },
+                {
+                        "Issue test two",
+                        "CN=Internal Business CA 2,O=T-Systems International GmbH,C=DE:f71ee8b11cb3b787",
+                        "C=DE, O=T-Systems International GmbH, OU=T-Systems Trust Center, ST=Nordrhein Westfalen, postalCode=57250, L=Netphen, street=Untere Industriestr. 20, CN=Internal Business CA 2",
+                        "f71ee8b11cb3b787",
+                },
+
+
+        });
+    }
+
+    // because we are using Parameterized instead of SpringJUnit4ClassRunner we need to declare
+    // SpringClassRule and SpringMethodRule manually
+    @ClassRule
+    public static final SpringClassRule scr = new SpringClassRule();
+    @Rule
+    public final SpringMethodRule smr = new SpringMethodRule();
+
+    @Autowired
+    private WebApplicationContext context;
+
+
+    MockMvc mvc;
+
+
+    @Before
+    public void setup() {
+
+        mvc = MockMvcBuilders.webAppContextSetup(context)
+                .apply(SecurityMockMvcConfigurers.springSecurity())
+                .build();
+    }
+
+    @Parameterized.Parameter(0)
+    public String testName;
+
+    @Parameterized.Parameter(1)
+    public String expectedCertificateId;
+
+    @Parameterized.Parameter(2)
+    public String certificateDn;
+
+    @Parameterized.Parameter(3)
+    public String serialNumber;
+
+    @Test
+    public void validBlueCoatHeaderAuthorizedForPutTest() throws Exception {
+        System.out.println("Test: "+ testName);
+        String clientCert = buildClientCert(serialNumber, certificateDn);
+        System.out.println("Client-Cert: " + clientCert);
+
+        HttpHeaders headers = new HttpHeaders();
+        headers.add("Client-Cert", clientCert);
+        mvc.perform(MockMvcRequestBuilders.put(RETURN_LOGGED_USER_PATH)
+                .headers(headers))
+                .andExpect(status().isOk())
+                .andExpect(content().string(expectedCertificateId))
+                .andReturn().getResponse().getContentAsString();
+    }
+
+    public static String buildClientCert(String serial, String subject) {
+        LocalDateTime from = LocalDateTime.now().minusYears(1);
+        LocalDateTime to = LocalDateTime.now().plusYears(1);
+        return buildClientCert(serial, subject, "C=x,O=y,CN=z", from, to);
+    }
+
+    public static String buildClientCert(String serial, String subject, String issuer, LocalDateTime from, LocalDateTime to) {
+
+        return String.format(CLIENT_CERT_FORMAT, serial, subject, formatToGMTString(from), formatToGMTString(to), issuer);
+    }
+
+    public static String formatToGMTString(LocalDateTime time) {
+        return DATE_FORMATTER.format(time);
+    }
+
+}
diff --git a/smp-webapp/src/test/java/eu/europa/ec/cipa/smp/server/security/SecurityConfigurationTest.java b/smp-webapp/src/test/java/eu/europa/ec/cipa/smp/server/security/SecurityConfigurationTest.java
index e2f85675ff2f85ab5546361f522413c4e02aa514..df9a1b9af2009eba88b426ea31d79063222cdfc4 100644
--- a/smp-webapp/src/test/java/eu/europa/ec/cipa/smp/server/security/SecurityConfigurationTest.java
+++ b/smp-webapp/src/test/java/eu/europa/ec/cipa/smp/server/security/SecurityConfigurationTest.java
@@ -15,10 +15,7 @@ package eu.europa.ec.cipa.smp.server.security;
 
 import eu.europa.ec.edelivery.exception.BlueCoatParseException;
 import eu.europa.ec.edelivery.smp.config.*;
-import eu.europa.ec.edelivery.smp.services.CRLVerifierService;
-import eu.europa.ec.edelivery.smp.services.ConfigurationService;
-import eu.europa.ec.edelivery.smp.services.SecurityUtilsServices;
-import eu.europa.ec.edelivery.smp.services.ui.UITruststoreService;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -57,14 +54,14 @@ public class SecurityConfigurationTest {
 
     public static final String RETURN_LOGGED_USER_PATH = "/getLoggedUsername";
 
-    public static final String TEST_USERNAME_CLEAR_PASS = "test_user_clear_pass";
-    public static final String TEST_USERNAME_HASHED_PASS = "test_user_hashed_pass";
+    public static final String TEST_USERNAME_DB_CLEAR_PASS = "test_user_clear_pass";
+    public static final String TEST_USERNAME_DB_HASHED_PASS = "test_user_hashed_pass";
     public static final String PASSWORD = "test123";
-    public static final String BLUE_COAT_VALID_HEADER = "sno=bb66&subject=C=BE,O=org,CN=comon name&validfrom=Dec 6 17:41:42 2016 GMT&validto=Jul 9 23:59:00 2050 GMT&issuer=C=x,O=y,CN=z";
-    public static final String BLUE_COAT_VALID_HEADER_UPPER_SN = "sno=BB66&subject=C=BE,O=org,CN=comon name&validfrom=Dec 6 17:41:42 2016 GMT&validto=Jul 9 23:59:00 2050 GMT&issuer=C=x,O=y,CN=z";
-    public static final String TEST_USERNAME_BLUE_COAT = "CN=comon name,O=org,C=BE:000000000000bb66";
-    public static final String BLUE_COAT_VALID_HEADER_DB_UPPER_SN = "sno=BB66&subject=CN=comon name UPPER database SN,O=org,C=BE&validfrom=Dec 6 17:41:42 2016 GMT&validto=Jul 9 23:59:00 2050 GMT&issuer=C=x,O=y,CN=z";
-    public static final String TEST_USERNAME_BLUE_COAT__DB_UPPER_SN = "CN=comon name UPPER database SN,O=org,C=BE:000000000000bb66";
+    public static final String BLUE_COAT_VALID_HEADER = "sno=bb66&subject=C=BE,O=org,CN=common name&validfrom=Dec 6 17:41:42 2016 GMT&validto=Jul 9 23:59:00 2050 GMT&issuer=C=x,O=y,CN=z";
+    public static final String BLUE_COAT_VALID_HEADER_UPPER_SN = "sno=BB66&subject=C=BE,O=org,CN=common name&validfrom=Dec 6 17:41:42 2016 GMT&validto=Jul 9 23:59:00 2050 GMT&issuer=C=x,O=y,CN=z";
+    public static final String TEST_USERNAME_BLUE_COAT = "CN=common name,O=org,C=BE:000000000000bb66";
+    public static final String BLUE_COAT_VALID_HEADER_DB_UPPER_SN = "sno=BB66&subject=CN=common name UPPER database SN,O=org,C=BE&validfrom=Dec 6 17:41:42 2016 GMT&validto=Jul 9 23:59:00 2050 GMT&issuer=C=x,O=y,CN=z";
+    public static final String TEST_USERNAME_BLUE_COAT__DB_UPPER_SN = "CN=common name UPPER database SN,O=org,C=BE:000000000000bb66";
 
     @Autowired
     private WebApplicationContext context;
@@ -107,15 +104,30 @@ public class SecurityConfigurationTest {
     @Test
     public void userStoredWithHashedPassIsAuthorizedForPutTest() throws Exception {
         mvc.perform(MockMvcRequestBuilders.put(RETURN_LOGGED_USER_PATH)
-                .with(httpBasic(TEST_USERNAME_HASHED_PASS, PASSWORD)))
+                .with(httpBasic(TEST_USERNAME_DB_HASHED_PASS, PASSWORD)))
                 .andExpect(status().isOk())
-                .andExpect(content().string(TEST_USERNAME_HASHED_PASS));
+                .andExpect(content().string(TEST_USERNAME_DB_HASHED_PASS));
     }
 
+    @Test
+    public void userStoredWithUpperCaseUsernameIsAuthorizedForPutTest() throws Exception {
+        String upperCaseUsername = TEST_USERNAME_DB_HASHED_PASS.toUpperCase();
+        // test that is not the same
+        Assert.assertNotEquals(upperCaseUsername, TEST_USERNAME_DB_HASHED_PASS);
+
+        mvc.perform(MockMvcRequestBuilders.put(RETURN_LOGGED_USER_PATH)
+                .with(httpBasic(upperCaseUsername, PASSWORD)))
+                .andExpect(status().isOk())
+                .andExpect(content().string(upperCaseUsername));
+    }
+
+
+
+
     @Test
     public void userStoredWithClearPassIsNotAuthorizedForPutTest() throws Exception {
         mvc.perform(MockMvcRequestBuilders.put(RETURN_LOGGED_USER_PATH)
-                .with(httpBasic(TEST_USERNAME_CLEAR_PASS, PASSWORD)))
+                .with(httpBasic(TEST_USERNAME_DB_CLEAR_PASS, PASSWORD)))
                 .andExpect(status().isUnauthorized());
     }
 
@@ -146,7 +158,7 @@ public class SecurityConfigurationTest {
         headers.add("Client-Cert", BLUE_COAT_VALID_HEADER);
         mvc.perform(MockMvcRequestBuilders.put(RETURN_LOGGED_USER_PATH)
                 .headers(headers)
-                .with(httpBasic(TEST_USERNAME_HASHED_PASS, PASSWORD)))
+                .with(httpBasic(TEST_USERNAME_DB_HASHED_PASS, PASSWORD)))
                 .andExpect(status().isOk())
                 .andExpect(content().string(TEST_USERNAME_BLUE_COAT));
     }
@@ -157,7 +169,7 @@ public class SecurityConfigurationTest {
         headers.add("Client-Cert", BLUE_COAT_VALID_HEADER_UPPER_SN);
         mvc.perform(MockMvcRequestBuilders.put(RETURN_LOGGED_USER_PATH)
                 .headers(headers)
-                .with(httpBasic(TEST_USERNAME_HASHED_PASS, PASSWORD)))
+                .with(httpBasic(TEST_USERNAME_DB_HASHED_PASS, PASSWORD)))
                 .andExpect(status().isOk())
                 .andExpect(content().string(TEST_USERNAME_BLUE_COAT));
     }
@@ -169,7 +181,7 @@ public class SecurityConfigurationTest {
         headers.add("Client-Cert", BLUE_COAT_VALID_HEADER_DB_UPPER_SN);
         mvc.perform(MockMvcRequestBuilders.put(RETURN_LOGGED_USER_PATH)
                 .headers(headers)
-                .with(httpBasic(TEST_USERNAME_HASHED_PASS, PASSWORD)))
+                .with(httpBasic(TEST_USERNAME_DB_HASHED_PASS, PASSWORD)))
                 .andExpect(status().isOk())
                 .andExpect(content().string(TEST_USERNAME_BLUE_COAT__DB_UPPER_SN));
     }
@@ -180,7 +192,7 @@ public class SecurityConfigurationTest {
         headers.add("Client-Cert", BLUE_COAT_VALID_HEADER_DB_UPPER_SN);
         mvc.perform(MockMvcRequestBuilders.put(RETURN_LOGGED_USER_PATH)
                 .headers(headers)
-                .with(httpBasic(TEST_USERNAME_HASHED_PASS, PASSWORD)))
+                .with(httpBasic(TEST_USERNAME_DB_HASHED_PASS, PASSWORD)))
                 .andExpect(status().isOk())
                 .andExpect(content().string(TEST_USERNAME_BLUE_COAT__DB_UPPER_SN));
     }
diff --git a/smp-webapp/src/test/resources/migration/mysql-init-data-4.0.sql b/smp-webapp/src/test/resources/migration/mysql-init-data-4.0.sql
index f5ddd9ba2e8e8bfc09a640c0a33a940a41b10203..b1758cb3479a6420d57d10fef304409e2f31b1dd 100644
--- a/smp-webapp/src/test/resources/migration/mysql-init-data-4.0.sql
+++ b/smp-webapp/src/test/resources/migration/mysql-init-data-4.0.sql
@@ -1,7 +1,7 @@
 insert into smp_user(username, password, isadmin) values ('test_admin',                                '$2a$06$k.Q/6anG4Eq/nNTZ0C1UIuAKxpr6ra5oaMkMSrlESIyA5jKEsUdyS', 1);
 insert into smp_user(username, password, isadmin) values ('test_user_hashed_pass',                     '$2a$06$k.Q/6anG4Eq/nNTZ0C1UIuAKxpr6ra5oaMkMSrlESIyA5jKEsUdyS', 0);
 insert into smp_user(username, password, isadmin) values ('test_user_clear_pass',                      'gutek123',                                                     0);
-insert into smp_user(username, password, isadmin) values ('CN=comon name,O=org,C=BE:0000000000000066', '',                                                             0);
+insert into smp_user(username, password, isadmin) values ('CN=common name,O=org,C=BE:0000000000000066', '',                                                             0);
 Insert into smp_user (username,password,isadmin) values ('test','$2a$10$fvONLZ1J80Sj.4C2w0/UBuYxHEGoXLIZgZfxqEXoDSH8q3fbTcGJ6',0);
 Insert into smp_user (username,password,isadmin) values ('CN=GENERALERDS_AP_TEST_00000,O=European Commission,C=BE:e6588be5c376f78e',null,0);
 Insert into smp_user (username,password,isadmin) values ('CN=GENERALERDS_AP_TEST_00000/serialNumber\=1,O=European Commission,C=BE:e6588be5c376f78e',null,0);
diff --git a/smp-webapp/src/test/resources/webapp_integration_test_data.sql b/smp-webapp/src/test/resources/webapp_integration_test_data.sql
index 4c8a680947a7f84901c424cde463087879b4988a..c93a3d836f684d71c16c5d88c0db1ac3399bced2 100644
--- a/smp-webapp/src/test/resources/webapp_integration_test_data.sql
+++ b/smp-webapp/src/test/resources/webapp_integration_test_data.sql
@@ -15,7 +15,7 @@ insert into SMP_USER (ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPD
 insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (4, 'test_user_hashed_pass',                     '$2a$06$AXSSUDJlpzzq/gPZb7eIBeb8Mi0.PTKqDjzujZH.bWPwj5.ePEInW', 'SERVICE_GROUP_ADMIN',1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (5, 'test_user_clear_pass',                      'test123',                                                     'SERVICE_GROUP_ADMIN',1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (6, 'cert1', '',                                                             'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
-insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (6, 'CN=comon name,O=org,C=BE:000000000000bb66', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (6, 'CN=common name,O=org,C=BE:000000000000bb66', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 
 insert into SMP_USER(ID, USERNAME, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (7, 'cert2', 'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (7, 'CN=EHEALTH_SMP_TEST_BRAZIL,O=European Commission,C=BE:48b681ee8e0dcc08', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
@@ -27,7 +27,19 @@ insert into SMP_USER(ID, USERNAME, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) va
 insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (9, 'CN=EHEALTH_SMP_EC,O=European Commission,C=BEf71ee8b11cb3b787', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 
 insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (10, 'cert5', '',                                                             'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
-insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (10, 'CN=comon name UPPER database SN,O=org,C=BE:000000000000BB66', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (10, 'CN=common name UPPER database SN,O=org,C=BE:000000000000BB66', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+
+insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (11, 'cert6', '',                                                             'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (11, 'CN=ncp.fi.ehealth.testa.eu,O=Kansanelakelaitos,C=FI:f71ee8b11cb3b787', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+
+insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (12, 'cert7', '',                                                             'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (12, 'CN=Internal Business CA 2,O=T-Systems International GmbH,C=DE:f71ee8b11cb3b787', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+
+insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (13, 'cert8', '',                                                             'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (13, 'CN=GRP:test_proxy_01,O=European Commission,C=BE:0000000000001234', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+
+insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (14, 'cert9', '',                                                             'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (14, 'CN=GRP:TEST_\+\,& \=eau!,O=European Commission,C=BE:0000000000001234', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 
 
 -- set the ids to higher values - tests are using sequnce which stars from 1
diff --git a/smp-webapp/src/test/resources/webapp_integration_test_data_one_domain.sql b/smp-webapp/src/test/resources/webapp_integration_test_data_one_domain.sql
index f384141f2c82af4aa12f6e691127a2d051858f82..1552f9c0c18617f16b6035e93fd30e9f230922e2 100644
--- a/smp-webapp/src/test/resources/webapp_integration_test_data_one_domain.sql
+++ b/smp-webapp/src/test/resources/webapp_integration_test_data_one_domain.sql
@@ -15,7 +15,7 @@ insert into SMP_USER (ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPD
 insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (4, 'test_user_hashed_pass',                     '$2a$06$AXSSUDJlpzzq/gPZb7eIBeb8Mi0.PTKqDjzujZH.bWPwj5.ePEInW', 'SERVICE_GROUP_ADMIN',1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (5, 'test_user_clear_pass',                      'test123',                                                     'SERVICE_GROUP_ADMIN',1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 insert into SMP_USER(ID, USERNAME, PASSWORD, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (6, 'cert1', '',                                                             'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
-insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (6, 'CN=comon name,O=org,C=BE:0000000000000066', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
+insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (6, 'CN=common name,O=org,C=BE:0000000000000066', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 
 insert into SMP_USER(ID, USERNAME, ROLE, ACTIVE, CREATED_ON, LAST_UPDATED_ON) values (7, 'cert2', 'SMP_ADMIN', 1,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());
 insert into SMP_CERTIFICATE (ID, CERTIFICATE_ID, VALID_FROM, VALID_TO, CREATED_ON, LAST_UPDATED_ON) values (7, 'CN=EHEALTH_SMP_TEST_BRAZIL,O=European Commission,C=BE:48b681ee8e0dcc08', null,null,CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());