Skip to content

Comments

WW-5514 Add StrutsProxyService for proxy detection and resolution#1572

Closed
lukaszlenart wants to merge 2 commits intomainfrom
test/WW-5514-spring-proxy-integration-test
Closed

WW-5514 Add StrutsProxyService for proxy detection and resolution#1572
lukaszlenart wants to merge 2 commits intomainfrom
test/WW-5514-spring-proxy-integration-test

Conversation

@lukaszlenart
Copy link
Member

Summary

Introduces a configurable ProxyService interface and StrutsProxyService implementation for detecting and resolving Spring AOP/Hibernate proxies.

Fixes WW-5514

Key Changes

  • ProxyService interface with isProxy, ultimateTargetClass, and resolveTargetMember methods
  • StrutsProxyService implementation using configurable caches
  • ProxyCacheFactory and StrutsProxyCacheFactory for cache management
  • Integration into ChainingInterceptor, ParametersInterceptor, and SecurityMemberAccess
  • Integration test with Spring AOP proxied action chaining
  • Configuration constants for proxy cache type and size

Proxy Types Supported

  • Spring CGLIB proxies (class-based)
  • Spring JDK dynamic proxies (interface-based)
  • Hibernate entity proxies
  • Member resolution for allowlist checking

Configuration

New properties in default.properties:

struts.proxy.cacheType=basic
struts.proxy.cacheMaxSize=10000
struts.proxy.cacheFactory=struts
struts.proxyService=struts

Test Plan

  • Unit tests for StrutsProxyService
  • Unit tests for StrutsProxyCacheFactory
  • Unit tests for SecurityMemberAccessProxyTest
  • Integration test SpringProxyActionChainingTest
  • Manual testing with Spring AOP proxied actions

🤖 Generated with Claude Code

lukaszlenart and others added 2 commits February 20, 2026 07:33
…esolution

Introduces a configurable ProxyService interface and StrutsProxyService
implementation for detecting and resolving Spring AOP/Hibernate proxies.

Key changes:
- Add ProxyService interface with isProxy, ultimateTargetClass, and
  resolveTargetMember methods
- Add StrutsProxyService implementation using configurable caches
- Add ProxyCacheFactory and StrutsProxyCacheFactory for cache management
- Integrate ProxyService into ChainingInterceptor, ParametersInterceptor,
  and SecurityMemberAccess
- Add integration test with Spring AOP proxied action chaining
- Add configuration constants for proxy cache type and size

The StrutsProxyService correctly handles:
- Spring CGLIB proxies (class-based)
- Spring JDK dynamic proxies (interface-based)
- Hibernate entity proxies
- Member resolution for allowlist checking

Fixes WW-5514

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…oxies

Add integration tests to SpringProxyUtilTest that verify the new
ProxyService works correctly with real Spring AOP proxies, alongside
the existing deprecated ProxyUtil tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@lukaszlenart lukaszlenart force-pushed the test/WW-5514-spring-proxy-integration-test branch from 875af77 to d4bfc13 Compare February 20, 2026 06:33
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
73.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@lukaszlenart lukaszlenart deleted the test/WW-5514-spring-proxy-integration-test branch February 20, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant