PublickeyAuthenticator while automatically re-loading the keys if
the file has changed when a new authentication request is receivedNote
by default, the only validation of
the username is that it is not null/empty - see isValidUsername(String, ServerSession)
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicReference | |
| public static final String | STD_AUTHORIZED_KEYS_FILENAME
Standard OpenSSH authorized keys file name |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | authenticate(String
the username username, PublicKey the key key, ServerSession the server session session)Implements org. Check the validity of a public key. |
| protected PublickeyAuthenticator | createDelegateAuthenticator(String username, ServerSession session, Path path, Collection<AuthorizedKeyEntry> entries, PublicKeyEntryResolver fallbackResolver)
|
| public static Path | Returns: The defaultPath location of the OpenSSH authorized keys file
|
| protected PublicKeyEntryResolver | |
| protected boolean | |
| public static List | readDefaultAuthorizedKeys(OpenOption...
The options)OpenOptions to use when reading the fileReads read the contents of the default OpenSSH |
| protected Collection | |
| protected PublickeyAuthenticator |
| delegateHolder | back to summary |
|---|---|
| private final AtomicReference<PublickeyAuthenticator> delegateHolder | |
| STD_AUTHORIZED_KEYS_FILENAME | back to summary |
|---|---|
| public static final String STD_AUTHORIZED_KEYS_FILENAME Standard OpenSSH authorized keys file name | |
| AuthorizedKeysAuthenticator | back to summary |
|---|---|
| public AuthorizedKeysAuthenticator(Path file) | |
| AuthorizedKeysAuthenticator | back to summary |
|---|---|
| public AuthorizedKeysAuthenticator(Path file, LinkOption... options) | |
| authenticate | back to summary |
|---|---|
| public boolean authenticate(String username, PublicKey key, ServerSession session) Implements org. Doc from org. Check the validity of a public key.
| |
| createDelegateAuthenticator | back to summary |
|---|---|
| protected PublickeyAuthenticator createDelegateAuthenticator(String username, ServerSession session, Path path, Collection<AuthorizedKeyEntry> entries, PublicKeyEntryResolver fallbackResolver) throws IOException, GeneralSecurityException | |
| getDefaultAuthorizedKeysFile | back to summary |
|---|---|
public static Path getDefaultAuthorizedKeysFile()
| |
| getFallbackPublicKeyEntryResolver | back to summary |
|---|---|
| protected PublicKeyEntryResolver getFallbackPublicKeyEntryResolver() | |
| isValidUsername | back to summary |
|---|---|
| protected boolean isValidUsername(String username, ServerSession session) | |
| readDefaultAuthorizedKeys | back to summary |
|---|---|
| public static List Reads read the contents of the default OpenSSH
| |
| reloadAuthorizedKeys | back to summary |
|---|---|
| protected Collection | |
| resolvePublickeyAuthenticator | back to summary |
|---|---|
| protected PublickeyAuthenticator resolvePublickeyAuthenticator(String username, ServerSession session) throws IOException, GeneralSecurityException | |
| Access | Constructor and Description |
|---|---|
| private |
| KEYS_FILE | back to summary |
|---|---|
| private static final Path KEYS_FILE | |
| LazyDefaultAuthorizedKeysFileHolder | back to summary |
|---|---|
| private LazyDefaultAuthorizedKeysFileHolder() | |