Class AuthenticationClientManager.Null
- All Implemented Interfaces:
- AuthenticationClient,- PublicKeyAuthenticationClient,- TokenAuthenticationClient,- TokenFactoryFactory,- TokenVerificationClient,- AutoCloseable
- Enclosing class:
- AuthenticationClientManager
- 
Nested Class SummaryNested classes/interfaces inherited from class io.deephaven.enterprise.auth.AuthenticationClientManagerAuthenticationClientManager.ClientTransportStatusChangeListener, AuthenticationClientManager.NullNested classes/interfaces inherited from class io.deephaven.enterprise.auth.AuthenticationClientManagerBaseAuthenticationClientManagerBase.SingleClientTokenFactory, AuthenticationClientManagerBase.TokenFactoryBaseNested classes/interfaces inherited from interface io.deephaven.enterprise.auth.TokenFactoryFactoryTokenFactoryFactory.TokenFactory
- 
Field SummaryFields inherited from class io.deephaven.enterprise.auth.AuthenticationClientManagerAlwaysFalseBooleanFuture, authMethods, connectionStatusHandlers, log
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanchallengeResponse(String privateKeyFile) Authenticate with the user denoted in the specified private key filevoidclose()Disconnect from the originCreate a set of tokens for delegating authentication for each Auth server.createDelegateTokensForUser(String operateAs) Create a set of tokens for delegating authentication for each Auth server, as a specific user.createToken(String service) Create a new authentication token for the requested service.createTokenForUser(String service, String operateAs) Create a new authentication token for the requested service operating as the specified userbooleanPerform default authentication.booleanIf no previous authentication attempt has been made, try default authentication.externalLogin(String key) Attempt to perform key-based external-authentication against all connected/nonauthenticated serversprotected TokenFactoryFactory.TokenFactorygetTokenFactoryInternal(String service, String user) booleanReturn true if this client is authenticated.booleanpasswordAuthentication(String checkUser, String password, String operateAs) Authenticate to all connected/nonauthenticated servers with username/passwordprotected booleanAttempt authentication with any plugins that have been set up on the system.booleanpresentDelegateToken(AuthToken delegatedToken) Validate the delegated tokens created byAuthenticationClientManager.createDelegateTokens()orAuthenticationClientManager.createDelegateTokensForUser(String)presentDelegateTokenAsync(AuthToken delegatedToken) Validate the delegated tokens created byAuthenticationClientManager.createDelegateTokens()orAuthenticationClientManager.createDelegateTokensForUser(String)booleanverifyToken(String service, AuthToken token) Verify the specified service token with the server.voidwaitForSuccessfulServerRoundtrip(long timeoutMillis) Attempt to do a roundtrip to a (any) server, for up to the timeout milliseconds.Methods inherited from class io.deephaven.enterprise.auth.AuthenticationClientManageraddConnectionStatusHandler, checkForPlugins, getDefault, getTokenFactory, getTokenFactory, make, removeConnectionStatusHandler, verifyTokenMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.enterprise.auth.AuthenticationClientpasswordAuthenticationMethods inherited from interface io.deephaven.enterprise.auth.TokenAuthenticationClientcreateToken, createTokenForUserMethods inherited from interface io.deephaven.enterprise.auth.TokenFactoryFactorygetTokenFactory, getTokenFactory
- 
Constructor Details- 
Nullpublic Null()
 
- 
- 
Method Details- 
createTokenDescription copied from class:AuthenticationClientManagerCreate a new authentication token for the requested service. SeeTokenAuthenticationClient.createToken(String)for exception details Users are encouraged to useAuthenticationClientManager.getTokenFactory(String)andTokenFactoryFactory.TokenFactory.tryActionWithToken(Consumer)orTokenFactoryFactory.TokenFactory.tryGetWithToken(Function)instead as they provide a means to handle the loss of an origin.- Specified by:
- createTokenin interface- TokenAuthenticationClient
- Specified by:
- createTokenin class- AuthenticationClientManager
- Returns:
- a new AuthTokenfor service
 
- 
createTokenForUserDescription copied from class:AuthenticationClientManagerCreate a new authentication token for the requested service operating as the specified user SeeTokenAuthenticationClient.createTokenForUser(String, String)for exception details Users are encouraged to useAuthenticationClientManager.getTokenFactory(String, String)andTokenFactoryFactory.TokenFactory.tryActionWithToken(Consumer)orTokenFactoryFactory.TokenFactory.tryGetWithToken(Function)instead as they provide a means to handle the loss of an origin.- Specified by:
- createTokenForUserin interface- TokenAuthenticationClient
- Specified by:
- createTokenForUserin class- AuthenticationClientManager
- Returns:
- a new AuthTokenfor service operating as operateAs
 
- 
createDelegateTokensDescription copied from class:AuthenticationClientManagerCreate a set of tokens for delegating authentication for each Auth server. SeeTokenAuthenticationClient.createToken(String)for exception details- Specified by:
- createDelegateTokensin class- AuthenticationClientManager
- Returns:
- a list of AuthTokens delegating authentication for each available server
 
- 
createDelegateTokensForUserDescription copied from class:AuthenticationClientManagerCreate a set of tokens for delegating authentication for each Auth server, as a specific user. SeeTokenAuthenticationClient.createTokenForUser(String, String)for exception details- Specified by:
- createDelegateTokensForUserin class- AuthenticationClientManager
- Returns:
- a list of AuthTokens delegating authentication for each available server
 
- 
verifyTokenDescription copied from class:AuthenticationClientManagerVerify the specified service token with the server. SeeTokenVerificationClient.verifyToken(String, AuthToken)for additional exception details- Specified by:
- verifyTokenin interface- TokenVerificationClient
- Specified by:
- verifyTokenin class- AuthenticationClientManager
- Returns:
- true if the token was validated, false otherwise
 
