Skip to content

Commit

Permalink
Add kerberos auth to TestKit backend (#997)
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>
  • Loading branch information
robsdedude and injectives authored Oct 1, 2021
1 parent 7157b9b commit a5af8e1
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 @@ -40,7 +40,8 @@ public class GetFeatures implements TestkitRequest
"ConfHint:connection.recv_timeout_seconds",
"Temporary:DriverFetchSize",
"Temporary:DriverMaxTxRetryTime",
"Feature:Auth:Bearer"
"Feature:Auth:Bearer",
"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 @@ -78,12 +78,15 @@ public TestkitResponse process( TestkitState testkitState )
case "bearer":
authToken = AuthTokens.bearer( data.authorizationToken.getTokens().get( "credentials" ) );
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 a5af8e1

Please sign in to comment.