Skip to content

Commit

Permalink
Add kerberos auth to TestKit backend (#997) (#1050)
Browse files Browse the repository at this point in the history
* Add kerberos auth to TestKit backend

* Turns out kerberos expects ticket instead of credentials

* Add Feature:Auth:Kerberos Testkit feature support

Co-authored-by: Dmitriy Tverdiakov <dmitriy.tverdiakov@neo4j.com>

Co-authored-by: Robsdedude <rouven.bauer@neo4j.com>
  • Loading branch information
injectives and robsdedude authored Oct 28, 2021
1 parent f45e2be commit e5baa2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public class GetFeatures implements TestkitRequest
"AuthorizationExpiredTreatment",
"ConfHint:connection.recv_timeout_seconds",
"Temporary:DriverFetchSize",
"Temporary:DriverMaxTxRetryTime"
"Temporary:DriverMaxTxRetryTime",
"Feature:Auth:Kerberos"
) );

private static final Set<String> SYNC_FEATURES = new HashSet<>( Arrays.asList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@ public TestkitResponse process( TestkitState testkitState )
data.authorizationToken.getTokens().get( "credentials" ),
data.authorizationToken.getTokens().get( "realm" ) );
break;
case "kerberos":
authToken = AuthTokens.kerberos( data.authorizationToken.getTokens().get( "credentials" ) );
break;
default:
return BackendError.builder()
.data( BackendError
.BackendErrorBody.builder()
.msg( "Auth scheme " + data.authorizationToken.getTokens().get( "scheme" ) +
"not implemented" )
" not implemented" )
.build() )
.build();
}
Expand Down

0 comments on commit e5baa2b

Please sign in to comment.