diff options
| author | Florian Reimair <florian.reimair@iaik.tugraz.at> | 2015-03-13 15:38:31 +0100 | 
|---|---|---|
| committer | Florian Reimair <florian.reimair@iaik.tugraz.at> | 2015-03-13 15:38:31 +0100 | 
| commit | 12c3c34ea26ff20e39c9b67f698e9c8b99ef11ee (patch) | |
| tree | 3c80dc1ce5e5f400a4f9a0148d93ac5e8b18ff7e /id/server/modules/module-stork | |
| parent | 399597f84d5a3112cc8ad7262a40cfcae88cf83c (diff) | |
| download | moa-id-spss-12c3c34ea26ff20e39c9b67f698e9c8b99ef11ee.tar.gz moa-id-spss-12c3c34ea26ff20e39c9b67f698e9c8b99ef11ee.tar.bz2 moa-id-spss-12c3c34ea26ff20e39c9b67f698e9c8b99ef11ee.zip | |
STORK PEPS-conform logging
Diffstat (limited to 'id/server/modules/module-stork')
| -rw-r--r-- | id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java index 59f54f957..d233f88c4 100644 --- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java +++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java @@ -6,8 +6,10 @@ import java.io.IOException;  import java.io.InputStream;
  import java.io.StringWriter;
  import java.net.URL;
 +import java.text.SimpleDateFormat;
  import java.util.ArrayList;
  import java.util.Arrays;
 +import java.util.Date;
  import java.util.List;
  import java.util.Properties;
 @@ -170,6 +172,15 @@ public class PepsConnectorTask extends AbstractAuthServletTask {  			Logger.debug("STORK response: ");
  			Logger.debug(authnResponse.toString());
 +			// do PEPS-conform logging for easier evaluation
 +			try {
 +				// 2015-03-12 16:44:27.144#S-PEPS receives response from C-PEPS#orig_msg_id id2 (in response to)#orig_msg_id id1 (in response to)#status#msghash#msg_id id3#
 +				Logger.info(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()) + "#S-PEPS receives response from C-PEPS#" + 
 +						authnResponse.getInResponseTo() + "#NA#" + authnResponse.getMessage() + "#_hash_#" + authnResponse.getSamlId() + "#");
 +			} catch (Exception e1) {
 +				Logger.info("STORK PEPS conform logging failed because of: " + e1.getMessage());
 +			}
 +
  			Logger.debug("Trying to find MOA Session-ID ...");
  			// String moaSessionID = request.getParameter(PARAM_SESSIONID);
  			// first use SAML2 relayState
 @@ -549,6 +560,15 @@ public class PepsConnectorTask extends AbstractAuthServletTask {  			// stork did the authentication step
  			moaSession.setAuthenticated(true);
 +			// do PEPS-conform logging for easier evaluation
 +			try {
 +				// 2015-03-12 16:44:27.144#S-PEPS generates response to SP#orig_msg_id id1 (in response to)#status#msghash#msg_id id4#
 +				Logger.info(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()) + "#S-PEPS generates response to SP#" + 
 +						"#" + moaSession.getProcessInstanceId() + "#" + authnResponse.getMessage() + "#_hash_#" + moaSession.getProcessInstanceId() + "#");
 +			} catch (Exception e1) {
 +				Logger.info("STORK PEPS conform logging failed because of: " + e1.getMessage());
 +			}
 +
  			// TODO: found better solution, but QAA Level in STORK response is not be supported yet
  //			try {
  //
 | 
