aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/test/java/at/gv
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2020-08-31 10:22:11 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2020-08-31 10:22:11 +0200
commite10256fe93208ef786d2e38a68a98e2548d501ee (patch)
treea5c1c97936cdd635db7a24164f796be6be5413ee /id/server/idserverlib/src/test/java/at/gv
parentc4633dffe99d4cc41e25fe165b6b8b5013ea34bd (diff)
downloadmoa-id-spss-e10256fe93208ef786d2e38a68a98e2548d501ee.tar.gz
moa-id-spss-e10256fe93208ef786d2e38a68a98e2548d501ee.tar.bz2
moa-id-spss-e10256fe93208ef786d2e38a68a98e2548d501ee.zip
fix SSRF bug in SAML1 parameter validator
Diffstat (limited to 'id/server/idserverlib/src/test/java/at/gv')
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/config/auth/data/DummyAuthConfig.java50
1 files changed, 43 insertions, 7 deletions
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/config/auth/data/DummyAuthConfig.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/config/auth/data/DummyAuthConfig.java
index 1ab54471c..7707f3b90 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/config/auth/data/DummyAuthConfig.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/config/auth/data/DummyAuthConfig.java
@@ -26,6 +26,9 @@ public class DummyAuthConfig implements AuthConfiguration {
private Boolean isIDLEscapingEnabled = null;
+ private Map<String, String> basicConfig = new HashMap<>();
+ private List<String> slRequestTemplates;
+
@Override
public String getRootConfigFileDir() {
// TODO Auto-generated method stub
@@ -100,7 +103,10 @@ public class DummyAuthConfig implements AuthConfiguration {
} else if (UserRestrictionTask.CONFIG_PROPS_CSV_USER_SECTOR.equals(key)) {
return "urn:publicid:gv.at:cdid+ZP-MH";
- }
+ } else if (basicConfig.containsKey(key)) {
+ return basicConfig.get(key);
+
+ }
return null;
@@ -108,8 +114,13 @@ public class DummyAuthConfig implements AuthConfiguration {
@Override
public String getBasicConfiguration(String key, String defaultValue) {
- // TODO Auto-generated method stub
- return null;
+ if (basicConfig.containsKey(key)) {
+ return basicConfig.get(key);
+
+ } else {
+ return defaultValue;
+
+ }
}
@Override
@@ -235,8 +246,8 @@ public class DummyAuthConfig implements AuthConfiguration {
@Override
public List<String> getSLRequestTemplates() throws ConfigurationException {
- // TODO Auto-generated method stub
- return null;
+ return slRequestTemplates;
+
}
@Override
@@ -428,8 +439,14 @@ public class DummyAuthConfig implements AuthConfiguration {
}
+ if (basicConfig.containsKey(key)) {
+ return Boolean.parseBoolean(basicConfig.get(key));
+
+ } else {
+ return defaultValue;
+
+ }
- return false;
}
@Override
@@ -462,8 +479,27 @@ public class DummyAuthConfig implements AuthConfiguration {
@Override
public Boolean getBasicConfigurationBoolean(String key) {
- // TODO Auto-generated method stub
+ if (basicConfig.containsKey(key)) {
+ return Boolean.parseBoolean(basicConfig.get(key));
+
+ }
+
return null;
}
+ public void putIntoBasicConfig(String key, String value) {
+ basicConfig.put(key, value);
+
+ }
+
+ public void removeFromBasicConfig(String key) {
+ basicConfig.remove(key);
+
+ }
+
+ public void setSlRequestTemplateUrls(List<String> templates) {
+ slRequestTemplates = templates;
+
+ }
+
}