-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrates the java client authentication to Flight Auth v2 (#3423)
There are also plumbing improvements that allow constructing sessions with specific authentication values, and the sharing of authenticated channels without extraneous duplication of logic. Fixes #3285
- Loading branch information
1 parent
3c71320
commit 203fc12
Showing
41 changed files
with
864 additions
and
524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...t/example-utilities/src/main/java/io/deephaven/client/examples/AuthenticationOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package io.deephaven.client.examples; | ||
|
||
import picocli.CommandLine.Option; | ||
|
||
import java.util.function.Consumer; | ||
|
||
public class AuthenticationOptions { | ||
@Option(names = {"--mtls"}, description = "Use the connect mTLS") | ||
Boolean mtls; | ||
|
||
@Option(names = {"--psk"}, description = "The pre-shared key") | ||
String psk; | ||
|
||
@Option(names = {"--explicit"}, description = "The explicit authentication type and value") | ||
String explicit; | ||
|
||
public String toAuthenticationTypeAndValue() { | ||
if (mtls != null && mtls) { | ||
return "io.deephaven.authentication.mtls.MTlsAuthenticationHandler"; | ||
} | ||
if (psk != null) { | ||
return "psk " + psk; | ||
} | ||
if (explicit != null) { | ||
return explicit; | ||
} | ||
return null; | ||
} | ||
|
||
public void ifPresent(Consumer<String> consumer) { | ||
final String authenticationTypeAndValue = toAuthenticationTypeAndValue(); | ||
if (authenticationTypeAndValue != null) { | ||
consumer.accept(authenticationTypeAndValue); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
java-client/flight/src/main/java/io/deephaven/client/impl/AuthenticationMiddleware.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.