From 2705180320eefe81d8a9a4ffa0ff03fa0bb79b74 Mon Sep 17 00:00:00 2001 From: haburger Date: Mon, 21 Oct 2024 07:31:23 +0000 Subject: [PATCH] 3 files updated --- bundles.yml | 20 +++++++++---------- .../ensureAccountState.groovy | 8 ++++---- .../fido2_fetchCaptchaInfos.gy | 7 +++++++ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/bundles.yml b/bundles.yml index 6c784f4..00bcb0f 100644 --- a/bundles.yml +++ b/bundles.yml @@ -1,12 +1,12 @@ schemaVersion: "1.0" bundles: -- "nevisadmin-plugin-base-generation:7.2402.1.3" -- "nevisadmin-plugin-oauth:7.2402.1.3" -- "nevisadmin-plugin-nevisdetect:7.2402.1.3" -- "nevisadmin-plugin-nevisauth:7.2402.1.3" -- "nevisadmin-plugin-nevisdp:7.2402.1.3" -- "nevisadmin-plugin-nevisproxy:7.2402.1.3" -- "nevisadmin-plugin-mobile-auth:7.2402.1.3" -- "nevisadmin-plugin-nevisidm:7.2402.1.3" -- "nevisadmin-plugin-fido2:7.2402.1.3" -- "nevisadmin-plugin-authcloud:7.2402.1.3" +- "nevisadmin-plugin-oauth:8.2405.2.0" +- "nevisadmin-plugin-authcloud:8.2405.2.0" +- "nevisadmin-plugin-nevisidm:8.2405.2.0" +- "nevisadmin-plugin-mobile-auth:8.2405.2.0" +- "nevisadmin-plugin-fido2:8.2405.2.0" +- "nevisadmin-plugin-nevisdp:8.2405.2.0" +- "nevisadmin-plugin-nevisauth:8.2405.2.0" +- "nevisadmin-plugin-nevisproxy:8.2405.2.0" +- "nevisadmin-plugin-nevisdetect:8.2405.2.0" +- "nevisadmin-plugin-base-generation:8.2405.2.0" diff --git a/patterns/f393012a278e525956a362d3_resources/ensureAccountState.groovy b/patterns/f393012a278e525956a362d3_resources/ensureAccountState.groovy index 391afdb..b8c189b 100644 --- a/patterns/f393012a278e525956a362d3_resources/ensureAccountState.groovy +++ b/patterns/f393012a278e525956a362d3_resources/ensureAccountState.groovy @@ -26,7 +26,7 @@ String level100RoleExtid = parameters.get('level100.roleExtid') String baseUrl = "${parameters.get('idm.baseUrl')}/core/v1/$clientExtId" boolean audited = false -String agovAq100AuthEndpoint = null +String aq100AuthRestURL = null String endpoint = null // 1) create the profile if needed @@ -79,14 +79,14 @@ if (!Arrays.stream(response.getActualRoles()).filter( r -> r.contains('AGOV-Loi. LOG.warn("Event='DATAERROR', Requester='${requester}', RequestId='${requestId}', RequestedAq=${requestedAq}, User=${user}, CredentialType='${credentialType}', SourceIp=${sourceIp}, UserAgent='${userAgent}', reason='created missing AGOVaq 100 role'") audited = true } - agovAq100AuthEndpoint = result.getLocation() + aq100AuthRestURL = result.getLocation() } // 3) set the AQ level 100 verification to None if (!session['ch.adnovum.nevisidm.userDto'].contains("idVerificationNoneAGOV-Loi,level100")) { - if (agovAq100AuthEndpoint == null) { + if (aq100AuthRestURL == null) { endpoint = "${baseUrl}/profiles/${profileExtId}/authorizations" def result = idmRestClient.get(endpoint) @@ -99,7 +99,7 @@ if (!session['ch.adnovum.nevisidm.userDto'].contains("idVerifi } } - endpoint = "${agovAq100AuthEndpoint}/properties" + endpoint = "${aq100AuthRestURL}/properties" def patchRequest = new HTTPRequestWrapper() patchRequest.addToHeaders('Content-Type', ['application/json']) diff --git a/patterns/f39352769cb2a1c88e1a176d_scriptFile/fido2_fetchCaptchaInfos.gy b/patterns/f39352769cb2a1c88e1a176d_scriptFile/fido2_fetchCaptchaInfos.gy index e36190c..3a0836b 100644 --- a/patterns/f39352769cb2a1c88e1a176d_scriptFile/fido2_fetchCaptchaInfos.gy +++ b/patterns/f39352769cb2a1c88e1a176d_scriptFile/fido2_fetchCaptchaInfos.gy @@ -1,4 +1,5 @@ import groovy.json.JsonSlurper +import io.opentelemetry.api.trace.Span def url = parameters.get('url') @@ -6,6 +7,12 @@ try { //TODO/haburger/2024-AUG-20: remove if reCaptcha is not needed anymore session.remove('agov.fido2.X-ReCAPTCHA-Integration') + def spanCtxt = Span.current().getSpanContext() + + + def traceparent = "00-${spanCtxt.getTraceId()}-${spanCtxt.getSpanId()}-${spanCtxt.getTraceFlags().asHex()}" + LOG.error('traceparent: ' + traceparent) + def jsonSlurper = new JsonSlurper() def httpClient = HttpClients.create(parameters) def httpResponse = Http.get().url(url).build().send(httpClient)