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
- Author:
- Apache MINA SSHD Project
-
Field Summary
Modifier and TypeFieldDescriptionstatic final UserAuthGSSFactory
static final UserAuthKeyboardInteractiveFactory
static final UserAuthPasswordFactory
static final UserAuthPublicKeyFactory
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve theGSSAuthenticator
to be used by the SSH server.Retrieve theHostBasedAuthenticator
to be used by the SSH server.Retrieve theKeyboardInteractiveAuthenticator
to be used by the SSH server.Retrieve thePasswordAuthenticator
to be used by the SSH server.Retrieve thePublickeyAuthenticator
to 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.void
setGSSAuthenticator
(GSSAuthenticator gssAuthenticator) void
setHostBasedAuthenticator
(HostBasedAuthenticator hostBasedAuthenticator) void
void
setKeyboardInteractiveAuthenticator
(KeyboardInteractiveAuthenticator interactiveAuthenticator) void
setPasswordAuthenticator
(PasswordAuthenticator passwordAuthenticator) void
setPublickeyAuthenticator
(PublickeyAuthenticator publickeyAuthenticator) default void
Methods inherited from interface org.apache.sshd.common.keyprovider.KeyPairProviderHolder
getKeyPairProvider, setKeyPairProvider
Methods 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:
setUserAuthFactoriesNames
in interfaceUserAuthFactoriesManager<ServerSession,
UserAuth, UserAuthFactory>
-
getPublickeyAuthenticator
PublickeyAuthenticator getPublickeyAuthenticator()Retrieve thePublickeyAuthenticator
to 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
PublickeyAuthenticator
ornull
-
setPasswordAuthenticator
-
getPasswordAuthenticator
PasswordAuthenticator getPasswordAuthenticator()Retrieve thePasswordAuthenticator
to 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
PasswordAuthenticator
ornull
-
setPublickeyAuthenticator
-
getKeyboardInteractiveAuthenticator
KeyboardInteractiveAuthenticator getKeyboardInteractiveAuthenticator()Retrieve theKeyboardInteractiveAuthenticator
to 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
KeyboardInteractiveAuthenticator
ornull
-
setKeyboardInteractiveAuthenticator
-
getGSSAuthenticator
GSSAuthenticator getGSSAuthenticator()Retrieve theGSSAuthenticator
to 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
GSSAuthenticator
ornull
-
setGSSAuthenticator
-
getHostBasedAuthenticator
HostBasedAuthenticator getHostBasedAuthenticator()Retrieve theHostBasedAuthenticator
to 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
HostBasedAuthenticator
ornull
-
setHostBasedAuthenticator
-
getHostKeyCertificateProvider
HostKeyCertificateProvider getHostKeyCertificateProvider()- Returns:
- a
HostKeyCertificateProvider
if 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
List
ofNamedFactory
for theUserAuth
s - 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 ifnull
userFactories
- The currently availableUserAuth
factories - if notnull
/empty then they are used as-is.- Returns:
- The resolved
List
ofNamedFactory
for theUserAuth
s
-