Skip to content
Permalink
Browse files

[CONJ-378] client can provide SPN (GSSAPI) - correction when SPN is n…

…ot provided

(cherry picked from commit bfacb30)
  • Loading branch information...
rusher committed Jan 28, 2019
1 parent 2a78c5c commit 269c63788a728e43f24300b4005c8bac7fb609fe
@@ -99,9 +99,10 @@ public SendGssApiAuthPacket(byte[] authData, String servicePrincipalName) {
public Buffer process(PacketOutputStream out, PacketInputStream in, AtomicInteger sequence) throws IOException, SQLException {
Buffer buffer = new Buffer(authData);

final String serverSpn = buffer.readStringNullEnd(StandardCharsets.UTF_8);
//using provided connection string SPN if set, or if not, using to server information
final String servicePrincipalName = (optionServicePrincipalName != null && !optionServicePrincipalName.isEmpty())
? optionServicePrincipalName : buffer.readStringNullEnd(StandardCharsets.UTF_8);
? optionServicePrincipalName : serverSpn;
String mechanisms = buffer.readStringNullEnd(StandardCharsets.UTF_8);
if (mechanisms.isEmpty()) {
mechanisms = "Kerberos";

0 comments on commit 269c637

Please sign in to comment.
You can’t perform that action at this time.