[jboss-jira] [JBoss JIRA] (WFCORE-1800) Executing a read-attribute operation is allowed on non-existing resources with for attributes with defined read handlers
Brian Stansberry (JIRA)
issues at jboss.org
Mon Jul 23 12:44:00 EDT 2018
[ https://issues.jboss.org/browse/WFCORE-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry updated WFCORE-1800:
-------------------------------------
Description:
If an attribute defines an {{OperationStepHandler}} the global {{read-attribute}} operation will execute the handler regardless if the resource exists.
-Here's an example that will successfully execute and return the name {{invalid}} for the {{name}} attribute even though the resource does not exist.-
/path=invalid:read-attribute(name=name)
(Note: example ^^^ no longer fails as the specific OSH for the read does the resource check.)
For attributes that use the default means of reading the attribute value the {{context.readResource(PathAddress.EMPTY_ADDRESS, false)}} is already invoked which will cause a failure. For attributes which define a custom read OSH the outcome is unpredictable as the existence of the resource is not validated before invoking the OSH.
The attached patch simply invokes the {{context.readResource(PathAddress.EMPTY_ADDRESS, false)}} before the invocation of the custom OSH.
was:
If an attribute defines an {{OperationStepHandler}} the global {{read-attribute}} operation will execute the handler regardless if the resource exists.
-Here's an example that will successfully execute and return the name {{invalid}} for the {{name}} attribute even though the resource does not exist.
/path=invalid:read-attribute(name=name)
-
(Note: example ^^^ no longer fails as the specific OSH for the read does the resource check.)
For attributes that use the default means of reading the attribute value the {{context.readResource(PathAddress.EMPTY_ADDRESS, false)}} is already invoked which will cause a failure. For attributes which define a custom read OSH the outcome is unpredictable as the existence of the resource is not validated before invoking the OSH.
The attached patch simply invokes the {{context.readResource(PathAddress.EMPTY_ADDRESS, false)}} before the invocation of the custom OSH.
> Executing a read-attribute operation is allowed on non-existing resources with for attributes with defined read handlers
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-1800
> URL: https://issues.jboss.org/browse/WFCORE-1800
> Project: WildFly Core
> Issue Type: Bug
> Components: Management
> Reporter: James Perkins
> Attachments: WFCORE-1800.patch
>
>
> If an attribute defines an {{OperationStepHandler}} the global {{read-attribute}} operation will execute the handler regardless if the resource exists.
> -Here's an example that will successfully execute and return the name {{invalid}} for the {{name}} attribute even though the resource does not exist.-
> /path=invalid:read-attribute(name=name)
> (Note: example ^^^ no longer fails as the specific OSH for the read does the resource check.)
> For attributes that use the default means of reading the attribute value the {{context.readResource(PathAddress.EMPTY_ADDRESS, false)}} is already invoked which will cause a failure. For attributes which define a custom read OSH the outcome is unpredictable as the existence of the resource is not validated before invoking the OSH.
> The attached patch simply invokes the {{context.readResource(PathAddress.EMPTY_ADDRESS, false)}} before the invocation of the custom OSH.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list