[jira] [Commented] (DELTASPIKE-449) ExceptionHandler not invoked for AccessDeniedException

2014-06-11 Thread Rafael Benevides (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14027822#comment-14027822
 ] 

Rafael Benevides commented on DELTASPIKE-449:
-

Why this ticket was closed? Shouldn't we allow ExceptionHandler to catch 
AccessDeniedException ?

 ExceptionHandler not invoked for AccessDeniedException
 --

 Key: DELTASPIKE-449
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-449
 Project: DeltaSpike
  Issue Type: New Feature
  Components: Security-Module
Affects Versions: 0.5
 Environment: Glassfish 4 / Weld 2.0.4
Reporter: John Schneider
Assignee: Gerhard Petracek
 Fix For: 0.7

 Attachments: DELTASPIKE-449.patch


 When an 
 org.apache.deltaspike.security.api.authorization.AccessDeniedException is 
 thrown, a valid ExceptionHandler method is not invoked.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-449) ExceptionHandler not invoked for AccessDeniedException

2014-06-11 Thread JIRA

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14028135#comment-14028135
 ] 

Rainer Schön commented on DELTASPIKE-449:
-

Hi Rafa

This issue is closed because it is fixed (DS 0.7). What makes you think, it is 
not?

Regards
Rainer



 ExceptionHandler not invoked for AccessDeniedException
 --

 Key: DELTASPIKE-449
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-449
 Project: DeltaSpike
  Issue Type: New Feature
  Components: Security-Module
Affects Versions: 0.5
 Environment: Glassfish 4 / Weld 2.0.4
Reporter: John Schneider
Assignee: Gerhard Petracek
 Fix For: 0.7

 Attachments: DELTASPIKE-449.patch


 When an 
 org.apache.deltaspike.security.api.authorization.AccessDeniedException is 
 thrown, a valid ExceptionHandler method is not invoked.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-449) ExceptionHandler not invoked for AccessDeniedException

2014-06-11 Thread Rafael Benevides (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14028138#comment-14028138
 ] 

Rafael Benevides commented on DELTASPIKE-449:
-

I didn't saw the attached patch applied. DELTASPIKE-636 was opened to threat 
another case.

Thanks [~exquisitus]

 ExceptionHandler not invoked for AccessDeniedException
 --

 Key: DELTASPIKE-449
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-449
 Project: DeltaSpike
  Issue Type: New Feature
  Components: Security-Module
Affects Versions: 0.5
 Environment: Glassfish 4 / Weld 2.0.4
Reporter: John Schneider
Assignee: Gerhard Petracek
 Fix For: 0.7

 Attachments: DELTASPIKE-449.patch


 When an 
 org.apache.deltaspike.security.api.authorization.AccessDeniedException is 
 thrown, a valid ExceptionHandler method is not invoked.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-449) ExceptionHandler not invoked for AccessDeniedException

2013-12-06 Thread JIRA

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841300#comment-13841300
 ] 

Rainer Schön commented on DELTASPIKE-449:
-

I came across the same issue. In my opinion, it could be solved by providing an 
additional security interceptor, say ExceptionHandlingAwareSecurityInterceptor. 
This interceptor catches the AccessDenied exception and fires a 
ExceptionToCatchEven instead:
{quote}
@Dependent  // important, otherwise it gets not installed in CDI 1.1 when 
bean-discovery-mode=annotated, alternatively you must set all
@SecurityInterceptorBinding
@Interceptor
public class ExceptionHandlingAwareSecurityInterceptor implements Serializable
{
private static final long serialVersionUID = 1L;

@Inject
private SecurityStrategy securityStrategy;
{color:red}
@Inject
private EventExceptionToCatchEvent exEvt;
   {color}

@AroundInvoke
public Object filterDeniedInvocations(InvocationContext invocationContext) 
throws Exception
{

Object retval = null;
  
try {
retval = securityStrategy.execute(invocationContext);

}  catch (AccessDeniedException e) {

  {color:red}exEvt.fire(new ExceptionToCatchEvent(e));{color}   

}
 
return retval; 
}
}
{quote}

I implemented the idea above in my test environment (same package names as the 
original interceptor of course) and it works as expected.

 ExceptionHandler not invoked for AccessDeniedException
 --

 Key: DELTASPIKE-449
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-449
 Project: DeltaSpike
  Issue Type: New Feature
  Components: Security-Module
