Package org.apache.sshd.server
Interface ServerAuthenticationManager
- All Superinterfaces:
KeyPairProviderHolder,UserAuthFactoriesManager<ServerSession,UserAuth, UserAuthFactory>
- All Known Subinterfaces:
ServerFactoryManager,ServerSession
- All Known Implementing Classes:
AbstractServerSession,ServerSessionImpl,SshServer
public interface ServerAuthenticationManager
extends UserAuthFactoriesManager<ServerSession,UserAuth,UserAuthFactory>, KeyPairProviderHolder
Holds providers and helpers related to the server side authentication process
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UserAuthGSSFactorystatic final UserAuthKeyboardInteractiveFactorystatic final UserAuthPasswordFactorystatic final UserAuthPublicKeyFactory -
Method Summary
Modifier and TypeMethodDescriptionRetrieve theGSSAuthenticatorto be used by the SSH server.Retrieve theHostBasedAuthenticatorto be used by the SSH server.Retrieve theKeyboardInteractiveAuthenticatorto be used by the SSH server.Retrieve thePasswordAuthenticatorto be used by the SSH server.Retrieve thePublickeyAuthenticatorto be used by SSH server.static List<UserAuthFactory> If user authentication factories already set, then simply returns them.static List<UserAuthFactory> resolveUserAuthFactories(ServerAuthenticationManager manager, List<UserAuthFactory> userFactories) If user authentication factories already set, then simply returns them.voidsetGSSAuthenticator(GSSAuthenticator gssAuthenticator) voidsetHostBasedAuthenticator(HostBasedAuthenticator hostBasedAuthenticator) voidvoidsetKeyboardInteractiveAuthenticator(KeyboardInteractiveAuthenticator interactiveAuthenticator) voidsetPasswordAuthenticator(PasswordAuthenticator passwordAuthenticator) voidsetPublickeyAuthenticator(PublickeyAuthenticator publickeyAuthenticator) default voidMethods inherited from interface org.apache.sshd.common.keyprovider.KeyPairProviderHolder
getKeyPairProvider, setKeyPairProviderMethods inherited from interface org.apache.sshd.common.auth.UserAuthFactoriesManager
getUserAuthFactories, getUserAuthFactoriesNameList, getUserAuthFactoriesNames, setUserAuthFactories, setUserAuthFactoriesNameList, setUserAuthFactoriesNames
-
Field Details
-
DEFAULT_USER_AUTH_PUBLIC_KEY_FACTORY
-
DEFAULT_USER_AUTH_GSS_FACTORY
-
DEFAULT_USER_AUTH_PASSWORD_FACTORY
-
DEFAULT_USER_AUTH_KB_INTERACTIVE_FACTORY
-
-
Method Details
-
setUserAuthFactoriesNames
- Specified by:
setUserAuthFactoriesNamesin interfaceUserAuthFactoriesManager<ServerSession,UserAuth, UserAuthFactory>
-
getPublickeyAuthenticator
PublickeyAuthenticator getPublickeyAuthenticator()Retrieve thePublickeyAuthenticatorto be used by SSH server. If no authenticator has been configured (i.e. this method returnsnull), then client authentication requests based on keys will be rejected.- Returns:
- the
PublickeyAuthenticatorornull
-
setPasswordAuthenticator
-
getPasswordAuthenticator
PasswordAuthenticator getPasswordAuthenticator()Retrieve thePasswordAuthenticatorto be used by the SSH server. If no authenticator has been configured (i.e. this method returnsnull), then client authentication requests based on passwords will be rejected.- Returns:
- the
PasswordAuthenticatorornull
-
setPublickeyAuthenticator
-
getKeyboardInteractiveAuthenticator
KeyboardInteractiveAuthenticator getKeyboardInteractiveAuthenticator()Retrieve theKeyboardInteractiveAuthenticatorto be used by the SSH server. If no authenticator has been configured (i.e. this method returnsnull), then client authentication requests based on this method will be rejected.- Returns:
- The
KeyboardInteractiveAuthenticatorornull
-
setKeyboardInteractiveAuthenticator
-
getGSSAuthenticator
GSSAuthenticator getGSSAuthenticator()Retrieve theGSSAuthenticatorto be used by the SSH server. If no authenticator has been configured (i.e. this method returnsnull), then client authentication requests based on gssapi will be rejected.- Returns:
- the
GSSAuthenticatorornull
-
setGSSAuthenticator
-
getHostBasedAuthenticator
HostBasedAuthenticator getHostBasedAuthenticator()Retrieve theHostBasedAuthenticatorto be used by the SSH server. If no authenticator has been configured (i.e. this method returnsnull), then client authentication requests based on this method will be rejected.- Returns:
- the
HostBasedAuthenticatorornull
-
setHostBasedAuthenticator
-
getHostKeyCertificateProvider
HostKeyCertificateProvider getHostKeyCertificateProvider()- Returns:
- a
HostKeyCertificateProviderif available, null as default
-
setHostKeyCertificateProvider
-
resolveUserAuthFactories
If user authentication factories already set, then simply returns them. Otherwise, builds the factories list from the individual authenticators available for the manager - password public key, keyboard-interactive, GSS, etc...- Parameters:
manager- TheServerAuthenticationManager- ignored ifnull- Returns:
- The resolved
ListofNamedFactoryfor theUserAuths - See Also:
-
resolveUserAuthFactories
static List<UserAuthFactory> resolveUserAuthFactories(ServerAuthenticationManager manager, List<UserAuthFactory> userFactories) If user authentication factories already set, then simply returns them. Otherwise, builds the factories list from the individual authenticators available for the manager - password public key, keyboard-interactive, GSS, etc...- Parameters:
manager- TheServerAuthenticationManager- ignored ifnulluserFactories- The currently availableUserAuthfactories - if notnull/empty then they are used as-is.- Returns:
- The resolved
ListofNamedFactoryfor theUserAuths
-