Top Description Inners Fields Constructors Methods
org.apache.sshd.agent

public abstract Class SshAgentKeyConstraint

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.sshd.agent.SshAgentKeyConstraint.LifeTime, org.apache.sshd.agent.SshAgentKeyConstraint.Extension
Imports
org.apache.sshd.common.util.GenericUtils, org.apache.sshd.common.util.buffer.Buffer

A SshAgentKeyConstraint describes usage constraints for keys when being added to an SSH2 agent.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
public static class
SshAgentKeyConstraint.FidoProviderExtension

The OpenSSH "[email protected]" key constraint extension used for FIDO keys.

public static class
SshAgentKeyConstraint.LifeTime

An OpenSSH lifetime constraint expires a key added to an SSH agent after the given number of seconds.

Field Summary

Modifier and TypeField and Description
public static final SshAgentKeyConstraint
CONFIRM

The singleton OpenSSH confirmation SshAgentKeyConstraint.

private final byte

Constructor Summary

AccessConstructor and Description
protected
SshAgentKeyConstraint(byte
for the key constraint
id
)

Constructor setting the agent protocol ID of the constraint.

Method Summary

Modifier and TypeMethod and Description
public byte

Returns:

the protocol id of this constraint
getId
()

Retrieves the protocol ID of this constraint.

public void
put(Buffer
Buffer to write into at the current buffer write position
buffer
)

Writes this constraint into the given Buffer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONFIRMback to summary
public static final SshAgentKeyConstraint CONFIRM

The singleton OpenSSH confirmation SshAgentKeyConstraint. If set, the SSH agent is supposed to prompt the user before each use of a key in a signing operation.

Users who have this option set via ssh config AddKeysToAgent confirm are responsible themselves for having configured their agent correctly so that it prompts in whatever way is appropriate.

The OpenSSH agent prompts via via ssh-askpass or whatever program the environment variable SSH_ASKPASS defines. These prompts don't go through the prompting callback mechanisms of Apache MINA sshd.

idback to summary
private final byte id

Constructor Detail

SshAgentKeyConstraintback to summary
protected SshAgentKeyConstraint(byte id)

Constructor setting the agent protocol ID of the constraint.

Parameters
id:byte

for the key constraint

Method Detail

getIdback to summary
public byte getId()

Retrieves the protocol ID of this constraint.

Returns:byte

the protocol id of this constraint

putback to summary
public void put(Buffer buffer)

Writes this constraint into the given Buffer.

Parameters
buffer:Buffer

Buffer to write into at the current buffer write position

org.apache.sshd.agent back to summary

public abstract Class SshAgentKeyConstraint.Extension

extends SshAgentKeyConstraint
Class Inheritance
Known Direct Subclasses
org.apache.sshd.agent.SshAgentKeyConstraint.FidoProviderExtension

An OpenSSH SshAgentKeyConstraint extension. Extensions are identified by name.

Field Summary

Modifier and TypeField and Description
private final String
Inherited from org.apache.sshd.agent.SshAgentKeyConstraint:
CONFIRM

Constructor Summary

AccessConstructor and Description
protected
Extension(String
of the extension, must not be null or empty
name
)

Creates a new Extension.

Method Summary

Modifier and TypeMethod and Description
public void
put(Buffer
Buffer to write into at the current buffer write position
buffer
)

Overrides org.apache.sshd.agent.SshAgentKeyConstraint.put.

Writes this constraint into the given Buffer.

Inherited from org.apache.sshd.agent.SshAgentKeyConstraint:
getId

Field Detail

nameback to summary
private final String name

Constructor Detail

Extensionback to summary
protected Extension(String name)

Creates a new Extension.

Parameters
name:String

of the extension, must not be null or empty

Method Detail

putback to summary
public void put(Buffer buffer)

Overrides org.apache.sshd.agent.SshAgentKeyConstraint.put.

Doc from org.apache.sshd.agent.SshAgentKeyConstraint.put.

Writes this constraint into the given Buffer.

Parameters
buffer:Buffer

Buffer to write into at the current buffer write position

Annotations
@Override
org.apache.sshd.agent back to summary

public Class SshAgentKeyConstraint.FidoProviderExtension

extends Extension
Class Inheritance

The OpenSSH "[email protected]" key constraint extension used for FIDO keys. Could be set via ssh config SecurityKeyProvider.

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
FidoProviderExtension(String
path to a middleware library; must not be null or empty
provider
)

Creates a new FidoProviderExtension.

Method Summary

Modifier and TypeMethod and Description
public void
put(Buffer
Buffer to write into at the current buffer write position
buffer
)

Overrides org.apache.sshd.agent.SshAgentKeyConstraint.Extension.put.

Writes this constraint into the given Buffer.

Field Detail

providerback to summary
private final String provider

Constructor Detail

FidoProviderExtensionback to summary
public FidoProviderExtension(String provider)

Creates a new FidoProviderExtension.

Parameters
provider:String

path to a middleware library; must not be null or empty

Method Detail

putback to summary
public void put(Buffer buffer)

Overrides org.apache.sshd.agent.SshAgentKeyConstraint.Extension.put.

Doc from org.apache.sshd.agent.SshAgentKeyConstraint.put.

Writes this constraint into the given Buffer.

Parameters
buffer:Buffer

Buffer to write into at the current buffer write position

Annotations
@Override
org.apache.sshd.agent back to summary

public Class SshAgentKeyConstraint.LifeTime

extends SshAgentKeyConstraint
Class Inheritance

An OpenSSH lifetime constraint expires a key added to an SSH agent after the given number of seconds.

Field Summary

Modifier and TypeField and Description
private final int
Inherited from org.apache.sshd.agent.SshAgentKeyConstraint:
CONFIRM

Constructor Summary

AccessConstructor and Description
public
LifeTime(int
number of seconds after which the agent shall automatically remove the key again; must be strictly positive
secondsToLive
)

Creates a new LifeTime constraint.

Method Summary

Modifier and TypeMethod and Description
public void
put(Buffer
Buffer to write into at the current buffer write position
buffer
)

Overrides org.apache.sshd.agent.SshAgentKeyConstraint.put.

Writes this constraint into the given Buffer.

Inherited from org.apache.sshd.agent.SshAgentKeyConstraint:
getId

Field Detail

secondsToLiveback to summary
private final int secondsToLive

Constructor Detail

LifeTimeback to summary
public LifeTime(int secondsToLive)

Creates a new LifeTime constraint.

Parameters
secondsToLive:int

number of seconds after which the agent shall automatically remove the key again; must be strictly positive

Method Detail

putback to summary
public void put(Buffer buffer)

Overrides org.apache.sshd.agent.SshAgentKeyConstraint.put.

Doc from org.apache.sshd.agent.SshAgentKeyConstraint.put.

Writes this constraint into the given Buffer.

Parameters
buffer:Buffer

Buffer to write into at the current buffer write position

Annotations
@Override