diff options
Diffstat (limited to 'eaaf_modules')
4 files changed, 21 insertions, 4 deletions
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java index a1d5591a..1c1a8f78 100644 --- a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java +++ b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java @@ -9,11 +9,13 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.StopWatch; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; @@ -52,6 +54,8 @@ import lombok.extern.slf4j.Slf4j; @Slf4j public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServletTask { + private static final String FRIENDLYNAME_HTTP_CLIENT = "A-Trust Client"; + @Autowired(required = true) private IHttpClientFactory httpClientFactory; @Autowired(required = true) @@ -115,9 +119,16 @@ public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServl Base64Url.encode(sl20Req.toString().getBytes(StandardCharsets.UTF_8))); // request VDA + + final StopWatch watch = StopWatch.createStarted(); + log.info("Requesting {} for authentication ... ", FRIENDLYNAME_HTTP_CLIENT); final Sl20ResponseHolder httpResp = httpClientFactory.getHttpClient(false).execute( httpReq, SL20HttpBindingUtils.sl20ResponseHandler()); + watch.stop(); + log.info("Respone from {} received after: {}[ms] with statusCode: {}", FRIENDLYNAME_HTTP_CLIENT, + watch.getTime(TimeUnit.MILLISECONDS), httpResp.getResponseStatus().getStatusCode()); + //check on error on http channel if (httpResp.getError() != null) { log.info("Basic SL2.0 response processing has an error. HTTP-StatusCode: {} ErrorMsg: {}", diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractReceiveQualEidTask.java b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractReceiveQualEidTask.java index 0ca6a491..0d0f990a 100644 --- a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractReceiveQualEidTask.java +++ b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractReceiveQualEidTask.java @@ -8,8 +8,6 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.jose4j.base64url.Base64Url; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import com.fasterxml.jackson.core.JsonParseException; @@ -35,9 +33,10 @@ import at.gv.egiz.eaaf.modules.auth.sl20.utils.JsonMapper; import at.gv.egiz.eaaf.modules.auth.sl20.utils.SL20Constants; import at.gv.egiz.eaaf.modules.auth.sl20.utils.SL20JsonExtractorUtils; import at.gv.egiz.eaaf.modules.auth.sl20.utils.SL20ResponseUtils; +import lombok.extern.slf4j.Slf4j; +@Slf4j public abstract class AbstractReceiveQualEidTask extends AbstractAuthServletTask { - private static final Logger log = LoggerFactory.getLogger(AbstractReceiveQualEidTask.class); @Autowired(required = true) private IJoseTools joseTools; @@ -89,6 +88,8 @@ public abstract class AbstractReceiveQualEidTask extends AbstractAuthServletTask } + log.info("Receive response from A-Trust. Starting response-message validation ... "); + // check on errorMessage final VerificationResult payLoadContainerErrorCheck = SL20JsonExtractorUtils.extractSL20PayLoad( sl20ReqObj, diff --git a/eaaf_modules/eaaf_module_moa-sig/src/test/java/console/PdfSigDecoder.java b/eaaf_modules/eaaf_module_moa-sig/src/test/java/console/PdfSigDecoder.java index 28338746..b9e9e517 100644 --- a/eaaf_modules/eaaf_module_moa-sig/src/test/java/console/PdfSigDecoder.java +++ b/eaaf_modules/eaaf_module_moa-sig/src/test/java/console/PdfSigDecoder.java @@ -21,7 +21,7 @@ public class PdfSigDecoder { * @throws UnsupportedEncodingException In case of a general error */ public static void main(String[] args) throws CodingException, UnsupportedEncodingException, IOException { - InputStream is = PdfSigDecoder.class.getResourceAsStream("/pdf_cades_3.hex"); + InputStream is = PdfSigDecoder.class.getResourceAsStream("/pdf_cades_4.hex"); String test = new String(StreamUtils.copyToByteArray(is), "UTF-8"); test = test.replaceAll("\\n", ""); final byte[] bytes = new byte[test.length() / 2]; diff --git a/eaaf_modules/eaaf_module_moa-sig/src/test/resources/pdf_cades_4.hex b/eaaf_modules/eaaf_module_moa-sig/src/test/resources/pdf_cades_4.hex new file mode 100644 index 00000000..2e6ad8da --- /dev/null +++ b/eaaf_modules/eaaf_module_moa-sig/src/test/resources/pdf_cades_4.hex @@ -0,0 +1,5 @@ +308207DE06092A864886F70D010702A08207CF308207CB020101310F300D06096086480165030402010500300B06092A864886F70D010701A082054F3082054B30820333A00302010202045E046839300D06092A864886F70D01010B050030819D310B300906035504061302415431483046060355040A0C3F412D5472757374204765732E20662E20536963686572686569747373797374656D6520696D20656C656B74722E20446174656E7665726B65687220476D62483121301F060355040B0C18612D7369676E2D7072656D69756D2D6D6F62696C652D30353121301F06035504030C18612D7369676E2D7072656D69756D2D6D6F62696C652D3035301E170D3137303432303037303835335A170D3232303432303037303835335A3062310B30090603550406130241543118301606035504030C0F4C656E61204865696D6265726765723113301106035504040C0A4865696D626572676572310D300B060355042A0C044C656E61311530130603550405130C3538363637333333373336343059301306072A8648CE3D020106082A8648CE3D030107034200041E69F77DD3194C7D4BA139C0438C7A0EE598F74B2B09296970212DC89C3F837423B164D9458FAF7150DD5CEBE9D31FC3D9A208FB0482C02D76E8E09C07473452A382019630820192307D06082B060105050701010471306F304406082B060105050730028638687474703A2F2F7777772E612D74727573742E61742F63657274732F612D7369676E2D7072656D69756D2D6D6F62696C652D30352E637274302706082B06010505073001861B687474703A2F2F6F6373702E612D74727573742E61742F6F637370300E0603551D0F0101FF0404030206C0302706082B060105050701030101FF041830163008060604008E460101300A06082B06010505070B0130430603551D1F043C303A3038A036A0348632687474703A2F2F63726C2E612D74727573742E61742F63726C2F612D7369676E2D7072656D69756D2D6D6F62696C652D303530090603551D130402300030600603551D20045930573008060604008B300101304B06062A28001101143041303F06082B060105050702011633687474703A2F2F7777772E612D74727573742E61742F646F63732F63702F612D7369676E2D7072656D69756D2D6D6F62696C6530130603551D23040C300A800848F3FD9C230E877730110603551D0E040A04084F9B60DEBEBFDEAD300D06092A864886F70D01010B05000382020100855F367269D3DCF78A4987EDFED94DB921BCAAADF6AD9592FEBB385514351CE968BD465857DA3A649B3C155A8D94C26F6E6D3BB31277688BE679245291A45378B9303703F6DE6BDD11F71C2C146D4EAEAA66494AE46230B9C568BFC6718925B51AA5C02EB4A7BAFB3C59F000991A56838034450B8E475B37A98C6C4A97ED99200008F0CD2B07DBCE66BA8D40B9E11E0ABC208409897348AA46EF09BC6E38BBE62AB3E3A7EF2241D781953F5A59558655765BD1E98A13B15510FD2E335B916C1BFD4D9189247705CA89004EEC7809F7023CC3910FA8B8DD34579F8CCE9F91FB4591F6C4EC2791B16188A940CDF10D309F927743A6E18999FA99BD9E17208CCBD90122357060F0873736A3DB941C0D59338C7073AF6EA672972ABF182C1741B102AFB258453E1FF9DD14C3680B7E76A13A7CF3512983F250245115656A36E9D86733F448F0C975FBE39DA732738E0924C6CB2120293F7D15F9EEFF10BF6C8C850EE64D50714945A7CAE5818E1D1A359C350FD97A9D4FF770BDE81225A382D8874740B72999F8EC0E855D4BAD109EFF352265ACF4E8BE274C243A9916800D10188C9EF3408BC4D70DC37AC7AFCBA2D4B379B7778CE1D30A853CEE24E30E2FC7DB902CEC6DC58663503102C2C0C22F16D2981C5CEA3075E08AC1C126374F6A42EEAC8950424587F615A4BC8C39F7A3D479CE7F5F8123B132865FD87FC56D74A95D3F318202533082024F0201013081A630819D310B300906035504061302415431483046060355040A0C3F412D5472757374204765732E20662E20536963686572686569747373797374656D6520696D20656C656B74722E20446174656E7665726B65687220476D62483121301F060355040B0C18612D7369676E2D7072656D69756D2D6D6F62696C652D30353121301F06035504030C18612D7369676E2D7072656D69756D2D6D6F62696C652D303502045E046839300D06096086480165030402010500A0820138301806092A864886F70D010903310B06092A864886F70D010701302F06092A864886F70D01090431220420E2F879EF888EA42DCAB4AD2C7103026D92C5892EC18A29CBE9DAF5F3A9359BAF3081EA060B2A864886F70D010910022F3181DA3081D73081D43081D1042047C52F87BF6D9C7C63CC74B1C21718A5643905CD6CB1868F931E7318223613593081AC3081A3A481A030819D310B300906035504061302415431483046060355040A0C3F412D5472757374204765732E20662E20536963686572686569747373797374656D6520696D20656C656B74722E20446174656E7665726B65687220476D62483121301F060355040B0C18612D7369676E2D7072656D69756D2D6D6F62696C652D30353121301F06035504030C18612D7369676E2D7072656D69756D2D6D6F62696C652D303502045E046839300C06082A8648CE3D040302050004483046022100BB26B78E1CBF10E4BF1D5B0F23BDBE77497B61B32581494C772A6EF77F70E248022100950A71E24724EB1D5196D220CC1F5F49BE29A9E943ED4097561650B9CF56A6070000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |