Skip to content

Conversation

@JavaSaBr
Copy link
Owner

@JavaSaBr JavaSaBr commented Dec 14, 2025

#142
Reorganize ACL engine related classes:

  1. Move all model classes of ACL engine from the 'acl-groovy-dsl' module to the main 'acl-engine'. Because the module 'acl-engine' is a core ACL module and can be built in different ways (groovy DSL, DB json, or etc)
  2. Keep only Groovy DSL-related classes in the module 'acl-groovy-dsl'
  3. Reorganize package names
  4. Remade AclEngine from record to a regular class. (The engine is not a record by logic)
  5. Update dependencies, acl-engine should not have any dependnecy to 'acl-groovy-dsl', because ''acl-groovy-dsl' is only way of building the engine.
@JavaSaBr JavaSaBr requested a review from crazyrokr December 14, 2025 12:11
@JavaSaBr JavaSaBr self-assigned this Dec 14, 2025
@github-actions
Copy link

github-actions bot commented Dec 14, 2025

Test Coverage Report

Overall Project 85.95% 🍏
Files changed 100% 🍏

File Coverage
TopicNameMatcher.java 100% 🍏
EqualsMatcher.java 100% 🍏
RegexMatcher.java 100% 🍏
AnyValueMatcher.java 100% 🍏
AnyTopicMatcher.java 100% 🍏
TopicFilterMatcher.java 100% 🍏
AclEngine.java 100% 🍏
AnyOfCondition.java 100% 🍏
ClientIdCondition.java 100% 🍏
AnyUserCondition.java 100% 🍏
AllOfCondition.java 100% 🍏
IpAddressCondition.java 100% 🍏
UserNameCondition.java 100% 🍏
TopicCondition.java 100% 🍏
MqttUserCondition.java 100% 🍏
DenySubscribeRule.java 100% 🍏
AbstractRule.java 100% 🍏
AllowPublishRule.java 100% 🍏
DenyPublishRule.java 100% 🍏
AllowSubscribeRule.java 100% 🍏
Action.java 100% 🍏
TopicMatcherBuilder.java 50% 🍏
ClientMatcherBuilder.java 46.15% 🍏
ValueMatcher.java 0% 🍏
RuleContainerBuilder.java 0% 🍏
AclConfigurationException.java 0% 🍏
where:
mqttUser | condition | expectedResult
new TestMqttUser(null, "username2", null) | new AnyOfCondition(userNameEquals("username2")) | true
new TestMqttUser(null, "username2", null) | new AnyOfCondition(userNameEquals("username2")) | true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please apply formatting to all test cases

PUBLISH | new AllowSubscribeRule(clientIdEquals("clientId"), TopicCondition.MATCH_ANY) | false
SUBSCRIBE | new AllowSubscribeRule(clientIdEquals("clientId"), TopicCondition.MATCH_ANY) | true
PUBLISH | new DenyPublishRule(clientIdEquals("clientId"), TopicCondition.MATCH_ANY) | true
PUBLISH | new DenyPublishRule(clientIdEquals("clientId"), TopicCondition.MATCH_ANY) | true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Formatting

@JavaSaBr JavaSaBr merged commit d8187fd into develop Dec 14, 2025
6 checks passed
@JavaSaBr JavaSaBr deleted the feature/142-integrate-acl-groovy-based-engine-part-1 branch December 14, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants