[
https://issues.apache.org/jira/browse/OOZIE-1782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Purshotam Shah updated OOZIE-1782:
----------------------------------
Attachment: OOZIE-1782-V2.patch
Removing trailing spaces
> Workflow path not found is thrown as SC_UNAUTHORIZED
> ----------------------------------------------------
>
> Key: OOZIE-1782
> URL: https://issues.apache.org/jira/browse/OOZIE-1782
> Project: Oozie
> Issue Type: Bug
> Reporter: Purshotam Shah
> Assignee: Purshotam Shah
> Attachments: OOZIE-1782-V1.patch, OOZIE-1782-V2.patch
>
>
> {code:java}
> AuthorizationService.java
> ....
> Path path = new Path(appPath);
> try {
> if (!fs.exists(path)) {
> incrCounter(INSTR_FAILED_AUTH_COUNTER, 1);
> throw new AuthorizationException(ErrorCode.E0504, appPath);
> }
> BaseJobServlet.java
> ......
> if (wfPath != null) {
> auth.authorizeForApp(user, acl, wfPath, "workflow.xml", conf);
> }
> else if (coordPath != null){
> auth.authorizeForApp(user, acl, coordPath, "coordinator.xml",
> conf);
> }
> else if (bundlePath != null){
> auth.authorizeForApp(user, acl, bundlePath, "bundle.xml",
> conf);
> }
> }
> catch (AuthorizationException ex) {
> XLog.getLog(BaseJobServlet.class).info("AuthorizationException ",
> ex);
> throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED,
> ex);
> }
> {code}
> Path not found should be a SC_BAD_REQUEST not SC_UNAUTHORIZED.
--
This message was sent by Atlassian JIRA
(v6.2#6252)