aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java8
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java3
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java5
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java7
4 files changed, 15 insertions, 8 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java
index b95c08044..6c2f3e75a 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java
@@ -22,9 +22,8 @@
*******************************************************************************/
package at.gv.egovernment.moa.id.monitoring;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.InputStream;
+import java.net.URL;
import java.util.List;
import org.w3c.dom.Element;
@@ -49,8 +48,9 @@ public class IdentityLinkTestModule implements TestModuleInterface {
public void initializeTest(long delayParam, String url) throws Exception{
if (MiscUtil.isNotEmpty(url)) {
- File idlfile = new File(url);
- InputStream idlstream = new FileInputStream(idlfile);
+
+ URL keystoreURL = new URL(url);
+ InputStream idlstream = keystoreURL.openStream();
identityLink = new IdentityLinkAssertionParser(idlstream).parseIdentityLink();
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
index ccfa6d5d1..84581abe8 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
@@ -30,6 +30,7 @@ import java.util.Map;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.FileUtils;
public class TestManager {
@@ -54,7 +55,7 @@ public class TestManager {
//add IdentityLink verification test
IdentityLinkTestModule test2 = new IdentityLinkTestModule();
- String idlurl = config.getMonitoringTestIdentityLinkURL();
+ String idlurl = FileUtils.makeAbsoluteURL(config.getMonitoringTestIdentityLinkURL(), config.getRootConfigFileDir());
try {
test2.initializeTest(0, idlurl);
tests.put(test2.getName(), test2);;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java
index 8d45a5d86..93a2f7d6d 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java
@@ -26,6 +26,7 @@ import java.util.Properties;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.util.FileUtils;
public class OAuth20Configuration {
@@ -44,10 +45,12 @@ public class OAuth20Configuration {
public static final String JWT_KEY_PASSWORD = "jwt.ks.key.password";
private Properties props;
+ private String rootDir = null;
private OAuth20Configuration() {
try {
props = AuthConfigurationProvider.getInstance().getGeneralOAuth20ProperiesConfig();
+ rootDir = AuthConfigurationProvider.getInstance().getRootConfigFileDir();
}
catch (ConfigurationException e) {
e.printStackTrace();
@@ -55,7 +58,7 @@ public class OAuth20Configuration {
}
public String getJWTKeyStore() {
- return props.getProperty(JWT_KEYSTORE);
+ return FileUtils.makeAbsoluteURL(props.getProperty(JWT_KEYSTORE), rootDir);
}
public String getJWTKeyStorePassword() {
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java
index ebfffb648..9f2ad2e1b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java
@@ -55,6 +55,7 @@ import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
import at.gv.egovernment.moa.id.protocols.pvp2x.utils.SAML2Utils;
import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.FileUtils;
import at.gv.egovernment.moa.util.MiscUtil;
public class PVPConfiguration {
@@ -112,12 +113,14 @@ public class PVPConfiguration {
//PVP2 generalpvpconfigdb;
Properties props;
+ String rootDir = null;
private PVPConfiguration() {
try {
//generalpvpconfigdb = AuthConfigurationProvider.getInstance().getGeneralPVP2DBConfig();
props = AuthConfigurationProvider.getInstance().getGeneralPVP2ProperiesConfig();
-
+ rootDir = AuthConfigurationProvider.getInstance().getRootConfigFileDir();
+
} catch (ConfigurationException e) {
e.printStackTrace();
}
@@ -147,7 +150,7 @@ public class PVPConfiguration {
}
public String getIDPKeyStoreFilename() {
- return props.getProperty(IDP_JAVAKEYSTORE);
+ return FileUtils.makeAbsoluteURL(props.getProperty(IDP_JAVAKEYSTORE), rootDir);
}
public String getIDPKeyStorePassword() {