@@ -177,7 +177,7 @@ void testAuthenticateByPatternSinglePattern() throws Exception {
177177 /* ldapUserDN */ null ,
178178 "uid=${USER},ou=People,dc=test,dc=com" );
179179
180- AccessControlContext authCtx = new AccessControlContext ();
180+ ConnectContext authCtx = new ConnectContext ();
181181 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
182182 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
183183
@@ -196,7 +196,7 @@ void testUPNPatternIsRejected() {
196196 /* ldapUserDN */ null ,
197197 "${USER}@abc.com" );
198198
199- AccessControlContext authCtx = new AccessControlContext ();
199+ ConnectContext authCtx = new ConnectContext ();
200200 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
201201 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
202202
@@ -217,7 +217,7 @@ void testDNPatternWithAtSignInUid() throws Exception {
217217 /* ldapUserDN */ null ,
218218 "uid=${USER}@abc.com,ou=People,dc=test,dc=com" );
219219
220- AccessControlContext authCtx = new AccessControlContext ();
220+ ConnectContext authCtx = new ConnectContext ();
221221 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
222222 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
223223
@@ -235,7 +235,7 @@ void testPerUserDNTakesPriorityOverPattern() throws Exception {
235235 perUserDN ,
236236 "uid=${USER},ou=People,dc=test,dc=com" );
237237
238- AccessControlContext authCtx = new AccessControlContext ();
238+ ConnectContext authCtx = new ConnectContext ();
239239 UserIdentity user = UserIdentity .createEphemeralUserIdent ("bob" , "%" );
240240 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
241241
@@ -252,7 +252,7 @@ void testPatternTakesPriorityOverSearch() throws Exception {
252252 /* ldapUserDN */ null ,
253253 "cn=${USER},dc=pattern,dc=com" );
254254
255- AccessControlContext authCtx = new AccessControlContext ();
255+ ConnectContext authCtx = new ConnectContext ();
256256 UserIdentity user = UserIdentity .createEphemeralUserIdent ("charlie" , "%" );
257257 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
258258
@@ -270,7 +270,7 @@ void testPatternEscapesDnSpecialCharacters() throws Exception {
270270 "uid=${USER},dc=test,dc=com" );
271271
272272 // DN special characters: , + " < > ; \ should be escaped (RFC 4514)
273- AccessControlContext authCtx = new AccessControlContext ();
273+ ConnectContext authCtx = new ConnectContext ();
274274 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice,+\" <>;\\ bob" , "%" );
275275 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
276276
@@ -289,14 +289,14 @@ void testPatternEscapesLeadingSpaceAndHash() throws Exception {
289289 "uid=${USER},dc=test,dc=com" );
290290
291291 // Leading space
292- AccessControlContext authCtx1 = new AccessControlContext ();
292+ ConnectContext authCtx1 = new ConnectContext ();
293293 UserIdentity user1 = UserIdentity .createEphemeralUserIdent (" alice" , "%" );
294294 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
295295 provider .authenticate (authCtx1 , user1 , authResponse );
296296 Assertions .assertEquals ("uid=\\ alice,dc=test,dc=com" , authCtx1 .getDistinguishedName ());
297297
298298 // Leading #
299- AccessControlContext authCtx2 = new AccessControlContext ();
299+ ConnectContext authCtx2 = new ConnectContext ();
300300 UserIdentity user2 = UserIdentity .createEphemeralUserIdent ("#alice" , "%" );
301301 provider .authenticate (authCtx2 , user2 , authResponse );
302302 Assertions .assertEquals ("uid=\\ #alice,dc=test,dc=com" , authCtx2 .getDistinguishedName ());
@@ -312,7 +312,7 @@ void testPatternFilterCharsNotEscapedInDn() throws Exception {
312312 "uid=${USER},dc=test,dc=com" );
313313
314314 // Filter special characters * ( ) | are NOT special in DN values
315- AccessControlContext authCtx = new AccessControlContext ();
315+ ConnectContext authCtx = new ConnectContext ();
316316 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice*()|" , "%" );
317317 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
318318
@@ -329,7 +329,7 @@ void testEmptyPatternFallsBackToSearch() throws Exception {
329329 "ou=People,dc=starrocks,dc=com" , "uid" ,
330330 /* ldapUserDN */ null , /* ldapBindDNPattern */ "" );
331331
332- AccessControlContext authCtx = new AccessControlContext ();
332+ ConnectContext authCtx = new ConnectContext ();
333333 UserIdentity user = UserIdentity .createEphemeralUserIdent ("ldap_user" , "%" );
334334 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
335335
@@ -355,7 +355,7 @@ protected void checkPassword(String dn, String password) throws Exception {
355355 /* ldapUserDN */ null ,
356356 "uid=${USER},ou=A,dc=test,dc=com;uid=${USER},ou=B,dc=test,dc=com" );
357357
358- AccessControlContext authCtx = new AccessControlContext ();
358+ ConnectContext authCtx = new ConnectContext ();
359359 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
360360 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
361361
@@ -391,7 +391,7 @@ protected void checkPassword(String dn, String password) throws Exception {
391391 /* ldapUserDN */ null ,
392392 "uid=${USER},ou=A,dc=test,dc=com;uid=${USER},ou=B,dc=test,dc=com" );
393393
394- AccessControlContext authCtx = new AccessControlContext ();
394+ ConnectContext authCtx = new ConnectContext ();
395395 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
396396 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
397397
@@ -421,7 +421,7 @@ void testPatternWithoutUserPlaceholderIsRejected() {
421421 /* ldapUserDN */ null ,
422422 "uid=shared_account,dc=test,dc=com" );
423423
424- AccessControlContext authCtx = new AccessControlContext ();
424+ ConnectContext authCtx = new ConnectContext ();
425425 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
426426 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
427427
@@ -440,7 +440,7 @@ void testMultiPatternWithOneSegmentMissingPlaceholder() {
440440 /* ldapUserDN */ null ,
441441 "uid=${USER},ou=A,dc=test,dc=com;uid=shared,dc=test,dc=com" );
442442
443- AccessControlContext authCtx = new AccessControlContext ();
443+ ConnectContext authCtx = new ConnectContext ();
444444 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
445445 byte [] authResponse = "password\0 " .getBytes (StandardCharsets .UTF_8 );
446446
@@ -501,7 +501,7 @@ void testGroupLookupByDN_SimplePattern() throws Exception {
501501 null , null , null , "uid" , null ,
502502 "uid=${USER},ou=People,dc=test,dc=com" );
503503
504- AccessControlContext authCtx = new AccessControlContext ();
504+ ConnectContext authCtx = new ConnectContext ();
505505 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
506506 provider .authenticate (authCtx , user , "password\0 " .getBytes (StandardCharsets .UTF_8 ));
507507
@@ -536,7 +536,7 @@ void testGroupLookupByDN_PatternWithAtSign() throws Exception {
536536 null , null , null , "uid" , null ,
537537 "uid=${USER}@abc.com,ou=People,dc=test,dc=com" );
538538
539- AccessControlContext authCtx = new AccessControlContext ();
539+ ConnectContext authCtx = new ConnectContext ();
540540 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
541541 provider .authenticate (authCtx , user , "password\0 " .getBytes (StandardCharsets .UTF_8 ));
542542
@@ -569,7 +569,7 @@ void testGroupLookupBySearchAttr_SimplePattern() throws Exception {
569569 null , null , null , "uid" , null ,
570570 "uid=${USER},ou=People,dc=test,dc=com" );
571571
572- AccessControlContext authCtx = new AccessControlContext ();
572+ ConnectContext authCtx = new ConnectContext ();
573573 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
574574 provider .authenticate (authCtx , user , "password\0 " .getBytes (StandardCharsets .UTF_8 ));
575575
@@ -604,7 +604,7 @@ void testGroupLookupBySearchAttr_WrongForAtSignPattern() throws Exception {
604604 null , null , null , "uid" , null ,
605605 "uid=${USER}@abc.com,ou=People,dc=test,dc=com" );
606606
607- AccessControlContext authCtx = new AccessControlContext ();
607+ ConnectContext authCtx = new ConnectContext ();
608608 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
609609 provider .authenticate (authCtx , user , "password\0 " .getBytes (StandardCharsets .UTF_8 ));
610610
@@ -638,7 +638,7 @@ void testGroupLookupBySearchAttr_CorrectRegexForAtSignPattern() throws Exception
638638 null , null , null , "uid" , null ,
639639 "uid=${USER}@abc.com,ou=People,dc=test,dc=com" );
640640
641- AccessControlContext authCtx = new AccessControlContext ();
641+ ConnectContext authCtx = new ConnectContext ();
642642 UserIdentity user = UserIdentity .createEphemeralUserIdent ("alice" , "%" );
643643 provider .authenticate (authCtx , user , "password\0 " .getBytes (StandardCharsets .UTF_8 ));
644644
0 commit comments