Skip to content

ARTEMIS-6057 support literalMatchMarkers in security repo such that f…#6441

Open
gtully wants to merge 1 commit into
apache:mainfrom
gtully:_ARTEMIS-6057
Open

ARTEMIS-6057 support literalMatchMarkers in security repo such that f…#6441
gtully wants to merge 1 commit into
apache:mainfrom
gtully:_ARTEMIS-6057

Conversation

@gtully
Copy link
Copy Markdown
Contributor

@gtully gtully commented May 13, 2026

…qqn with wildcards can be supported

@gtully gtully requested a review from jbertram May 13, 2026 12:31
@gtully
Copy link
Copy Markdown
Contributor Author

gtully commented May 13, 2026

@jbertram should I consider combining the exact and literal match maps?

Copy link
Copy Markdown
Contributor

@jbertram jbertram left a comment

Choose a reason for hiding this comment

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

Couple of things:

  • Instead of adding support for literal matches it may be simpler to modify HierarchicalObjectRepository#addMatch to check both wildcard and FQQN. The benefit is that users wouldn't have to configure literal matches (and incur the performance penalty) and it makes sense anyway to treat a wildcard + FQQN as an exact match.
if (literal) {
   literalMatches.put(modifiedMatch, match1);
} else if (wildcardConfiguration.isWild(modifiedMatch) && !CompositeAddress.isFullyQualified(modifiedMatch)) {
   wildcardMatches.put(modifiedMatch, match1);
} else {
   exactMatches.put(modifiedMatch, match1);
}
  • There should at least be one more test to ensure the negative case (i.e., that a user can't consume from or send to the FQQN).
  • There's some weird white-space that will no longer be allowed since 747c6ce was merged today.
  • It would be nice if the commit message was a bit shorter to more closely conform to general recommendation.

in security settings, fqqn are treated as an exact match, but when they
contain a wildcard are being ignored for exact match semantics in error
@gtully
Copy link
Copy Markdown
Contributor Author

gtully commented May 14, 2026

thanks for the feedback, that is a simpler approach which will work. Have reworked the fix. thanks

@gtully gtully requested a review from jbertram May 14, 2026 09:40
@brusdev
Copy link
Copy Markdown
Member

brusdev commented May 14, 2026

I'm not sure it is a real use case, however modifying HierarchicalObjectRepository#addMatch to check both wildcard and FQQN would prevent wildcard matches for FQQNs.

@gtully
Copy link
Copy Markdown
Contributor Author

gtully commented May 14, 2026

I'm not sure it is a real use case, however modifying HierarchicalObjectRepository#addMatch to check both wildcard and FQQN would prevent wildcard matches for FQQNs.

we can revisit that if ever the security check w.r.t FQQN needs to change, at the moment it only checks an exact match.

@brusdev
Copy link
Copy Markdown
Member

brusdev commented May 14, 2026

we can revisit that if ever the security check w.r.t FQQN needs to change, at the moment it only checks an exact match.

As I mentioned, I'm not aware of any real use case, so I'm not against this change. However, revisiting it in the future could cause backward compatibility issues.

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.

3 participants