fix: harden opt-in transport and lock backends against unauthenticated infrastructure - #2086
Conversation
73a2f23 to
a179bde
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a179bde to
068979b
Compare
gnodet
left a comment
There was a problem hiding this comment.
Well-structured security hardening that correctly guards all three opt-in backends (Hazelcast, Redisson, Minio) against unauthenticated infrastructure defaults. Each backend follows a "fail closed" philosophy appropriate to its role.
@since tag corrections (2 locations)
RedissonNamedLockFactorySupport.javaline 72:@since 2.0.22→@since 2.0.23MinioTransporterConfigurationKeys.javaline 67:@since 2.0.22→@since 2.0.23
Bonus bugfix
FixedBucketObjectNameMapperFactory.java: The ConfigUtils.getString arguments were swapped — the config property name was used as the default value and vice versa, so unconfigured builds would use the literal string "aether.transport.minio.fixedBucketName" as the bucket name instead of "maven". This is a genuine pre-existing bug fix. Consider separating into its own commit for cleaner backport tracking.
Positive observations
- Redisson guard correctly allows loopback addresses for local dev
- Minio guard takes a stricter stance by refusing even loopback HTTP (justified:
minio+http/s3+httpbypassesexternal:http:*mirror blocking) isInsecureRemoteAddresshandles TLS (rediss://), IPv4/IPv6 loopback, and fails closed on unparseable URIshttpOvertakepath correctly unguarded — when operator explicitly raises Minio priority, the repo IS subject to mirror blocking
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
cstamas
left a comment
There was a problem hiding this comment.
LGTM, with one note for the record: Hazelcast locking is "frozen", is deprecated, should not be used, and is just waiting for Resolver 2.1.x to be dropped
2.0.22 is already released; new API additions must target 2.0.23. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Fixes 4 findings from the maven-resolver security audit (scan-maven-resolver-20260811):
minio+http/s3+httprepositories evadeexternal:http:*blockingConfigUtils.getStringargs ignore bucket config, misroute artifactsRoot cause: Three opt-in modules place infrastructure that gates local-repository integrity outside every defense the platform otherwise applies: MinIO plaintext evades
external:http:*, Hazelcast boots with no auth on defaults, Redis accepts any plaintext address.Fix: Make enabling insecure backends a loud, deliberate act: refuse plaintext without opt-in, fail fast without explicit config, document trust boundary.
Test plan
🤖 Generated with Claude Code