Skip to content

Commit d99758b

Browse files
committed
BE: RBAC: Support LDAPS for AD
fix sonar issues
1 parent 4b729e0 commit d99758b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

api/src/test/java/io/kafbat/ui/ActiveDirectoryLdapsTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
public class ActiveDirectoryLdapsTest extends AbstractActiveDirectoryIntegrationTest {
3434
private static final ActiveDirectoryContainer ACTIVE_DIRECTORY = new ActiveDirectoryContainer(true);
3535

36-
private static File CERT_PEM = null;
37-
private static File PRIVATE_KEY_PEM = null;
36+
private static File certPem = null;
37+
private static File privateKeyPem = null;
3838

3939
@BeforeAll
4040
public static void setup() throws Exception {
4141
generateCerts();
4242

43-
ACTIVE_DIRECTORY.withCopyFileToContainer(forHostPath(CERT_PEM.getAbsolutePath()), CONTAINER_CERT_PATH);
44-
ACTIVE_DIRECTORY.withCopyFileToContainer(forHostPath(PRIVATE_KEY_PEM.getAbsolutePath()), CONTAINER_KEY_PATH);
43+
ACTIVE_DIRECTORY.withCopyFileToContainer(forHostPath(certPem.getAbsolutePath()), CONTAINER_CERT_PATH);
44+
ACTIVE_DIRECTORY.withCopyFileToContainer(forHostPath(privateKeyPem.getAbsolutePath()), CONTAINER_KEY_PATH);
4545

4646
ACTIVE_DIRECTORY.start();
4747
}
@@ -66,13 +66,13 @@ private static void generateCerts() throws Exception {
6666

6767
TestSslUtils.createTrustStore(truststore.getPath(), new Password(PASSWORD), Map.of("client", clientCert));
6868

69-
CERT_PEM = File.createTempFile("cert", ".pem");
70-
try (FileWriter fw = new FileWriter(CERT_PEM)) {
69+
certPem = File.createTempFile("cert", ".pem");
70+
try (FileWriter fw = new FileWriter(certPem)) {
7171
fw.write(certOrKeyToString(clientCert));
7272
}
7373

74-
PRIVATE_KEY_PEM = File.createTempFile("key", ".pem");
75-
try (FileWriter fw = new FileWriter(PRIVATE_KEY_PEM)) {
74+
privateKeyPem = File.createTempFile("key", ".pem");
75+
try (FileWriter fw = new FileWriter(privateKeyPem)) {
7676
fw.write(certOrKeyToString(clientKeyPair.getPrivate()));
7777
}
7878
}

0 commit comments

Comments
 (0)