You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/03/03 15:54:00 UTC
[jira] [Commented] (ARTEMIS-5902) Optimize authentication cache key creation
[ https://issues.apache.org/jira/browse/ARTEMIS-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18062501#comment-18062501 ]
ASF subversion and git services commented on ARTEMIS-5902:
----------------------------------------------------------
Commit ae8778ec5efcdea543e219467d39c7441f328b5d in artemis's branch refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=artemis.git;h=ae8778ec5e ]
ARTEMIS-5902 optimize authn cache key creation
Eliminate unnecessary calls to j.s.MessageDigest#getInstance(String) as
well as unnecessary bytes in hash.
Existing tests should suffice for validation.
> Optimize authentication cache key creation
> ------------------------------------------
>
> Key: ARTEMIS-5902
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5902
> Project: Artemis
> Issue Type: Improvement
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Currently the process to create an authentication cache key involves _always_ invoking {{java.security.MessageDigest#getInstance(java.lang.String)}}. This isn't strictly necessary. We can use a pattern similar to {{org.apache.activemq.artemis.protocol.amqp.sasl.scram.ScramServerFunctionalityImpl}} which uses {{clone()}} on the {{MessageDigest}} to avoid invoking {{getInstance}} every time.
> Also, we can hash fewer bytes and avoid unnecessary String concatenations by inspecting each part of the input and only adding bytes that actually make a difference to the final hash.
> These are relatively minor improvements, but are simple and still worth doing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org