Skip to content

NIFI-16371 Stabilized PasswordBasedPropertyEncryptionProviderTest aut… - #11699

Merged
pvillard31 merged 1 commit into
apache:mainfrom
joewitt:NIFI-16371
Sep 20, 2026
Merged

pvillard31 merged 1 commit into
apache:mainfrom
joewitt:NIFI-16371

Conversation

@joewitt

@joewitt joewitt commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

NIFI-16371 Fixes a 1-in-256 flake in PasswordBasedPropertyEncryptionProviderTest.testDecryptAuthenticationFailed.

The test encrypted a value then assigned encrypted[0] = 0 before asserting that decryption throws. Encrypted output starts with a random AES-GCM IV, so that assignment is a no-op whenever the first IV byte is already zero. Decryption then succeeds and the assertion fails.

The assignment is now a bit flip (encrypted[0] ^= 1) so the ciphertext is always mutated.

Tracking

Issue Tracking

  • Apache NiFi Jira issue created

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number
  • Pull Request commit message starts with Apache NiFi Jira issue number
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

PasswordBasedPropertyEncryptionProviderTest (11 tests) passed, then testDecryptAuthenticationFailed passed 30 additional consecutive Maven runs.

Licensing

No new dependencies.

Documentation

No documentation changes.

…hentication failure assertion

Co-authored-by: Cursor <cursoragent@cursor.com>

@markap14 markap14 left a comment

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.

Thanks @joewitt seems reasonable. +1 will merge pending CI completion.

@pvillard31
pvillard31 merged commit 29236d6 into apache:main Sep 20, 2026
11 of 13 checks passed
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.

4 participants