History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRA-10638
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Jed Wesley-Smith [Atlassian]
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JIRA

Clean up Permission Violation error reporting for all issue operations

Created: 19/Jul/06 02:01 AM   Updated: 12/Feb/08 02:53 AM
Component/s: Permissions Security
Affects Version/s: 3.6.3
Fix Version/s: None

Time Tracking:
Original Estimate: 2 days
Original Estimate - 2 days
Remaining Estimate: 2 days
Remaining Estimate - 2 days
Time Spent: Not Specified
Remaining Estimate - 2 days

File Attachments: 1. Java Source File AbstractIssueSelectAction.java (12 kb)

Issue Links:
Duplicate
 
Reference

Participants: Jed Wesley-Smith [Atlassian] and Scott Farquhar [Atlassian]
Since last comment: 92 weeks ago
Labels:


 Description  « Hide
JRA-10205 was reported regarding the displaying of issue summary, reported and assignee, type and status on certain issue operations when not logged in. For 3.6.3 the solutions was to simply throw an IssuePermissionException when the user doesn't have Browse Issue permission for that issue. Please see that issue for a description of how it was done and what files were touched.

However, it was noted that there were at least four different ways the Issue actions might report this to the user.

  1. Custom handling in the operation view. Creates a very nice error page with the operation, and friendly error message - http://server/jira/secure/AddComment!default.jspa?id=12345
  2. "You are not logged in" message with standard Jira banner, user gets redirected to permission-violation page (permissionviolation.jsp), not so friendly, but the user gets the point - http://server/jira/secure/ViewIssue.jspa?id=12345 (note, this page has trackback info)
  3. "Access Denied" message with big red background, user gets redirected to security-breach page (securitybreach.jsp) with standard Jira banner, not so friendly big red message, user still gets the point - http://server/jira/secure/attachment/12345/logs_jira-int_11_03_2005.txt or the ViewVoters or ManageWatchers urls (no trackback info).
  4. 500 page catches IssuePermissionException, very, very unfriendly message, lots of nasty logging.
{note}all the Admin pages use the securitybreach.jsp{note}

These need to be standardised so all access denied reports are the same, and it is not possible to view any secure information if you do not have that permission.

While researching JRA-10205 the following was noted:

  • IssuePermissionException is handled inconsistently. We need to either throw it from our Action.doValidate(), Action.doExecute() & Action.doDefault() methods or handle it in a consistent manner.
  • We probably should handle the standard case in the framework. AbstractIssueSelectAction holds the issueObject, and should be able to handle 99% of the code paths. Attached is a version that does the 99% (doesn't handle the trackback case)
  • We could further generify the issue handling of Actions by having them implement some kind of IssueAware interface and have an interceptor of the filter stack read the request parameters and insert the Issue into the action. This could also have a PermissionException injector method as well if the user cannot see an issue. (Please ask Scott for further information, as this is his idea).
  • The trackback info is the wrinkle edge-case, we do actually have to provide some issue info in the trackback rdf if enabled.

Final caveat: The permission error page actually DOES HAVE TO HAVE the issue summary in it (if incoming trackbacks are turned on) in the trackback RDF. This currently works if the permissionviolation.jsp is the result (which it is for ViewIssue). We probably need to have a separate TrackbackIssueInfo object that the Issue can give us that is filtered through a trackback policy filter. Then we can have a trackback policy for enabling/disabling trackbacks based on their security (for instance allow trackbacks for public issues only, rinse issue summary from non public issues etc.)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jed Wesley-Smith [Atlassian] - 23/Jul/06 09:47 PM
Please see JRA-6140 for another take on this...

Scott Farquhar [Atlassian] - 15/Oct/06 06:57 AM
I believe that our new way of handling this should fix these problems (I think).

All 'view issue' actions must implement com.atlassian.jira.web.action.issue.IssueSummaryAware and this is used in issuesummary.jsp.

I believe now that all access violations are now handled in issuesummary.jsp. That at least centralises it.

We still need to:

  • search for all usages of 'permissionviolation' and see if they are still needed.
  • check that what we are doing in issuesummary.jsp is correct.
  • check that we still display the trackback information correctly (which I think may have been missed)

Scott Farquhar [Atlassian] - 19/Oct/06 05:51 PM
Sam,

Can you check all the linked issues regarding this? It would be good to get it finally fixed.