Package org.nasutekds.server.types

Examples of org.nasutekds.server.types.AuthenticationInfo



    // If we've gotten here, then the authentication was successful.
    bindOperation.setResultCode(ResultCode.SUCCESS);

    AuthenticationInfo authInfo =
         new AuthenticationInfo(userEntry, SASL_MECHANISM_CRAM_MD5,
                                clientCredentials,
                                DirectoryServer.isRootDN(userEntry.getDN()));
    bindOperation.setAuthenticationInfo(authInfo);
    return;
  }
View Full Code Here


      buffer.append('\"');
    }

    if (bindOperation.getResultCode() == ResultCode.SUCCESS)
    {
      AuthenticationInfo authInfo = bindOperation.getAuthenticationInfo();
      if (authInfo != null)
      {
        DN authDN = authInfo.getAuthenticationDN();
        if (authDN != null)
        {
          buffer.append(" authDN=\"");
          authDN.toString(buffer);
          buffer.append('\"');

          DN authzDN = authInfo.getAuthorizationDN();
          if (!authDN.equals(authzDN))
          {
            buffer.append(" authzDN=\"");
            if (authzDN != null)
            {
View Full Code Here

      Operation op)
  {
    boolean ret;
    if (!(ret = skipAccessCheck(proxyUser)))
    {
      AuthenticationInfo authInfo =
          new AuthenticationInfo(proxyUser, DirectoryServer
              .isRootDN(proxyUser.getDN()));
      AciLDAPOperationContainer operationContainer =
          new AciLDAPOperationContainer(op, proxiedUser, authInfo,
              ACI_PROXY);
      ret = accessAllowedEntry(operationContainer);
View Full Code Here

    }


    // Authenticate the client anonymously and indicate that the bind was
    // successful.
    AuthenticationInfo authInfo = new AuthenticationInfo();
    bindOperation.setAuthenticationInfo(authInfo);
    bindOperation.setResultCode(ResultCode.SUCCESS);
  }
View Full Code Here

    this.isSecure = isSecure;

    switch (authMethod)
    {
    case ANONYMOUS:
      this.authInfo = new AuthenticationInfo();
      break;
    case SIMPLE:
      Entry simpleUser = DirectoryServer.getEntry(bindDN);
      ByteString password = ByteString.valueOf("password");
      this.authInfo =
          new AuthenticationInfo(simpleUser, bindDN, password, true);
      break;
    default: // SASL
      Entry saslUser = DirectoryServer.getEntry(bindDN);
      this.authInfo =
          new AuthenticationInfo(saslUser, "external",
              ByteString.valueOf(bindDN.toNormalizedString()), true);
      break;
    }
  }
View Full Code Here

    // Use simple bind on this connection
    Entry userEntry = DirectoryServer.getEntry(
            DN.decode("cn=Directory Manager, cn=Root DNs, cn=config"));
    ByteString password = ByteString.valueOf("password");
    ClientConnection connection2 = new InternalClientConnection(
          new AuthenticationInfo(userEntry, userEntry.getDN(), password, true));
    ng = NetworkGroup.findMatchingNetworkGroup(connection2);
    assertEquals(ng, networkGroup2);

    // Use SASL on this connection
    ClientConnection connection3 = new InternalClientConnection(
            new AuthenticationInfo(userEntry, "external", ByteString.valueOf(
                "cn=Directory Manager, cn=Root DNs, cn=config"), true));
    ng = NetworkGroup.findMatchingNetworkGroup(connection3);
    assertEquals(ng, networkGroup3);

    // Clean the network group
View Full Code Here

    // Use simple bind on this connection
    Entry userEntry = DirectoryServer.getEntry(
            DN.decode("cn=Directory Manager, cn=Root DNs, cn=config"));
    ByteString password = ByteString.valueOf("password");
    ClientConnection connection2 = new InternalClientConnection(
          new AuthenticationInfo(userEntry, userEntry.getDN(), password, true));
    ng = NetworkGroup.findMatchingNetworkGroup(connection2);
    if (match) {
      assertEquals(ng, networkGroup);
    } else {
      assertEquals(ng, defaultNg);
    }

    // Use SASL on this connection
    ClientConnection connection3 = new InternalClientConnection(
            new AuthenticationInfo(userEntry, "external", ByteString.valueOf(
                "cn=Directory Manager, cn=Root DNs, cn=config"), true));
    ng = NetworkGroup.findMatchingNetworkGroup(connection3);
    if (match) {
      assertEquals(ng, networkGroup);
    } else {
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public boolean matches(ClientConnection connection)
  {
    AuthenticationInfo authInfo = connection.getAuthenticationInfo();

    for (AllowedAuthMethod method : authMethods)
    {
      switch (method)
      {
      case ANONYMOUS:
        if (!authInfo.isAuthenticated())
        {
          return true;
        }
        break;
      case SIMPLE:
        if (authInfo.hasAuthenticationType(AuthenticationType.SIMPLE))
        {
          return true;
        }
        break;
      case SASL:
        if (authInfo.hasAuthenticationType(AuthenticationType.SASL))
        {
          return true;
        }
        break;
      }
View Full Code Here

   */
  protected ClientConnection()
  {
    connectTime        = TimeThread.getTime();
    connectTimeString  = TimeThread.getGMTTime();
    authenticationInfo = new AuthenticationInfo();
    saslAuthState      = null;
    saslBindInProgress = new AtomicBoolean(false);
    bindOrStartTLSInProgress = new AtomicBoolean(false);
    persistentSearches = new CopyOnWriteArrayList<PersistentSearch>();
    sizeLimit          = DirectoryServer.getSizeLimit();
View Full Code Here

   */
  public final void setMustChangePassword(boolean mustChangePassword)
  {
    if (authenticationInfo == null)
    {
      setAuthenticationInfo(new AuthenticationInfo());
    }

    authenticationInfo.setMustChangePassword(mustChangePassword);
  }
View Full Code Here

TOP

Related Classes of org.nasutekds.server.types.AuthenticationInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.