You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "carloea2 (via GitHub)" <gi...@apache.org> on 2026/03/12 07:05:12 UTC

[PR] refactor(auth): use SecureRandom for random hex string generation [texera]

carloea2 opened a new pull request, #4285:
URL: https://github.com/apache/texera/pull/4285

   ### What changes were proposed in this PR?
   
   This PR updates random hex string generation in the Auth module to use `SecureRandom` instead of `Random`.
   
   It also changes the hex string construction to use fixed-width integer-to-hex conversion (`%08x`), so each generated integer consistently contributes 8 hexadecimal characters. This keeps the generated value length stable and makes the implementation more predictable across environments.
   
   Current Implementation: https://github.com/apache/texera/blob/3e46ceaf3d3fb84b1ca003c0ad36235f2f3bb2d7/common/config/src/main/scala/org/apache/texera/config/AuthConfig.scala#L48-L55
   
   
   ### Any related issues, documentation, discussions?
   
   Closes #4284
   
   ### How was this PR tested?
   
   Manually verified that the updated implementation:
   
   * returns a 32-character hexadecimal string
   * preserves the existing method behavior and output length
   * uses fixed-width 8-character hex chunks for each generated integer
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(auth): use SecureRandom for random hex string generation [texera]

Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #4285:
URL: https://github.com/apache/texera/pull/4285#issuecomment-4083718265

   @bobbai00 Please do the merge if you think it's ready.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(auth): use SecureRandom for random hex string generation [texera]

Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica merged PR #4285:
URL: https://github.com/apache/texera/pull/4285


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(auth): use SecureRandom for random hex string generation [texera]

Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #4285:
URL: https://github.com/apache/texera/pull/4285#issuecomment-4052861618

   @bobbai00 Please merge it if you think it's ready.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org