- 
passwordAuthenticationDescription copied from class:AuthenticationClientManagerAuthenticate to all connected/nonauthenticated servers with username/password SeeAuthenticationClient.passwordAuthentication(String, String, String)for exception details- Specified by:
- passwordAuthenticationin interface- AuthenticationClient
- Specified by:
- passwordAuthenticationin class- AuthenticationClientManager
- Parameters:
- checkUser- The user to authenticate
- password- The password
- operateAs- The effective user to operate as
- Returns:
- true on success, false on failure
 
- 
externalLoginDescription copied from class:AuthenticationClientManagerAttempt to perform key-based external-authentication against all connected/nonauthenticated servers SeeAuthenticationClient.externalLogin(String)for details- Specified by:
- externalLoginin interface- AuthenticationClient
- Specified by:
- externalLoginin class- AuthenticationClientManager
- Parameters:
- key- a nonce which an appropriate auth-module may be able to confirm as authenticated
- Returns:
- the authenticated user-name if this key is approved by an auth-module, else null
 
- 
presentDelegateTokenDescription copied from class:AuthenticationClientManagerValidate the delegated tokens created by SeeAuthenticationClientManager.createDelegateTokens()orAuthenticationClientManager.createDelegateTokensForUser(String)AuthenticationClient.presentDelegateToken(AuthToken)for additional exception detail- Specified by:
- presentDelegateTokenin interface- AuthenticationClient
- Specified by:
- presentDelegateTokenin class- AuthenticationClientManager
- Parameters:
- delegatedToken- The delegate token created by AuthenticationClientManager.createDelegateTokens()
- Returns:
- true if the token was validated, false otherwise
 
- 
presentDelegateTokenAsyncDescription copied from class:AuthenticationClientManagerValidate the delegated tokens created by SeeAuthenticationClientManager.createDelegateTokens()orAuthenticationClientManager.createDelegateTokensForUser(String)AuthenticationClient.presentDelegateToken(AuthToken)for additional exception detail- Specified by:
- presentDelegateTokenAsyncin class- AuthenticationClientManager
- Returns:
- a Future<Boolean>that will be true if the token was validated, false otherwise
 
- 
challengeResponseDescription copied from class:AuthenticationClientManagerAuthenticate with the user denoted in the specified private key file- Specified by:
- challengeResponsein interface- PublicKeyAuthenticationClient
- Specified by:
- challengeResponsein class- AuthenticationClientManager
- Parameters:
- privateKeyFile- the file containing the elements required for authentication; user, operateas, public and private keys.
- Returns:
- False if already authenticated. If not already authenticated at the time of the call, the status of the authentication-attempt; true if successfully authenticated, else false
 
- 
getTokenFactoryInternal- Specified by:
- getTokenFactoryInternalin class- AuthenticationClientManager
 
- 
isAuthenticatedpublic boolean isAuthenticated()Description copied from class:AuthenticationClientManagerReturn true if this client is authenticated. This method may wait to return if there is a concurrent authentication attempt in flight. Unlike most other methods in this class,isAuthenticatedwill never throw anAuthException.- Specified by:
- isAuthenticatedin class- AuthenticationClientManager
- Returns:
- true if authenticated, false otherwise.
 
- 
waitForSuccessfulServerRoundtrippublic void waitForSuccessfulServerRoundtrip(long timeoutMillis) Description copied from class:AuthenticationClientManagerAttempt to do a roundtrip to a (any) server, for up to the timeout milliseconds. An AuthException is thrown if the roundtrip doesn't succeed before the deadline. When this method returns normally, a client can be certain that there was an authentication server ready to service requests at some point during the call.- Specified by:
- waitForSuccessfulServerRoundtripin class- AuthenticationClientManager
 
- 
closepublic void close()Description copied from interface:AuthenticationClientDisconnect from the origin- Specified by:
- closein interface- AuthenticationClient
- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- TokenFactoryFactory
- Specified by:
- closein class- AuthenticationClientManager
 
- 
pluginAuthenticationprotected boolean pluginAuthentication()Description copied from class:AuthenticationClientManagerAttempt authentication with any plugins that have been set up on the system.- Specified by:
- pluginAuthenticationin class- AuthenticationClientManager
- Returns:
- True if at least one plugin was able to authenticate with at least one client; false otherwise.
 
- 
defaultAuthenticationpublic boolean defaultAuthentication()Description copied from class:AuthenticationClientManagerPerform default authentication. Default authentication implies authenticating with the private key file, or with plugins if there is no private key file. SeeAuthenticationClientManager.challengeResponse(String)for exception details- Specified by:
- defaultAuthenticationin class- AuthenticationClientManager
- Returns:
- false if already authenticated or if an authentication attempt was done and failed, true otherwise.
 
- 
ensureAuthenticationpublic boolean ensureAuthentication()Description copied from class:AuthenticationClientManagerIf no previous authentication attempt has been made, try default authentication. Default authentication implies attempt to authenticate with the private key file, or with plugins if there is no private key file. If a previous authentication attempt succeeded in the past, and that authentication method can be retried, and the client is current unauthenticated, then attempt again the same method that succeeded before. SeeAuthenticationClientManager.challengeResponse(String)for exception details- Specified by:
- ensureAuthenticationin class- AuthenticationClientManager
- Returns:
- true if authenticated by the time this call returns (either because we were already authenticated, or because we were not authenticated and an authentication attempt was done and was successful), false otherwise. When false is returned it implies not authenticated.
 
 
-