Skip to content

Commit

Permalink
Extended provisioning tests and conntests (LDAP configuration display…
Browse files Browse the repository at this point in the history
… names, passwords)
  • Loading branch information
semancik committed Aug 4, 2015
1 parent 919879f commit e7a353e
Show file tree
Hide file tree
Showing 19 changed files with 176 additions and 17 deletions.
Expand Up @@ -46,6 +46,7 @@
import org.opends.messages.MessageBuilder;
import org.opends.server.config.ConfigException;
import org.opends.server.core.AddOperation;
import org.opends.server.core.BindOperation;
import org.opends.server.core.ModifyDNOperation;
import org.opends.server.core.ModifyOperation;
import org.opends.server.protocols.internal.InternalClientConnection;
Expand Down Expand Up @@ -811,5 +812,22 @@ public ChangeRecordEntry addGroupUniqueMembers(String groupDn, List<String> memb
}
return executeLdifChange(sb.toString());
}

public boolean checkPassword(String entryDn, String password) throws DirectoryException {
InternalClientConnection conn = new InternalClientConnection(DN.decode(entryDn));
BindOperation op = conn.processSimpleBind(entryDn, password);
if (op.getResultCode() == ResultCode.SUCCESS) {
return true;
} else {
LOGGER.error("Bind error: {} ({})", op.getAuthFailureReason(), op.getResultCode());
return false;
}
}

public void assertPassword(String entryDn, String password) throws DirectoryException {
if (!checkPassword(entryDn, password)) {
AssertJUnit.fail("Expected that entry "+entryDn+" will have password '"+password+"'. But the check failed.");
}
}

}
Expand Up @@ -58,6 +58,7 @@ description: Special LDAP acccount used by the IDM
ou: Administrators
userPassword: secret
ds-privilege-name: unindexed-search
ds-privilege-name: password-reset

dn: uid=u00000000,ou=people,dc=example,dc=com
objectClass: top
Expand Down
Binary file not shown.
Expand Up @@ -23,3 +23,4 @@ time,envcfg:com.sleepycat.je.util.ConsoleHandler.level,envcfg:com.sleepycat.je.u
2015-03-17 15:38:54.981 UTC,"OFF","ALL","0","500000000","3","true","30000000","true","false","0","5","20","5","1000","10","false","false","3","2","true","false","","false","false","500 ms","2097152","0","2","5","5","50","0","5","10","true","24","true","0","3","500 ms","5 s","false","0","1 ms","0","true","false","100","true","10 seconds","true","false","false","true","false","true","true","true","false","false","true","true","true","true","true","5 min","10 s","true","1","0","3","524288","10","false","600000000","false","10","10","10","95","5 s","false","97","false","0 MICROSECONDS","1048576","true","0","false","4096","100","100000000","500 ms","0 ns","0","16777216","2097152","false","0","3","0","false","false","true","false","1048576","0","50","128","128","false","true","1 min","","1440","10","25","16","10","512000","false","false","WRITE_NO_SYNC,NO_SYNC,SIMPLE_MAJORITY","false","0"," -Dorg.opends.server.scriptName=start-ds","1862270976","130813568","Oracle Corporation","1.7.0_75","5.0.104","amd64","4","Linux","3.16.0-30-generic"
2015-03-17 15:42:49.895 UTC,"OFF","ALL","0","500000000","3","true","30000000","true","false","0","5","20","5","1000","10","false","false","3","2","true","false","","false","false","500 ms","2097152","0","2","5","5","50","0","5","10","true","24","true","0","3","500 ms","5 s","false","0","1 ms","0","true","false","100","true","10 seconds","true","false","false","true","false","true","true","true","false","false","true","false","true","true","true","5 min","10 s","true","1","0","3","524288","10","false","600000000","false","2","10","10","95","5 s","false","97","false","0 MICROSECONDS","1048576","true","0","false","4096","100","100000000","500 ms","0 ns","0","16777216","2097152","false","0","3","0","false","false","true","false","1048576","5000000","1","128","128","false","true","1 min","","1440","10","25","16","10","512000","false","false","WRITE_NO_SYNC,NO_SYNC,SIMPLE_MAJORITY","false","0"," -Dorg.opends.server.scriptName=start-ds","1862270976","130813568","Oracle Corporation","1.7.0_75","5.0.104","amd64","4","Linux","3.16.0-30-generic"
2015-07-03 08:38:26.161 UTC,"OFF","ALL","0","500000000","3","true","30000000","true","false","0","5","20","5","1000","10","false","false","3","2","true","false","","false","false","500 ms","2097152","0","2","5","5","50","0","5","10","true","24","true","0","3","500 ms","5 s","false","0","1 ms","0","true","false","100","true","10 seconds","true","false","false","true","false","true","true","true","false","false","true","false","true","true","true","5 min","10 s","true","1","0","3","524288","10","false","600000000","false","2","10","10","95","5 s","false","97","false","0 MICROSECONDS","1048576","true","0","false","4096","100","100000000","500 ms","0 ns","0","16777216","2097152","false","0","3","0","false","false","true","false","1048576","5000000","1","128","128","false","true","1 min","","1440","10","25","16","10","512000","false","false","WRITE_NO_SYNC,NO_SYNC,SIMPLE_MAJORITY","false","0"," -Dorg.opends.server.scriptName=start-ds","1862270976","130813568","Oracle Corporation","1.7.0_79","5.0.104","amd64","4","Linux","3.16.0-30-generic"
2015-08-04 11:55:20.556 UTC,"OFF","ALL","0","500000000","3","true","30000000","true","false","0","5","20","5","1000","10","false","false","3","2","true","false","","false","false","500 ms","2097152","0","2","5","5","50","0","5","10","true","24","true","0","3","500 ms","5 s","false","0","1 ms","0","true","false","100","true","10 seconds","true","false","false","true","false","true","true","true","false","false","true","false","true","true","true","5 min","10 s","true","1","0","3","524288","10","false","600000000","false","2","10","10","95","5 s","false","97","false","0 MICROSECONDS","1048576","true","0","false","4096","100","100000000","500 ms","0 ns","0","16777216","2097152","false","0","3","0","false","false","true","false","1048576","5000000","1","128","128","false","true","1 min","","1440","10","25","16","10","512000","false","false","WRITE_NO_SYNC,NO_SYNC,SIMPLE_MAJORITY","false","0"," -javaagent:/usr/share/java/jayatanaag.jar -Dorg.opends.server.scriptName=start-ds","1860698112","130805760","Oracle Corporation","1.7.0_79","5.0.104","amd64","4","Linux","3.19.0-25-generic"

0 comments on commit e7a353e

Please sign in to comment.