Project

General

Profile

Actions

Feature #3258

closed

New proxy configuration for ReCaptcha

Added by Ondřej Kopr almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Configuration
Target version:
Start date:
02/24/2023
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Please update IdM configuration for ReCaptcha communication with proxy. Now this behavior use standard IdM proxy settings with the configuration:

idm.sec.core.http.proxy

But the settings overrides all communication from IdM. Project implemented with appliance doesn't work correctly with the standard proxy configuration. Please create new proxy configuration only for ReCaptcha behavior. Also backward comparability is needed.


Related issues

Related to IdStory Identity Manager - Task #3259: Release 12.2.5ClosedTomáš Doischer02/28/2023

Actions
Actions #1

Updated by Ondřej Kopr almost 2 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Ondřej Kopr almost 2 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Tomáš Doischer
  • % Done changed from 0 to 90

Implemented in branch hotfix-12.2.5

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/817baea12d3a40b2387eaa1f185517febe7f506f

Implementation doesn't contain my new test for proxy configuration. Because I have probably a issue with existing tests (class: DefaultRecaptchaServiceUnitTest) - they doesn't pass, please could you check these test in your environment?

I obtain error:

java.lang.IllegalArgumentException: URI is not absolute
    at java.base/java.net.URL.fromURI(URL.java:692)
    at java.base/java.net.URI.toURL(URI.java:1116)
    at org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest(SimpleClientHttpRequestFactory.java:145)
    at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:87)
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:727)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:666)
    at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:441)
    at eu.bcvsolutions.idm.core.security.service.impl.DefaultRecaptchaService.checkRecaptcha(DefaultRecaptchaService.java:56)
    at eu.bcvsolutions.idm.core.security.service.impl.DefaultRecaptchaServiceUnitTest.testNotValid(DefaultRecaptchaServiceUnitTest.java:50)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.mockito.internal.runners.DefaultInternalRunner$1.run(DefaultInternalRunner.java:79)
    at org.mockito.internal.runners.DefaultInternalRunner.run(DefaultInternalRunner.java:85)
    at org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:39)
    at org.mockito.junit.MockitoJUnitRunner.run(MockitoJUnitRunner.java:163)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)

(new tests isn't included)

Documentation was updated:
https://wiki.czechidm.com/devel/documentation/application_configuration/dev/backend#security
https://wiki.czechidm.com/devel/documentation/application_configuration/dev/backend#http_proxy

Please could you provide me a feedback? For testing I have project with proxy and initialized reCAPTCHA component, so we can test new behavior together :)

Thank you :)

Actions #4

Updated by Ondřej Kopr almost 2 years ago

Actions #5

Updated by Tomáš Doischer almost 2 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Tomáš Doischer to Ondřej Kopr
  • Target version changed from 12.2.4 to 12.2.5
  • % Done changed from 90 to 100

LGTM, merged to develop.

A hotfix will be released next week. The relevant ticket is #3259.

Actions #6

Updated by Tomáš Doischer almost 2 years ago

Actions #7

Updated by Tomáš Doischer almost 2 years ago

  • Status changed from Resolved to Closed
  • Target version changed from 12.2.5 to 13.0.1
Actions

Also available in: Atom PDF