code: @SuppressWarnings("unchecked")
      public static Subject getRunAsSubject()
                      throws WSSecurityException {
          SecurityManager sm = System.getSecurityManager();
          if (sm != null) {
              sm.checkPermission(GETRUNASSUBJECT_PERM);
          }
          Subject s = null;
  
          try {
              s = (Subject) java.security.AccessController.doPrivileged(getRunAsSubjectAction);
          } catch (PrivilegedActionException pae) {
              WSSecurityException e = (WSSecurityException) pae.getException();
              throw e;
          }
  
          return s;
      }
docs: <p>
  This method returns a Subject contains the principal of the J2EE run as identity
  and the J2EE run as credential. If there is no run as credential, a <code>null</code>
  is returned.
  </p>
  
  <p>
  If there is a run as credential in the current thread, it creates a new Subject
  that contains a <code>com.ibm.websphere.security.auth.WSPrincipal</code> and a
  <code>com.ibm.websphere.security.cred.WSCredential</code>.
  </p>
  
  <p>
  This method is protected by Java 2 Security. If Java 2 Security is enabled, then
  access will be denied if the application code is not granted the permission
  <code>javax.security.auth.AuthPermission("wssecurity.getRunAsSubject")</code>.
  </p>
  
  @return Subject contains the run as identity, <code>null</code> if there is no run as identity
  and if called by application client or thin client code.
  @exception WSSecurityException
  failed to get the run as identity
  @see com.ibm.websphere.security.auth.WSPrincipal
  @see com.ibm.websphere.security.cred.WSCredential