GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Present the IPC token when attaching to a running daemon, and validate Redisson YAML addresses by slachiewicz · Pull Request #2120 · apache/maven-resolver

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Sep 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Two changes to maven-resolver-named-locks-ipc and maven-resolver-named-locks-redisson.

IPC token on the reconnect path. master already writes a bootstrap token when a client spawns the daemon itself (#2083). The path that attaches to an already running daemon does not: it reads the address out of the lock file and connects without presenting anything. This extracts connectToExistingServer, teaches it the address\ttoken layout, and sends the token on that path too, so both ways in are treated the same.

Redisson address validation. master has the aether.syncContext.named.redisson.allowInsecureAddress property but nothing that reads the addresses out of the YAML, so the property governs nothing for a Config.fromYAML configuration. This adds validateConfigAddresses, covering the single-server, cluster, replicated, sentinel and master-slave shapes. A plaintext non-loopback address is refused with an IllegalStateException unless the property opts in, in which case it is logged as a warning.

Replaces #2117, whose description claimed the IPC token itself was new. It is not — only the reconnect path is.

Verified: mvn clean install -> BUILD SUCCESS, 2057 tests, 0 failures, 0 errors; spotless:check clean.

This change was created with AI assistance.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
slachiewicz added 2 commits September 4, 2026 20:26
@slachiewicz
Authenticate IPC client connections with a per-daemon token
c42b55d
The daemon address is written into the user-scoped lock file together with
a random token, tab-separated as address\ttoken. A client presents that
token as its first message after connecting, and the server closes any
connection that does not present it before reading a command. This matters
on Windows and wherever the daemon is reached over an inet socket, since
those have no filesystem permissions to lean on.
@slachiewicz
Validate node addresses in Redisson YAML configuration
2d50e5c
Addresses loaded through Config.fromYAML are checked against
aether.syncContext.named.redisson.allowInsecureAddress. A plaintext
non-loopback address is refused with an IllegalStateException unless that
property opts in, in which case it is logged as a warning instead.
@slachiewicz slachiewicz added bug Something isn't working maintenance labels Sep 4, 2026
@slachiewicz slachiewicz mentioned this pull request Sep 4, 2026
Authenticate IPC connections and validate Redisson YAML addresses #2117
Closed
@slachiewicz slachiewicz changed the title Authenticate IPC connections and validate Redisson YAML addresses Present the IPC token when attaching to a running daemon, and validate Redisson YAML addresses Sep 4, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review September 4, 2026 20:28
gnodet
gnodet approved these changes Sep 4, 2026
View reviewed changes

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well-structured security-hardening PR that closes two real gaps: (1) IPC clients reconnecting to an existing daemon now present the bootstrap token read from the lock file, and (2) Redisson addresses loaded from YAML configuration are validated against the insecure-address guard. Both changes are correctly implemented and properly tested.

Observations (non-blocking):

  • The bootstrapToken field Javadoc (IpcClient.java line 97) is stale — it states the field "remains null when this client attached to an already running server," but after this PR connectToExistingServer parses and sets it. Consider updating the doc.

  • The rejection log message (IpcServer.java line 273) includes the raw attacker-supplied token value verbatim. Consider logging only the fact of rejection without the value.

  • getServersConfig uses setAccessible(true) for protected Config methods (getMasterSlaveServersConfig, getReplicatedServersConfig). If Redisson renames these, the reflection silently returns null and those topologies go unvalidated. Acceptable since the three most common topologies use the public isXxxConfig() path.

Positive notes:

  • Wire-level protocol change (mandatory token handshake) is safe since client and daemon always ship together.
  • Redisson YAML test correctly uses lazyInitialization: true to avoid requiring a real Redis server.
  • Both IPC and Redisson test additions adequately cover the new behavior.

📋 PR Metadata

Aspect Current Suggested
Milestone (none) 2.0.23

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@slachiewicz
slachiewicz marked this pull request as draft September 4, 2026 21:07
@slachiewicz slachiewicz added this to the 2.0.23 milestone Sep 4, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review September 5, 2026 09:30
@slachiewicz slachiewicz closed this Sep 6, 2026
@github-actions github-actions Bot removed this from the 2.0.23 milestone Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gnodet gnodet gnodet approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug Something isn't working maintenance

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@slachiewicz @gnodet
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.