public interface ServerAuthenticationManager extends KeyPairProviderHolder
Modifier and Type | Field and Description |
---|---|
static String |
AUTH_METHODS
This key is used when configuring multi-step authentications.
|
static String |
AUTO_WELCOME_BANNER_VALUE
Special value that can be set for the
WELCOME_BANNER property
indicating that the server should generate a banner consisting of the
random art of the server's keys (if any are provided). |
static WelcomeBannerPhase |
DEFAULT_BANNER_PHASE
Default value for
WELCOME_BANNER_PHASE if none specified |
static int |
DEFAULT_MAX_AUTH_REQUESTS
Default value for
MAX_AUTH_REQUESTS if none configured |
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 |
static String |
DEFAULT_WELCOME_BANNER_LANGUAGE
Default value for
WELCOME_BANNER_LANGUAGE is not overwritten |
static String |
MAX_AUTH_REQUESTS
Key used to retrieve the value in the configuration properties map
of the maximum number of failed authentication requests before the
server closes the connection.
|
static String |
WELCOME_BANNER
Key used to retrieve the value of welcome banner that will be displayed
when a user connects to the server.
|
static String |
WELCOME_BANNER_CHARSET
The charset to use if the configured welcome banner points
to a file - if not specified (either as a string or a
Charset
then the local default is used. |
static String |
WELCOME_BANNER_LANGUAGE
Key used to denote the language code for the welcome banner (if such
a banner is configured).
|
static String |
WELCOME_BANNER_PHASE
The
WelcomeBannerPhase value - either as an enum or
a string |
getKeyPairProvider, setKeyPairProvider
static final String MAX_AUTH_REQUESTS
DEFAULT_MAX_AUTH_REQUESTS
,
Constant Field Valuesstatic final int DEFAULT_MAX_AUTH_REQUESTS
MAX_AUTH_REQUESTS
if none configuredstatic final String WELCOME_BANNER
null
/empty then no banner
will be sent. The value can be one of the following:
File
or Path
, in which case
its contents will be transmitted. Note: if the file is empty
or does not exits, no banner will be transmitted.
URI
or a string starting with "file:/", in
which case it will be converted to a Path
and
handled accordingly.
AUTO_WELCOME_BANNER_VALUE
,
in which case the relevant banner content will be generated.
toString()
value yields a non empty string
will be used as the banner contents.
static final String AUTO_WELCOME_BANNER_VALUE
WELCOME_BANNER
property
indicating that the server should generate a banner consisting of the
random art of the server's keys (if any are provided). If no server
keys are available, then no banner will be sentstatic final String WELCOME_BANNER_LANGUAGE
DEFAULT_WELCOME_BANNER_LANGUAGE
is usedstatic final String DEFAULT_WELCOME_BANNER_LANGUAGE
WELCOME_BANNER_LANGUAGE
is not overwrittenstatic final String WELCOME_BANNER_PHASE
WelcomeBannerPhase
value - either as an enum or
a stringstatic final WelcomeBannerPhase DEFAULT_BANNER_PHASE
WELCOME_BANNER_PHASE
if none specifiedstatic final String WELCOME_BANNER_CHARSET
Charset
then the local default is used.static final String AUTH_METHODS
publickey,password publickey,keyboard-interactive
would require the user to complete public key authentication,
followed by either password or keyboard interactive authentication.
Only methods that are next in one or more lists are offered at each
stage, so for this example, it would not be possible to attempt
password or keyboard-interactive authentication before public key.static final UserAuthPublicKeyFactory DEFAULT_USER_AUTH_PUBLIC_KEY_FACTORY
static final UserAuthGSSFactory DEFAULT_USER_AUTH_GSS_FACTORY
static final UserAuthPasswordFactory DEFAULT_USER_AUTH_PASSWORD_FACTORY
static final UserAuthKeyboardInteractiveFactory DEFAULT_USER_AUTH_KB_INTERACTIVE_FACTORY
List<NamedFactory<UserAuth>> getUserAuthFactories()
UserAuth
objects.UserAuth
factories, never null
/emptydefault String getUserAuthFactoriesNameList()
void setUserAuthFactories(List<NamedFactory<UserAuth>> userAuthFactories)
default void setUserAuthFactoriesNameList(String names)
default void setUserAuthFactoriesNames(String... names)
default void setUserAuthFactoriesNames(Collection<String> names)
PublickeyAuthenticator getPublickeyAuthenticator()
PublickeyAuthenticator
to be used by SSH server.
If no authenticator has been configured (i.e. this method returns
null
), then client authentication requests based on keys will be
rejected.PublickeyAuthenticator
or null
void setPasswordAuthenticator(PasswordAuthenticator passwordAuthenticator)
PasswordAuthenticator getPasswordAuthenticator()
PasswordAuthenticator
to be used by the SSH server.
If no authenticator has been configured (i.e. this method returns
null
), then client authentication requests based on passwords
will be rejected.PasswordAuthenticator
or null
void setPublickeyAuthenticator(PublickeyAuthenticator publickeyAuthenticator)
KeyboardInteractiveAuthenticator getKeyboardInteractiveAuthenticator()
KeyboardInteractiveAuthenticator
to be used by
the SSH server. If no authenticator has been configured (i.e. this method returns
null
), then client authentication requests based on this method
will be rejected.KeyboardInteractiveAuthenticator
or null
void setKeyboardInteractiveAuthenticator(KeyboardInteractiveAuthenticator interactiveAuthenticator)
GSSAuthenticator getGSSAuthenticator()
GSSAuthenticator
to be used by the SSH server.
If no authenticator has been configured (i.e. this method returns
null
), then client authentication requests based on gssapi
will be rejected.GSSAuthenticator
or null
void setGSSAuthenticator(GSSAuthenticator gssAuthenticator)
HostBasedAuthenticator getHostBasedAuthenticator()
HostBasedAuthenticator
to be used by the SSH server. If
no authenticator has been configured (i.e. this method returns null
),
then client authentication requests based on this method will be rejected.HostBasedAuthenticator
or null
void setHostBasedAuthenticator(HostBasedAuthenticator hostBasedAuthenticator)
static List<NamedFactory<UserAuth>> resolveUserAuthFactories(ServerAuthenticationManager manager)
manager
- The ServerAuthenticationManager
- ignored if null
List
of NamedFactory
for the UserAuth
sresolveUserAuthFactories(ServerAuthenticationManager, List)
static List<NamedFactory<UserAuth>> resolveUserAuthFactories(ServerAuthenticationManager manager, List<NamedFactory<UserAuth>> userFactories)
manager
- The ServerAuthenticationManager
- ignored if null
userFactories
- The currently available UserAuth
factories - if not
null
/empty then they are used as-is.List
of NamedFactory
for the UserAuth
sCopyright © 2008–2022 The Apache Software Foundation. All rights reserved.