Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-12460

The loading cache is throwing UncheckedExecutionException, which results in the failure to catch UnAuthorizedException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.0
    • Component/s: Security
    • Labels:
    • Rank:
      1|i0072n:

      Description

      In https://github.com/caskdata/cdap/pull/9431,
      we change UnAuthorziedException to RuntimeException. In RemoteClient, we are also throwing it if the code is 403. This makes the remote enforcer cache no longer works for auth failure, since the cache will wrap the exception as a UnCheckedExecutionEception and throw it instead of caching the boolean result. Also, it fails for ensureOnePrivilege, since this method is trying to catch UnAuthorizedException.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yaojie Yaojie Feng
                Reporter:
                yaojie Yaojie Feng
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: