Skip to content

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

…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>
@lukaszlenart lukaszlenart force-pushed the test/WW-5514-spring-proxy-integration-test branch from 51db60f to 875af77 Compare February 9, 2026 11:30
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

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