code: public static void clearSecurityContext() {
          AccessController.doPrivileged(new PrivilegedAction<Void>() {
              public Void run() {
                  SecurityContextAssociation.clearSecurityContext();
                  return null;
              }
          });
      }
docs: Clears current {@code SecurityContext}