ClientSession that can
be associated with the HostConfigEntry the session was created for.
The JGitSshClient creates such sessions and sets this association.
Also provides for associating a JGit CredentialsProvider with a
session.
| Modifier and Type | Class and Description |
|---|---|
| public static class | JGitClientSession.
An |
| public static class | JGitClientSession.
A |
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private CredentialsProvider | |
| private static final int | DEFAULT_MAX_IDENTIFICATION_SIZE
Default setting for the maximum number of bytes to read in the initial protocol version exchange. |
| private static final Set | FORBIDDEN_CIPHERS
Cipher implementations that we never ever want to use, even if Apache MINA SSHD has implementations for them. |
| private HostConfigEntry | |
| private boolean | |
| public static final AttributeRepository. | KEY_PASSWORD_PROVIDER_FACTORY
Attribute set by |
| private volatile StatefulProxyConnector |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private List | |
| protected List | Returns: the lines read, with the server identification line last, ornull if no identification line was found and more bytes
are neededto read from buffer, boolean whether we're an SSH server (should always be server)false)Overrides org. Reads the RFC 4253, section 4.2 protocol version identification. |
| private static String | |
| private List | |
| pack-priv Set | |
| public <T> T | getAttribute(AttributeRepository.
The key of the attribute; must not be keynull.Overrides org. Implements org. Returns the value of the user-defined attribute. |
| public List | getCipherFactories()
Overrides org. Implements org. Retrieve the list of named factories for |
| public CredentialsProvider | Returns: the provider, ornull if none is set.Retrieves the |
| public HostConfigEntry | |
| public PropertyResolver | |
| public void | messageReceived(Readable
the new buffer received buffer)Overrides org. Main input point for the MINA framework. |
| public List | Returns: the modified list ornull if overrideKey is not
setto modify defaultList, Set<String> all available values allAvailable, String telling how to modify the fromConfig, String defaultList, must not be
null or emptyssh config key; used for logging overrideKey)Modifies a given algorithm list according to a list from the ssh config, including add ('+'), remove ('-') and reordering ('^') operators. |
| private void | |
| protected String | resolveAvailableSignaturesProposal(FactoryManager
The manager)FactoryManagerOverrides org. Computes the list of available host key signature algorithms supported. |
| protected String | |
| protected IoWriteFuture | sendIdentification(String
our identification to send ident, List<String> Extra lines to send - used only by server sessions extraLines)Overrides org. Send our identification. |
| protected byte[] | |
| public void | setCredentialsProvider(CredentialsProvider
to set provider)Sets the |
| public void | setHostConfigEntry(HostConfigEntry
the hostConfig)HostConfigEntrySets the |
| private void | |
| public void | setProxyHandler(StatefulProxyConnector
to set handler)Sets a |
| ciphers | back to summary |
|---|---|
| private List<NamedFactory<Cipher>> ciphers | |
| credentialsProvider | back to summary |
|---|---|
| private CredentialsProvider credentialsProvider | |
| DEFAULT_MAX_IDENTIFICATION_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_MAX_IDENTIFICATION_SIZE Default setting for the maximum number of bytes to read in the initial
protocol version exchange. 64kb is what OpenSSH < 8.0 read; OpenSSH
8.0 changed it to 8Mb, but that seems excessive for the purpose stated in
RFC 4253. The Apache MINA sshd default in
| |
| FORBIDDEN_CIPHERS | back to summary |
|---|---|
| private static final Set<? extends CipherFactory> FORBIDDEN_CIPHERS Cipher implementations that we never ever want to use, even if Apache MINA SSHD has implementations for them. | |
| hostConfig | back to summary |
|---|---|
| private HostConfigEntry hostConfig | |
| isInitialKex | back to summary |
|---|---|
| private boolean isInitialKex | |
| KEY_PASSWORD_PROVIDER_FACTORY | back to summary |
|---|---|
| public static final AttributeRepository. Attribute set by | |
| proxyHandler | back to summary |
|---|---|
| private volatile StatefulProxyConnector proxyHandler | |
| JGitClientSession | back to summary |
|---|---|
public JGitClientSession(ClientFactoryManager manager, IoSession session) throws Exception
| |
| determineKexProposal | back to summary |
|---|---|
| private List | |
| doReadIdentification | back to summary |
|---|---|
| protected List Overrides org. Reads the RFC 4253, section 4.2 protocol version identification. The Apache MINA sshd default implementation checks for NUL bytes also in any preceding lines, whereas RFC 4253 requires such a check only for the actual identification string starting with "SSH-". Likewise, the 255 character limit exists only for the identification string, not for the preceding lines. CR-LF handling is also relaxed.
| |
| escapeControls | back to summary |
|---|---|
| private static String escapeControls(String s) | |
| filteredList | back to summary |
|---|---|
| private List | |
| getAllAvailableSignatureAlgorithms | back to summary |
|---|---|
| pack-priv Set | |
| getAttribute | back to summary |
|---|---|
| public <T> T getAttribute(AttributeRepository. Overrides org. Implements org. Doc from org. Returns the value of the user-defined attribute.
| |
| getCipherFactories | back to summary |
|---|---|
| public List Overrides org. Implements org. Doc from org. Retrieve the list of named factories for
| |
| getCredentialsProvider | back to summary |
|---|---|
| public CredentialsProvider getCredentialsProvider() Retrieves the
| |
| getHostConfigEntry | back to summary |
|---|---|
| public HostConfigEntry getHostConfigEntry() Retrieves the
| |
| getParentPropertyResolver | back to summary |
|---|---|
| public PropertyResolver getParentPropertyResolver() Overrides org. Implements org.
| |
| messageReceived | back to summary |
|---|---|
| public void messageReceived(Readable buffer) throws Exception Overrides org. Doc from org. Main input point for the MINA framework.
This method will be called each time new data is received on the socket and will append it to the input buffer
before calling the | |
| modifyAlgorithmList | back to summary |
|---|---|
| public List Modifies a given algorithm list according to a list from the ssh config, including add ('+'), remove ('-') and reordering ('^') operators. | |
| removeFromList | back to summary |
|---|---|
| private void removeFromList(Set<String> current, String key, String patterns) | |
| resolveAvailableSignaturesProposal | back to summary |
|---|---|
| protected String resolveAvailableSignaturesProposal(FactoryManager manager) Overrides org. Doc from org. Computes the list of available host key signature algorithms supported.
| |
| resolveSessionKexProposal | back to summary |
|---|---|
| protected String resolveSessionKexProposal(String hostKeyTypes) throws IOException Overrides org.
| |
| sendIdentification | back to summary |
|---|---|
| protected IoWriteFuture sendIdentification(String ident, List<String> extraLines) throws Exception Overrides org. Doc from org. Send our identification.
| |
| sendKexInit | back to summary |
|---|---|
| protected byte[] sendKexInit() throws Exception Overrides org.
| |
| setCredentialsProvider | back to summary |
|---|---|
| public void setCredentialsProvider(CredentialsProvider provider) Sets the
| |
| setHostConfigEntry | back to summary |
|---|---|
| public void setHostConfigEntry(HostConfigEntry hostConfig) Sets the
| |
| setNewFactories | back to summary |
|---|---|
| private void setNewFactories(Collection<String> defaultFactories, Collection<String> finalFactories) | |
| setProxyHandler | back to summary |
|---|---|
| public void setProxyHandler(StatefulProxyConnector handler) Sets a
| |
AttributeRepository that chains together two other attribute
sources in a hierarchy.
| Modifier and Type | Field and Description |
|---|---|
| private final AttributeRepository | |
| private final AttributeRepository |
| Access | Constructor and Description |
|---|---|
| public | ChainingAttributes(AttributeRepository
to search for attributes first self, AttributeRepository to search for attributes if not found in parent)selfCreate a new |
| Modifier and Type | Method and Description |
|---|---|
| public Collection | |
| public <T> T | getAttribute(AttributeRepository.
The key of the attribute; must not be keynull.Implements org. Returns the value of the user-defined attribute. |
| public int | |
| public <T> T | resolveAttribute(AttributeRepository.
The key of the attribute; must not be keynull.Overrides default org. Attempts to resolve the associated value by going up the store's hierarchy (if any) |
| delegate | back to summary |
|---|---|
| private final AttributeRepository delegate | |
| parent | back to summary |
|---|---|
| private final AttributeRepository parent | |
| ChainingAttributes | back to summary |
|---|---|
| public ChainingAttributes(AttributeRepository self, AttributeRepository parent) Create a new
| |
| attributeKeys | back to summary |
|---|---|
| public Collection Implements org.
| |
| getAttribute | back to summary |
|---|---|
| public <T> T getAttribute(AttributeRepository. Implements org. Doc from org. Returns the value of the user-defined attribute.
| |
| getAttributesCount | back to summary |
|---|---|
| public int getAttributesCount() Implements org.
| |
| resolveAttribute | back to summary |
|---|---|
| public <T> T resolveAttribute(AttributeRepository. Overrides default org. Doc from org. Attempts to resolve the associated value by going up the store's hierarchy (if any)
| |
ChainingAttributes repository that doubles as a
PropertyResolver. The property map can be set via the attribute
key SessionAttributes#PROPERTIES.
| Modifier and Type | Field and Description |
|---|---|
| private final PropertyResolver | |
| public static final AttributeRepository. | PROPERTIES
Key for storing a map of properties in the attributes. |
| Access | Constructor and Description |
|---|---|
| public | SessionAttributes(AttributeRepository
to search for attributes first self, AttributeRepository to search for attributes if not found in parent, PropertyResolver selfto search for properties if not found in parentProperties)selfCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public PropertyResolver | |
| public Map | getProperties()
Implements org. A map of properties that can be used to configure the SSH server or client. |
| parentProperties | back to summary |
|---|---|
| private final PropertyResolver parentProperties | |
| PROPERTIES | back to summary |
|---|---|
| public static final AttributeRepository. Key for storing a map of properties in the attributes. | |
| SessionAttributes | back to summary |
|---|---|
| public SessionAttributes(AttributeRepository self, AttributeRepository parent, PropertyResolver parentProperties) Creates a new
| |
| getParentPropertyResolver | back to summary |
|---|---|
| public PropertyResolver getParentPropertyResolver() Implements org.
| |
| getProperties | back to summary |
|---|---|
| public Map Implements org. Doc from org. A map of properties that can be used to configure the SSH server or client. This map will never be changed by either the server or client and is not supposed to be changed at runtime (changes are not bound to have any effect on a running client or server), though it may affect the creation of sessions later as these values are usually not cached Note the type of the mapped property should match the expected configuration value type -
| |