Vilius Šumskas created ARTEMIS-5439:
---------------------------------------

             Summary: Value 'ROLE_NAME' is not facet-valid with respect to 
enumeration '[CLIENT_ID, SNI_HOST, SOURCE_IP, USER_NAME]'
                 Key: ARTEMIS-5439
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5439
             Project: ActiveMQ Artemis
          Issue Type: Bug
            Reporter: Vilius Šumskas


ROLE_NAME key type cannot be used in broker.xml. Example config:
{code:java}
      <connection-routers>
         <connection-router name="forbid-privileged-users">
            <key-type>ROLE_NAME</key-type>
            <local-target-filter>^(?!amq$).*$</local-target-filter>
         </connection-router>
      </connection-routers>{code}
Result when starting the broker:
{noformat}
2025-04-18 11:25:40,962 ERROR [org.apache.activemq.artemis.core.client] 
AMQ214019: Invalid configuration
org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'ROLE_NAME' is not 
facet-valid with respect to enumeration '[CLIENT_ID, SNI_HOST, SOURCE_IP, 
USER_NAME]'. It must be a value from the enumeration.
        at 
java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:512)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3596)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(XMLSchemaValidator.java:3433)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(XMLSchemaValidator.java:3343)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2373)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:944)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.finishNode(DOMValidatorHelper.java:342)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:247)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:190)
 ~[?:?]
        at 
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:108)
 ~[?:?]
        at java.xml/javax.xml.validation.Validator.validate(Validator.java:124) 
~[?:?]
        at org.apache.activemq.artemis.utils.XMLUtil.validate(XMLUtil.java:371) 
[artemis-core-client-2.40.0.jar:2.40.0]
        at 
org.apache.activemq.artemis.core.config.FileDeploymentManager.readConfiguration(FileDeploymentManager.java:80)
 [artemis-server-2.40.0.jar:2.40.0]
        at 
org.apache.activemq.artemis.integration.FileBroker.createComponents(FileBroker.java:121)
 [artemis-cli-2.40.0.jar:2.40.0]
        at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:122) 
[artemis-cli-2.40.0.jar:2.40.0]
        at 
org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:222) 
[artemis-cli-2.40.0.jar:2.40.0]
        at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:170) 
[artemis-cli-2.40.0.jar:2.40.0]
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:?]
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[?:?]
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:?]
        at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
        at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:149) 
[artemis-boot.jar:2.40.0]
        at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:61) 
[artemis-boot.jar:2.40.0]{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to