[ https://issues.apache.org/jira/browse/KNOX-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17730933#comment-17730933 ]
ASF subversion and git services commented on KNOX-2898: ------------------------------------------------------- Commit 1d65e691c3b0627924bf541ec9f9dcfc40c6dc0e in knox's branch refs/heads/master from Attila Magyar [ https://gitbox.apache.org/repos/asf?p=knox.git;h=1d65e691c ] KNOX-2898 - Reconsider the usage of sso.unauthenticated.path.list (#756) > Reconsider the usage of sso.unauthenticated.path.list > ----------------------------------------------------- > > Key: KNOX-2898 > URL: https://issues.apache.org/jira/browse/KNOX-2898 > Project: Apache Knox > Issue Type: Task > Reporter: Attila Magyar > Assignee: Attila Magyar > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > We have a property for URLs which are bypassed by the authentication. E.g.: > /favicon.ico can be accessed through knox without authentication. > <param> > <name>sso.unauthenticated.path.list</name> > <value>/favicon.ico;test;unsafepath</value> > </param> > This works and gives HTTP 200 with the content of the icon. > $ curl -kv https://localhost:8443/gateway/cdp-proxy/favicon.ico > However if a hadoop-jwt is specificed but it is invalid (either it's expired > or malformed) > $ curl --cookie "hadoop-jwt=invalid" -kv > https://c3235-node4.coelab.cloudera.com:8443/gateway/cdp-proxy/favicon.ico > Then the user is going to be redirected with the login page, because the > unauthenticated path list is only checked there are no sso cookies. > if (ssoCookies.isEmpty()) { // <= we're checking only ssoCookies is empty > /* check for unauthenticated paths to bypass */ > if (requestHasUnauthenticatedPath(request)) { > /* This path is configured as an unauthenticated path let the request > through */ > final Subject sub = new Subject(); > sub.getPrincipals().add(new PrimaryPrincipal("anonymous")); > LOGGER.unauthenticatedPathBypass(req.getRequestURI(), > unAuthenticatedPaths.toString()); > continueWithEstablishedSecurityContext(sub, req, res, chain); > } > We might need to move this check out do it regardless if there are sso > cookies or not. -- This message was sent by Atlassian Jira (v8.20.10#820010)