docs: private final Subject getFinalSubject(ConnectionRequestInfo requestInfo,
                                            final ManagedConnectionFactory mangedConnectionFactory, Object CM) throws ResourceException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          Subject subj = null;
          if (this.containerManagedAuth) {
              final Map<String, Object> loginConfigProps = (Map<String, Object>) this.cmConfig.getLoginConfigProperties().clone();
              String name = this.cmConfig.getLoginConfigurationName();
              final String loginConfigurationName = name == null ? connectionFactorySvc.getJaasLoginContextEntryName() : name;
  
              String authDataID = (String) loginConfigProps.get("DefaultPrincipalMapping");
  
              // If no authentication-alias is found in the bindings, then use the default container managed auth alias (if any)
              if (authDataID == null)
                  authDataID = connectionFactorySvc.getContainerAuthDataID();
  
              if (isTraceOn && tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "login configuration name", loginConfigurationName);
                  Tr.debug(this, tc, "container managed auth", authDataID);
              }
  
              if (authDataID != null || loginConfigurationName != null) {
                  loginConfigProps.put("com.ibm.mapping.authDataAlias", authDataID);
                  final AuthDataService authSvc = _pm.connectorSvc.authDataServiceRef.getServiceWithException();
                  try {
                      subj = AccessController.doPrivileged(new PrivilegedExceptionAction<Subject>() {
                          @Override
                          public Subject run() throws LoginException {
                              return authSvc.getSubject(mangedConnectionFactory, loginConfigurationName, loginConfigProps);
                          }
                      });
                  } catch (PrivilegedActionException e) {
                      FFDCFilter.processException(e.getCause(), getClass().getName(), "3070", this, new Object[] { this });
                      ResourceException r = new ResourceException(e.getCause());
                      throw r;
                  }
              }
  
              subj = this.securityHelper.finalizeSubject(subj, requestInfo, this.cmConfig);
          } else {
              if (isTraceOn && tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "Subject is", subj);
              }
          }
          return subj;
      }