aboutsummaryrefslogtreecommitdiff
path: root/modules/authmodule-eIDAS-v2/src
diff options
context:
space:
mode:
authorThomas <>2022-05-12 13:56:38 +0200
committerThomas <>2022-05-12 13:56:38 +0200
commita988c0af75d96fdf03337b47a68b3a7876abfbac (patch)
treeb9cdc793c0204fe1f0027a83dd367e2f2ae2126e /modules/authmodule-eIDAS-v2/src
parentcbcc63885156c0b4039d5e71f943e760faaa5d78 (diff)
downloadNational_eIDAS_Gateway-a988c0af75d96fdf03337b47a68b3a7876abfbac.tar.gz
National_eIDAS_Gateway-a988c0af75d96fdf03337b47a68b3a7876abfbac.tar.bz2
National_eIDAS_Gateway-a988c0af75d96fdf03337b47a68b3a7876abfbac.zip
refact(ernp): change configuration keys for SSL keystore
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src')
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java23
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java12
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties10
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1_springboot.properties10
4 files changed, 39 insertions, 16 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
index 0b5d086d..588ea912 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
@@ -170,6 +170,29 @@ public class Constants {
public static final String CONIG_PROPS_EIDAS_ERNPCLIENT = CONIG_PROPS_EIDAS_PREFIX + ".ernpclient";
public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_ENDPOINT = CONIG_PROPS_EIDAS_ERNPCLIENT
+ ".endpoint";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYSTORE_PATH = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.keyStore.path";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYSTORE_PASSWORD = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.keyStore.password";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYSTORE_TYPE = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.keyStore.type";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYSTORE_NAME = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.keyStore.name";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYS_ALIAS = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.key.alias";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEY_PASSWORD = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.key.password";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_TRUSTSTORE_PATH = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.trustStore.path";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_TRUSTSTORE_PASSWORD = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.trustStore.password";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_TRUSTSTORE_TYPE = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.trustStore.type";
+ public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_TRUSTSTORE_NAME = CONIG_PROPS_EIDAS_ERNPCLIENT
+ + ".ssl.trustStore.name";
+
+
+
public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_TIMEOUT_CONNECTION = CONIG_PROPS_EIDAS_ERNPCLIENT
+ ".timeout.connection";
public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_TIMEOUT_RESPONSE = CONIG_PROPS_EIDAS_ERNPCLIENT
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java
index 4c4e3d87..6a732a0d 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java
@@ -809,16 +809,16 @@ public class ErnpRestClient implements IErnpClient {
// Set keystore configuration
config.buildKeyStoreConfig(
- basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_COMMON_CLIENT_SSL_KEYSTORE_TYPE),
- basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_COMMON_CLIENT_SSL_KEYSTORE_PATH),
- basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_COMMON_CLIENT_SSL_KEYSTORE_PASSWORD),
- basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_COMMON_CLIENT_SSL_KEYSTORE_NAME));
+ basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYSTORE_TYPE),
+ basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYSTORE_PATH),
+ basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYSTORE_PASSWORD),
+ basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYSTORE_NAME));
// Set key information
config.setSslKeyAlias(
- basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_COMMON_CLIENT_SSL_KEYS_ALIAS));
+ basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEYS_ALIAS));
config.setSslKeyPassword(
- basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_COMMON_CLIENT_SSL_KEY_PASSWORD));
+ basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_ERNPCLIENT_SSL_KEY_PASSWORD));
// Set connection parameters
// TODO: update EAAF-components to allow custom HTTP Connection-Timeouts
diff --git a/modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties b/modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties
index d84777f3..6d97513a 100644
--- a/modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties
+++ b/modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties
@@ -104,11 +104,11 @@ eidas.ms.auth.eIDAS.zmrclient.req.update.reason.code=EIDAS-KITT
# ERnP communication
eidas.ms.auth.eIDAS.ernpclient.endpoint=http://localhost:1718/demoernp
eidas.ms.auth.eIDAS.ernpclient.req.organisation.behoerdennr=jUnit123456
-eidas.ms.auth.eIDAS.client.common.ssl.keyStore.type=jks
-eidas.ms.auth.eIDAS.client.common.ssl.keyStore.path=../keystore/junit_test.jks
-eidas.ms.auth.eIDAS.client.common.ssl.keyStore.password=password
-eidas.ms.auth.eIDAS.client.common.ssl.key.alias=meta
-eidas.ms.auth.eIDAS.client.common.ssl.key.password=password
+eidas.ms.auth.eIDAS.ernpclient.ssl.keyStore.type=jks
+eidas.ms.auth.eIDAS.ernpclient.ssl.keyStore.path=../keystore/junit_test.jks
+eidas.ms.auth.eIDAS.ernpclient.ssl.keyStore.password=password
+eidas.ms.auth.eIDAS.ernpclient.ssl.key.alias=meta
+eidas.ms.auth.eIDAS.ernpclient.ssl.key.password=password
diff --git a/modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1_springboot.properties b/modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1_springboot.properties
index 0cc89a4a..22003513 100644
--- a/modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1_springboot.properties
+++ b/modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1_springboot.properties
@@ -60,11 +60,11 @@ eidas.ms.auth.eIDAS.zmrclient.req.update.reason.text=KITT for eIDAS Matching
# ERnP communication
eidas.ms.auth.eIDAS.ernpclient.endpoint=http://localhost:1718/demoernp
eidas.ms.auth.eIDAS.ernpclient.req.organisation.behoerdennr=jUnit123456
-eidas.ms.auth.eIDAS.client.common.ssl.keyStore.type=jks
-eidas.ms.auth.eIDAS.client.common.ssl.keyStore.path=../keystore/junit_test.jks
-eidas.ms.auth.eIDAS.client.common.ssl.keyStore.password=password
-eidas.ms.auth.eIDAS.client.common.ssl.key.alias=meta
-eidas.ms.auth.eIDAS.client.common.ssl.key.password=password
+eidas.ms.auth.eIDAS.ernpclient.ssl.keyStore.type=jks
+eidas.ms.auth.eIDAS.ernpclient.ssl.keyStore.path=../keystore/junit_test.jks
+eidas.ms.auth.eIDAS.ernpclient.ssl.keyStore.password=password
+eidas.ms.auth.eIDAS.ernpclient.ssl.key.alias=meta
+eidas.ms.auth.eIDAS.ernpclient.ssl.key.password=password