[jboss-jira] [JBoss JIRA] (WFCORE-873) Resource alias operation inconsistencies
Kabir Khan (JIRA)
issues at jboss.org
Wed Aug 19 14:03:26 EDT 2015
[ https://issues.jboss.org/browse/WFCORE-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13099923#comment-13099923 ]
Kabir Khan commented on WFCORE-873:
-----------------------------------
This appears to be quite deeply hidden in the ModelController. One of the first things to happen when an operation is called (I have only checked in standalone mode) is that the prepare step handler gets the operation entry for the 'eviction=EVICTION' (i.e. the alias address).
What is returned from the resource registration registry is an AliasStepHandler with a reference to the AliasEntry. These two in conjunction change the r-r-d operation to use the real entry 'component=eviction' and execute the target operation. So by the time the r-r-d handler is called the operation has already been changed to have the target address, and there is no way to map from the real address back to the target address at the moment.
Two options would be to
1) add the reverse mapping from real address to possible aliases in the registry, but I don't think that is feasible (there could be several aliases pointing to the real address).
2) Use an OperationContext attachment and set that in the prepare step (or alias) handler, containing the alias so that interested handlers such as the r-r-d handler can get it from the OperationContext.
As you can probably guess my favourite is 2), but I would need to investigate further what happens in domain mode.
> Resource alias operation inconsistencies
> ----------------------------------------
>
> Key: WFCORE-873
> URL: https://issues.jboss.org/browse/WFCORE-873
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: Heiko Braun
> Assignee: Kabir Khan
> Priority: Critical
> Fix For: 2.0.0.Beta3
>
>
> Formlery we could request the ../eviction=EVICTION resource. I assume that with the resource name change a transformer kicks that redirects the request to the ../component" => "eviction resource. The response header however contains the wrong address, which prevents clients to correlate the request with the response.
> *In HAL this breaks the access control mechanism.*
> {noformat}
> [domain at localhost:9990 /] /profile=full/subsystem=infinispan/cache-container=*/invalidation-cache=*/eviction=EVICTION:read-resource-description
> {
> "outcome" => "success",
> "result" => [{
> "address" => [
> ("profile" => "full"),
> ("subsystem" => "infinispan"),
> ("cache-container" => "*"),
> ("invalidation-cache" => "*"),
> ("component" => "eviction")
> ],
> "outcome" => "success",
> [...]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list