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
Fields Modifier and Type Field Description static UserAuthGSSFactory
DEFAULT_USER_AUTH_GSS_FACTORY
static UserAuthKeyboardInteractiveFactory
DEFAULT_USER_AUTH_KB_INTERACTIVE_FACTORY
static UserAuthPasswordFactory
DEFAULT_USER_AUTH_PASSWORD_FACTORY
static UserAuthPublicKeyFactory
DEFAULT_USER_AUTH_PUBLIC_KEY_FACTORY
-
Method Summary
-
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 Detail
-
DEFAULT_USER_AUTH_PUBLIC_KEY_FACTORY
static final UserAuthPublicKeyFactory DEFAULT_USER_AUTH_PUBLIC_KEY_FACTORY
-
DEFAULT_USER_AUTH_GSS_FACTORY
static final UserAuthGSSFactory DEFAULT_USER_AUTH_GSS_FACTORY
-
DEFAULT_USER_AUTH_PASSWORD_FACTORY
static final UserAuthPasswordFactory DEFAULT_USER_AUTH_PASSWORD_FACTORY
-
DEFAULT_USER_AUTH_KB_INTERACTIVE_FACTORY
static final UserAuthKeyboardInteractiveFactory DEFAULT_USER_AUTH_KB_INTERACTIVE_FACTORY
-
-
Method Detail
-
setUserAuthFactoriesNames
default void setUserAuthFactoriesNames(Collection<String> names)
- 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
void setPasswordAuthenticator(PasswordAuthenticator passwordAuthenticator)
-
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
void setPublickeyAuthenticator(PublickeyAuthenticator publickeyAuthenticator)
-
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
void setKeyboardInteractiveAuthenticator(KeyboardInteractiveAuthenticator interactiveAuthenticator)
-
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
void setGSSAuthenticator(GSSAuthenticator gssAuthenticator)
-
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
void setHostBasedAuthenticator(HostBasedAuthenticator hostBasedAuthenticator)
-
getHostKeyCertificateProvider
HostKeyCertificateProvider getHostKeyCertificateProvider()
- Returns:
- a
HostKeyCertificateProvider
if available, null as default
-
setHostKeyCertificateProvider
void setHostKeyCertificateProvider(HostKeyCertificateProvider provider)
-
resolveUserAuthFactories
static List<UserAuthFactory> resolveUserAuthFactories(ServerAuthenticationManager manager)
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(ServerAuthenticationManager, List)
-
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
-
-