Skip to content

Subscription: support encrypted password auth in consumer builder#17480

Open
VGalaxies wants to merge 3 commits intoapache:masterfrom
VGalaxies:codex/subscription-encrypted-password-auth
Open

Subscription: support encrypted password auth in consumer builder#17480
VGalaxies wants to merge 3 commits intoapache:masterfrom
VGalaxies:codex/subscription-encrypted-password-auth

Conversation

@VGalaxies
Copy link
Copy Markdown
Contributor

Summary

  • add encrypted password support to subscription consumer builders and runtime consumer metadata
  • pass encrypted auth through subscription pipe creation, with fallback from encrypted verification to raw-password hashing
  • add ignored integration coverage for encrypted-password pull consumer behavior and update related unit tests

Verification

  • mvn -T 8 spotless:apply -P with-integration-tests
  • mvn -T 8 clean package -P with-integration-tests -DskipUTs -pl integration-test,distribution -DfailIfNoTests=false -am -U

This PR was primarily authored with Codex using gpt-5.4 xhigh and then hand-reviewed by me. I AM responsible for every change made in this PR. I aimed to keep it aligned with our goals, though I may have missed minor issues. Please flag anything that feels off, I'll fix it quickly.

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

@Ignore("TODO: enable after encrypted password subscription IT stabilizes")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is this unstable?

Comment on lines +128 to +132
consume_data(consumer, session_dest);
check_count(
4,
"select count(s_0) from " + DEVICE + " where time >= 1706659200000",
"encrypted password consumption");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mind code style

Comment on lines +151 to +156
return new SubscriptionTreePullConsumer.Builder()
.host(SRC_HOST)
.port(SRC_PORT)
.username(USERNAME)
.password(PASSWORD)
.encryptedPassword(encryptedPassword)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is weird to set both password and encryptedPassword.
May throw an exception setting one when another is set.

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.

2 participants