| | |
| | | import java.io.FileWriter; |
| | | import java.util.ArrayList; |
| | | |
| | | import org.testng.annotations.AfterClass; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | |
| | | import org.opends.server.types.OperatingSystem; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import org.opends.server.tools.dsconfig.DSConfig; |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | { |
| | | TestCaseUtils.startServer(); |
| | | |
| | | |
| | | TestCaseUtils.dsconfig( |
| | | "set-sasl-mechanism-handler-prop", |
| | | "--handler-name", "DIGEST-MD5", |
| | | "--set", "server-fqdn:" + "127.0.0.1"); |
| | | |
| | | File pwFile = File.createTempFile("valid-bind-password-", ".txt"); |
| | | pwFile.deleteOnExit(); |
| | | FileWriter fileWriter = new FileWriter(pwFile); |
| | |
| | | invalidPasswordFile = pwFile.getAbsolutePath(); |
| | | } |
| | | |
| | | @AfterClass |
| | | public void tearDown() throws Exception { |
| | | |
| | | TestCaseUtils.dsconfig( |
| | | "set-sasl-mechanism-handler-prop", |
| | | "--handler-name", "DIGEST-MD5", |
| | | "--remove", "server-fqdn:" + "127.0.0.1"); |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | "sn: User", |
| | | "cn: Test User", |
| | | "ds-privilege-name: bypass-acl", |
| | | "ds-privilege-name: proxied-auth", |
| | | "userPassword: password", |
| | | "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," + |
| | | "cn=Password Policies,cn=config"); |
| | |
| | | e.getOperationalAttributes()); |
| | | assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | |
| | | |
| | | String[] args = |
| | | { |
| | | "-h", "127.0.0.1", |
| | |
| | | "-o", "mech=DIGEST-MD5", |
| | | "-o", "authid=u:test.user", |
| | | "-o", "authzid=u:test.user", |
| | | "-o", "realm=o=test", |
| | | "-w", "password", |
| | | "--noPropertiesFile", |
| | | "givenName:Test", |