Affects Versions: 0.5
 Environment: Glassfish 4 / Weld 2.0.4
Reporter: John Schneider
Assignee: Jason Porter

 When an 
 org.apache.deltaspike.security.api.authorization.AccessDeniedException is 
 thrown, a valid ExceptionHandler method is not invoked.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (DELTASPIKE-449) ExceptionHandler not invoked for AccessDeniedException

2013-12-06 Thread Jason Porter (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841317#comment-13841317
 ] 

Jason Porter commented on DELTASPIKE-449:
-

Rainer: This is great! Would you be okay contributing this up to DeltaSpike? Do 
you have a CLA on file with Apache?

 ExceptionHandler not invoked for AccessDeniedException
 --

 Key: DELTASPIKE-449
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-449
 Project: DeltaSpike
  Issue Type: New Feature
  Components: Security-Module
Affects Versions: 0.5
 Environment: Glassfish 4 / Weld 2.0.4
Reporter: John Schneider
Assignee: Jason Porter

 When an 
 org.apache.deltaspike.security.api.authorization.AccessDeniedException is 
 thrown, a valid ExceptionHandler method is not invoked.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (DELTASPIKE-449) ExceptionHandler not invoked for AccessDeniedException

2013-11-23 Thread John Schneider (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13830818#comment-13830818
 ] 

John Schneider commented on DELTASPIKE-449:
---

The following is not invoked when an AccessDeniedException occurs:
@ExceptionHandler
public class ExceptionHandlers {

  public void handleAccessDeniedException(@Handles 
ExceptionEventAccessDeniedException event) {
System.out.println(handleAccessDeniedException invoked);
  }
}

However, if I explicitly fire a ExceptionToCatchEvent wrapping an 
AccessDeniedException, then it is invoked.  I think DeltaSpike should fire an 
ExceptionToCatchEvent by default whenever an AccessDeniedException occurs.

 ExceptionHandler not invoked for AccessDeniedException
 --

 Key: DELTASPIKE-449
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-449
 Project: DeltaSpike
  Issue Type: Bug
  Components: Security-Module
Affects Versions: 0.5
 Environment: Glassfish 4 / Weld 2.0.4
Reporter: John Schneider

 When an 
 org.apache.deltaspike.security.api.authorization.AccessDeniedException is 
 thrown, a valid ExceptionHandler method is not invoked.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (DELTASPIKE-449) ExceptionHandler not invoked for AccessDeniedException

2013-11-23 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13830827#comment-13830827
 ] 

John D. Ament commented on DELTASPIKE-449:
--

Great idea.  Would be a cool feature for the security module had exception 
handling integration enabled.  Interested in sending a pull request?

 ExceptionHandler not invoked for AccessDeniedException
 --

 Key: DELTASPIKE-449
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-449
 Project: DeltaSpike
  Issue Type: New Feature
  Components: Security-Module
Affects Versions: 0.5
 Environment: Glassfish 4 / Weld 2.0.4
Reporter: John Schneider

 When an 
 org.apache.deltaspike.security.api.authorization.AccessDeniedException is 
 thrown, a valid ExceptionHandler method is not invoked.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (DELTASPIKE-449) ExceptionHandler not invoked for AccessDeniedException

2013-11-23 Thread John Schneider (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13830831#comment-13830831
 ] 

John Schneider commented on DELTASPIKE-449:
---

I am interested, but I really have my hands full right now trying to make a 
deadline.  Also, I'm new to DeltaSpike, having just started to port a very 
complex application from Seam 3.1, so I'm really not familiar with the 
DeltaSpike code yet.

 ExceptionHandler not invoked for AccessDeniedException
 --

 Key: DELTASPIKE-449
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-449
 Project: DeltaSpike
  Issue Type: New Feature
  Components: Security-Module
Affects Versions: 0.5
 Environment: Glassfish 4 / Weld 2.0.4
Reporter: John Schneider

 When an 
 org.apache.deltaspike.security.api.authorization.AccessDeniedException is 
 thrown, a valid ExceptionHandler method is not invoked.



--
This message was sent by Atlassian JIRA
(v6.1#6144)