code: private void throwAuthzException() throws SecurityException {
          SubjectManager subjectManager = new SubjectManager();
          String name = "UNAUTHENTICATED";
          if (subjectManager.getInvocationSubject() != null) {
              name = subjectManager.getInvocationSubject().getPrincipals().iterator().next().getName();
          }
          Tr.audit(tc, "MANAGEMENT_SECURITY_AUTHZ_FAILED", name, "MBeanAccess", requiredRoles);
          String message = Tr.formatMessage(tc, "MANAGEMENT_SECURITY_AUTHZ_FAILED", name, "MBeanAccess", requiredRoles);
          throw new SecurityException(message);
      }
docs: Throwing a SecurityException as not all of the methods that need
  protection throw an MBeanException. We can change this if we need to.
  
  @throws SecurityException