summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2018-07-20 10:57:08 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2018-07-20 10:57:08 +0200
commit84a86ceddf89f4a1a04396a37742a892f09ffafb (patch)
tree8408d00bb975a6cf5cae551018ca93ea4bf2b1a8
parent41ee559d1aafc2eab6f4f9a339ff8b6ca9970c18 (diff)
downloadEAAF-Components-84a86ceddf89f4a1a04396a37742a892f09ffafb.tar.gz
EAAF-Components-84a86ceddf89f4a1a04396a37742a892f09ffafb.tar.bz2
EAAF-Components-84a86ceddf89f4a1a04396a37742a892f09ffafb.zip
some small modifications in attribute builder
update internal messages-codes
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java4
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java4
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFConfigurationException.java8
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFStorageException.java4
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java14
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractConfigurationImpl.java25
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java2
-rw-r--r--eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/binding/PostBinding.java6
-rw-r--r--eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/AbstractMetadataSignatureFilter.java14
-rw-r--r--eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/PVPEntityCategoryFilter.java3
-rw-r--r--eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/SchemaValidationFilter.java3
-rw-r--r--eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/exception/InvalidAssertionConsumerServiceException.java2
-rw-r--r--eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AbstractPVP2XProtocol.java15
-rw-r--r--eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/MetadataAction.java2
-rw-r--r--eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/PVPSProfilePendingRequest.java58
-rw-r--r--eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java3
16 files changed, 70 insertions, 97 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java
index c1837346..5f6931f3 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java
@@ -34,13 +34,13 @@ public interface IStatusMessenger {
public static final String CODES_INTERNAL_ERROR_AUTH_NOPENDIGREQID = "auth.26";
public static final String CODES_INTERNAL_ERROR_AUTH_TIMEOUT = "auth.28";
public static final String CODES_INTERNAL_ERROR_AUTH_USERSTOP = "auth.21";
- public static final String CODES_INTERNAL_ERROR_AUTH_REQUEST_INVALID = "auth.35";
+ public static final String CODES_INTERNAL_ERROR_AUTH_REQUEST_INVALID = "auth.38";
public static final String CODES_INTERNAL_ILLEGAL_STATE = "process.03";
//external error codes defined in EAAFCore
public static final String CODES_EXTERNAL_ERROR_GENERIC = "9199";
- public static final String CODES_EXTERNAL_ERROR_PROCESSENGINE = "1100";
+ public static final String CODES_EXTERNAL_ERROR_PROCESSENGINE = "1099";
/**
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java
index 946fe571..1c8b4d98 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java
@@ -56,13 +56,13 @@ public class AuthnRequestValidatorException extends EAAFProtocolException {
}
- public AuthnRequestValidatorException(String internalMsgId, Object[] params, String msg, IRequest errorRequest) {
+ public AuthnRequestValidatorException(String internalMsgId, Object[] params, IRequest errorRequest) {
super(internalMsgId, params);
this.errorRequest = errorRequest;
}
- public AuthnRequestValidatorException(String internalMsgId, Object[] params, String msg, IRequest errorRequest, Throwable e) {
+ public AuthnRequestValidatorException(String internalMsgId, Object[] params, IRequest errorRequest, Throwable e) {
super(internalMsgId, params, e);
this.errorRequest = errorRequest;
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFConfigurationException.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFConfigurationException.java
index 16b9057a..cf7ae6a9 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFConfigurationException.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFConfigurationException.java
@@ -33,12 +33,12 @@ public class EAAFConfigurationException extends EAAFException {
*/
private static final long serialVersionUID = 1L;
- public EAAFConfigurationException(String msg) {
- super(msg, null);
+ public EAAFConfigurationException(String msg, Object[] params) {
+ super(msg, params);
}
- public EAAFConfigurationException(String msg, Throwable e) {
- super(msg, null, e);
+ public EAAFConfigurationException(String msg, Object[] params, Throwable e) {
+ super(msg, params, e);
}
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFStorageException.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFStorageException.java
index 83623e8f..34057410 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFStorageException.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFStorageException.java
@@ -31,11 +31,11 @@ public class EAAFStorageException extends EAAFException {
private static final long serialVersionUID = 1L;
public EAAFStorageException(String msg) {
- super(msg, null);
+ super("internal.02", new Object[] {msg});
}
public EAAFStorageException(String msg, Throwable e) {
- super(msg, null, e);
+ super("internal.02", new Object[] {msg}, e);
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
index ad01a796..17c8274b 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
@@ -417,14 +417,22 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
}
String[] spitted = pvpbPKValueAttr.split(":");
- if (spitted.length != 2) {
+ if (spitted.length == 2) {
+ log.debug("Find PVP-Attr: " + PVPAttributeDefinitions.BPK_FRIENDLY_NAME);
+ return spitted[1];
+
+
+
+ } else if (spitted.length > 2) {
log.warn("Attribute " + PVPAttributeDefinitions.BPK_NAME + " has a wrong encoding and can NOT be USED!"
+ " Value:" + pvpbPKValueAttr);
return null;
+ } else {
+ log.debug("Find PVP-Attr: " + PVPAttributeDefinitions.BPK_FRIENDLY_NAME + " without prefix. Use it as it is");
+ return spitted[0];
+
}
- log.debug("Find PVP-Attr: " + PVPAttributeDefinitions.BPK_FRIENDLY_NAME);
- return spitted[1];
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractConfigurationImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractConfigurationImpl.java
index f269c501..ca99b040 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractConfigurationImpl.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractConfigurationImpl.java
@@ -60,6 +60,13 @@ public abstract class AbstractConfigurationImpl implements IConfiguration {
if (StringUtils.isEmpty(configPath)) {
log.debug("Primary configuration is empty. Search for backup configuration .... ");
+ String backupConfigPath = getBackupConfigPath();
+ if (StringUtils.isEmpty(backupConfigPath)) {
+ log.error("No configuration file found.");
+ throw new EAAFConfigurationException("config.01", null);
+
+ }
+
internalConfigPath = new URI(getBackupConfigPath());
} else
@@ -70,7 +77,13 @@ public abstract class AbstractConfigurationImpl implements IConfiguration {
//extract configuration root directory
//TODO: check if it works with classpath
- File propertiesFile = new File(internalConfigPath);
+ File propertiesFile = new File(internalConfigPath);
+ if (!propertiesFile.exists()) {
+ log.error("Configuration file: " + internalConfigPath + " is NOT found on filesystem");
+ throw new EAAFConfigurationException("config.18", null);
+
+ }
+
String configDir = propertiesFile.getParent();
configRootDirectory = new File(configDir).toURI();
log.debug("Set EAAFCore configuration root directory to " + configRootDirectory.toString());
@@ -87,13 +100,14 @@ public abstract class AbstractConfigurationImpl implements IConfiguration {
} else {
log.error("Can not load EAAFCore configuration. Unsupported prefix! (Only 'file:' and 'classpath:') ");
- throw new EAAFConfigurationException("Can not load EAAFCore configuration. Unsupported prefix");
+ throw new EAAFConfigurationException("config.24", new Object[] {internalConfigPath, "'file:'"});
}
if (is == null) {
log.error("Can NOT load EAAFCore configuration from file " + internalConfigPath.toString());
- throw new EAAFConfigurationException("Can NOT load EAAFCore configuration from file " + internalConfigPath.toString());
+ throw new EAAFConfigurationException("config.03",
+ new Object[] {internalConfigPath.toString()});
}
@@ -103,11 +117,10 @@ public abstract class AbstractConfigurationImpl implements IConfiguration {
properties.load(is);
log.info("EAAFCore configuration loaded");
-
-
+
} catch (URISyntaxException | IOException e) {
log.error("Can not parse configuration path " + configPath + " or " + getBackupConfigPath());
- throw new EAAFConfigurationException("Can not parse configuration path", e);
+ throw new EAAFConfigurationException("config.03", new Object[]{configPath + " or " + getBackupConfigPath()}, e);
} finally {
if (is != null) {
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java
index b3e4d874..a4120ed1 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java
@@ -96,7 +96,7 @@ public class RestartAuthProzessManagement extends AbstractAuthServletTask {
} catch (EAAFException e) {
log.error("Database Error! MOASession is not stored!");
- throw new EAAFException("init.04", new Object[] { pendingReq.getPendingRequestId() });
+ throw new EAAFException("internal.02", null);
}
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/binding/PostBinding.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/binding/PostBinding.java
index e355a670..559fd692 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/binding/PostBinding.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/binding/PostBinding.java
@@ -117,8 +117,9 @@ public class PostBinding implements IDecoder, IEncoder {
encoder.encode(context);
} catch (Exception e) {
- e.printStackTrace();
+ log.warn("Can not encode SAML2 request", e);
throw new SecurityException(e);
+
}
}
@@ -158,8 +159,9 @@ public class PostBinding implements IDecoder, IEncoder {
encoder.encode(context);
} catch (Exception e) {
- e.printStackTrace();
+ log.warn("Can not encode SAML2 response", e);
throw new SecurityException(e);
+
}
}
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/AbstractMetadataSignatureFilter.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/AbstractMetadataSignatureFilter.java
index 994d66df..cedd8bad 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/AbstractMetadataSignatureFilter.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/AbstractMetadataSignatureFilter.java
@@ -49,14 +49,15 @@ public abstract class AbstractMetadataSignatureFilter implements MetadataFilter
if (metadata instanceof EntitiesDescriptor) {
EntitiesDescriptor entitiesDescriptor = (EntitiesDescriptor) metadata;
if(entitiesDescriptor.getSignature() == null) {
- throw new PVP2MetadataException("Root element of metadata file has to be signed", null);
+ throw new PVP2MetadataException("pvp2.26",
+ new Object[] {"Root element of metadata file has to be signed"});
}
processEntitiesDescriptor(entitiesDescriptor);
if (entitiesDescriptor.getEntityDescriptors().size() == 0) {
- throw new PVP2MetadataException("No valid entity in metadata "
- + entitiesDescriptor.getName() + ". Metadata is not loaded.", null);
+ throw new PVP2MetadataException("pvp2.26",
+ new Object[] {"No valid entity in metadata " + entitiesDescriptor.getName()});
}
@@ -64,9 +65,9 @@ public abstract class AbstractMetadataSignatureFilter implements MetadataFilter
EntityDescriptor entityDescriptor = (EntityDescriptor) metadata;
processEntityDescriptorr(entityDescriptor);
- } else {
- throw new PVP2MetadataException("Invalid Metadata file Root element is no EntitiesDescriptor", null);
- }
+ } else
+ throw new PVP2MetadataException("pvp2.26",
+ new Object[] {"Invalid Metadata file Root element is unknown"});
@@ -74,6 +75,7 @@ public abstract class AbstractMetadataSignatureFilter implements MetadataFilter
} catch (EAAFException e) {
log.warn("Metadata signature policy check FAILED.", e);
throw new SignatureValidationException(e);
+
}
}
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/PVPEntityCategoryFilter.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/PVPEntityCategoryFilter.java
index 390879aa..4bb7c821 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/PVPEntityCategoryFilter.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/PVPEntityCategoryFilter.java
@@ -97,7 +97,8 @@ public class PVPEntityCategoryFilter implements MetadataFilter {
} else
- throw new PVP2MetadataException("Invalid Metadata file Root element is no Entities- or EntityDescriptor", null);
+ throw new PVP2MetadataException("pvp2.26",
+ new Object[] {"Invalid Metadata file Root element is no Entities- or EntityDescriptor"});
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/SchemaValidationFilter.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/SchemaValidationFilter.java
index 89335da5..1b9bc7c6 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/SchemaValidationFilter.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/validation/metadata/SchemaValidationFilter.java
@@ -95,7 +95,8 @@ public class SchemaValidationFilter implements MetadataFilter {
}
throw new FilterException(
- new SchemaValidationException("Metadata Schema validation FAILED with message: "+ errString, null));
+ new SchemaValidationException("pvp2.26",
+ new Object[] {"Metadata Schema validation FAILED with message: " + errString}));
} else
log.info("Metadata Schema validation check is DEACTIVATED!");
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/exception/InvalidAssertionConsumerServiceException.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/exception/InvalidAssertionConsumerServiceException.java
index 38daf6bf..07e7d99e 100644
--- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/exception/InvalidAssertionConsumerServiceException.java
+++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/exception/InvalidAssertionConsumerServiceException.java
@@ -33,7 +33,7 @@ import at.gv.egiz.eaaf.modules.pvp2.exception.PVP2Exception;
public class InvalidAssertionConsumerServiceException extends PVP2Exception {
public InvalidAssertionConsumerServiceException(int idx) {
- super("pvp2.00", new Object[]{idx});
+ super("pvp2.28", new Object[]{idx});
this.statusCodeValue = StatusCode.REQUESTER_URI;
}
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AbstractPVP2XProtocol.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AbstractPVP2XProtocol.java
index 7a363455..93264804 100644
--- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AbstractPVP2XProtocol.java
+++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AbstractPVP2XProtocol.java
@@ -400,8 +400,9 @@ public abstract class AbstractPVP2XProtocol extends AbstractAuthProtocolModulCon
log.debug("Find protocol handler in child implementation");
else {
- log.error("Receive unsupported PVP21 message");
- throw new InvalidPVPRequestException("Unsupported PVP21 message", new Object[] {});
+ log.error("Receive unsupported PVP21 message of type: " + ((PVPSProfileRequest)msg).getSamlRequest().getClass().getName());
+ throw new InvalidPVPRequestException("pvp2.09",
+ new Object[] {((PVPSProfileRequest)msg).getSamlRequest().getClass().getName()});
}
revisionsLogger.logEvent(pendingReq, IRevisionLogger.AUTHPROTOCOL_TYPE, getAuthProtocolIdentifier());
@@ -438,15 +439,17 @@ public abstract class AbstractPVP2XProtocol extends AbstractAuthProtocolModulCon
if (authnRequest.getIssueInstant() == null) {
log.warn("Unsupported request: No IssueInstant Attribute found.");
- throw new AuthnRequestValidatorException("Unsupported request: No IssueInstant Attribute found.", new Object[] {},
- "Unsupported request: No IssueInstant Attribute found", pendingReq);
+ throw new AuthnRequestValidatorException("pvp2.22",
+ new Object[] {"Unsupported request: No IssueInstant Attribute found"},
+ pendingReq);
}
if (authnRequest.getIssueInstant().minusMinutes(EAAFConstants.ALLOWED_TIME_JITTER).isAfterNow()) {
log.warn("Unsupported request: No IssueInstant DateTime is not valid anymore.");
- throw new AuthnRequestValidatorException("Unsupported request: No IssueInstant DateTime is not valid anymore.", new Object[] {},
- "Unsupported request: No IssueInstant DateTime is not valid anymore.", pendingReq);
+ throw new AuthnRequestValidatorException("pvp2.22",
+ new Object[] {"Unsupported request: No IssueInstant DateTime is not valid anymore."},
+ pendingReq);
}
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/MetadataAction.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/MetadataAction.java
index 1baded12..b15b4fbf 100644
--- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/MetadataAction.java
+++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/MetadataAction.java
@@ -93,7 +93,7 @@ public class MetadataAction implements IAction {
} catch (Exception e) {
log.error("Failed to generate metadata", e);
- throw new PVP2MetadataException("pvp2.13", null);
+ throw new PVP2MetadataException("pvp2.27", null);
}
}
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/PVPSProfilePendingRequest.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/PVPSProfilePendingRequest.java
index 0d53f471..e7c5bab9 100644
--- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/PVPSProfilePendingRequest.java
+++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/PVPSProfilePendingRequest.java
@@ -66,62 +66,4 @@ public class PVPSProfilePendingRequest extends RequestImpl {
this.consumerURL = consumerURL;
}
-
-// /* (non-Javadoc)
-// * @see at.gv.egovernment.moa.id.moduls.RequestImpl#getRequestedAttributes()
-// */
-// @Override
-// public Collection<String> getRequestedAttributes(MetadataProvider metadataProvider) {
-//
-// Map<String, String> reqAttr = new HashMap<String, String>();
-// for (String el : PVP2XProtocol.DEFAULTREQUESTEDATTRFORINTERFEDERATION)
-// reqAttr.put(el, "");
-//
-// try {
-// SPSSODescriptor spSSODescriptor = getRequest().getEntityMetadata(metadataProvider).getSPSSODescriptor(SAMLConstants.SAML20P_NS);
-// if (spSSODescriptor.getAttributeConsumingServices() != null &&
-// spSSODescriptor.getAttributeConsumingServices().size() > 0) {
-//
-// Integer aIdx = null;
-// if (getRequest() instanceof MOARequest &&
-// ((MOARequest)getRequest()).getSamlRequest() instanceof AuthnRequestImpl) {
-// AuthnRequestImpl authnRequest = (AuthnRequestImpl)((MOARequest)getRequest()).getSamlRequest();
-// aIdx = authnRequest.getAttributeConsumingServiceIndex();
-//
-// } else {
-// Logger.error("MOARequest is NOT of type AuthnRequest");
-// }
-//
-// int idx = 0;
-//
-// AttributeConsumingService attributeConsumingService = null;
-//
-// if (aIdx != null) {
-// idx = aIdx.intValue();
-// attributeConsumingService = spSSODescriptor
-// .getAttributeConsumingServices().get(idx);
-//
-// } else {
-// List<AttributeConsumingService> attrConsumingServiceList = spSSODescriptor.getAttributeConsumingServices();
-// for (AttributeConsumingService el : attrConsumingServiceList) {
-// if (el.isDefault())
-// attributeConsumingService = el;
-// }
-// }
-//
-// for ( RequestedAttribute attr : attributeConsumingService.getRequestAttributes())
-// reqAttr.put(attr.getName(), "");
-// }
-//
-// //return attributQueryBuilder.buildSAML2AttributeList(this.getOnlineApplicationConfiguration(), reqAttr.keySet().iterator());
-// return reqAttr.keySet();
-//
-// } catch (NoMetadataInformationException e) {
-// Logger.warn("NO metadata found for Entity " + getRequest().getEntityID());
-// return null;
-//
-// }
-//
-// }
-
}
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java
index d049aeb3..f50a4495 100644
--- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java
+++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java
@@ -332,7 +332,8 @@ public class PVP2AssertionBuilder implements PVPConstants {
} catch (Exception e) {
log.warn("PVP2 subjectNameID error", e);
- throw new ResponderErrorException("pvp2.13", null, e);
+ throw new ResponderErrorException("internal.03", null, e);
+
}
} else