aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2019-02-04 07:57:29 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2019-02-04 07:57:29 +0100
commitb248f9ddedb23fa27cd59bc46ae0beb4c7d22967 (patch)
treee8f4db3826bd28e42682515aaa176a47d4055862 /id
parentf9cdab97942aac748915cd07c32669f37de57500 (diff)
downloadmoa-id-spss-b248f9ddedb23fa27cd59bc46ae0beb4c7d22967.tar.gz
moa-id-spss-b248f9ddedb23fa27cd59bc46ae0beb4c7d22967.tar.bz2
moa-id-spss-b248f9ddedb23fa27cd59bc46ae0beb4c7d22967.zip
inject SignerCertificate in SL20 authentication
Diffstat (limited to 'id')
-rw-r--r--id/server/modules/moa-id-module-sl20_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/sl20_auth/tasks/VerifyQualifiedeIDTask.java30
1 files changed, 16 insertions, 14 deletions
diff --git a/id/server/modules/moa-id-module-sl20_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/sl20_auth/tasks/VerifyQualifiedeIDTask.java b/id/server/modules/moa-id-module-sl20_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/sl20_auth/tasks/VerifyQualifiedeIDTask.java
index 6811d1016..0c97641c7 100644
--- a/id/server/modules/moa-id-module-sl20_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/sl20_auth/tasks/VerifyQualifiedeIDTask.java
+++ b/id/server/modules/moa-id-module-sl20_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/sl20_auth/tasks/VerifyQualifiedeIDTask.java
@@ -77,15 +77,20 @@ public class VerifyQualifiedeIDTask extends AbstractAuthServletTask {
//validate eID data
QualifiedeIDVerifier.verifyIdentityLink(idl,
pendingReq.getServiceProviderConfiguration(IOAAuthParameters.class),
- (AuthConfiguration) authConfig);
+ (AuthConfiguration) authConfig);
+ revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_IDL_VALIDATED);
+
+ //validate AuthBlock
authBlockVerificationResult = QualifiedeIDVerifier.verifyAuthBlock(
authBlockB64,
pendingReq.getServiceProviderConfiguration(IOAAuthParameters.class),
(AuthConfiguration) authConfig);
-
+
QualifiedeIDVerifier.checkConsistencyOfeIDData(sl20ReqId, idl, authBlockExtractor, authBlockVerificationResult);
-
+ revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_AUTHBLOCK_VALIDATED);
+
+
//TODO: add LoA verification
} catch (MOAIDException e) {
@@ -97,24 +102,21 @@ public class VerifyQualifiedeIDTask extends AbstractAuthServletTask {
throw e;
}
-
- revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_IDL_VALIDATED);
- revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_AUTHBLOCK_VALIDATED);
-
-
-
+
//add into session
AuthenticationSessionWrapper moasession = pendingReq.getSessionData(AuthenticationSessionWrapper.class);
moasession.setIdentityLink(idl);
moasession.setBkuURL(ccsURL);
- //TODO: from AuthBlock
- if (authBlockVerificationResult != null)
+ moasession.setQAALevel(LoA);
+
+ if (authBlockVerificationResult != null) {
moasession.setIssueInstant(DateTimeUtils.buildDateTimeUTC(authBlockVerificationResult.getSigningDateTime()));
- else
+ moasession.setSignerCertificate(authBlockVerificationResult.getX509certificate());
+
+ } else
moasession.setIssueInstant(DateTimeUtils.buildDateTimeUTC(Calendar.getInstance()));
- moasession.setQAALevel(LoA);
-
+
//store pending request
requestStoreage.storePendingRequest(pendingReq);