Skip to content

Commit 0f47d2d

Browse files
committed
feat: removed ip address in client principal
1 parent 30f3c49 commit 0f47d2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fluss-common/src/test/java/org/apache/fluss/security/auth/sasl/gssapi/GssapiSaslAuthTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void setup() throws Exception {
6262
File krb5Conf = kdc.getKrb5Conf();
6363

6464
// Generate principals for both server ('fluss') and client ('client') bound to 127.0.0.1.
65-
kdc.createPrincipal(keytab, "fluss/127.0.0.1", "client/127.0.0.1");
65+
kdc.createPrincipal(keytab, "fluss/127.0.0.1", "client");
6666

6767
// Overwrite the default krb5.conf if it exists. MiniKdc defaults to "localhost",
6868
// but we enforce "127.0.0.1" and TCP (udp_preference_limit=1) to ensure stable connections.
@@ -112,7 +112,7 @@ void teardown() {
112112
void testGssapiAuthentication() throws Exception {
113113
String realm = kdc.getRealm();
114114
String serverPrincipal = String.format("fluss/127.0.0.1@%s", realm);
115-
String clientPrincipal = String.format("client/127.0.0.1@%s", realm);
115+
String clientPrincipal = String.format("client@%s", realm);
116116

117117
Configuration serverConf = new Configuration();
118118
serverConf.setString(SERVER_SASL_ENABLED_MECHANISMS_CONFIG.key(), "GSSAPI");
@@ -179,7 +179,7 @@ public String protocol() {
179179
assertThat(clientAuth.isCompleted()).as("Client should be fully authenticated").isTrue();
180180
assertThat(serverAuth.createPrincipal().getName())
181181
.as("Authenticated principal name should match the client's identity")
182-
.startsWith("client/127.0.0.1");
182+
.startsWith("client");
183183

184184
serverAuth.close();
185185
clientAuth.close();

0 commit comments

Comments
 (0)