Documentation ¶
Index ¶
- func CredentialsToMethods(credentials []SSHCredentials, logger *zap.SugaredLogger) (methods []ssh.AuthMethod)
- func DecryptPrivateKey(privkey, pass *memguard.LockedBuffer) (*memguard.LockedBuffer, error)
- func GetAgentAuth() (ssh.AuthMethod, error)
- func InputPassword(prompt string) (*memguard.LockedBuffer, error)
- func NeedPassphrase(privkey *memguard.LockedBuffer) (bool, error)
- func ReadCertificateFromFileSystem(path string) (*memguard.LockedBuffer, error)
- func ReadPrivateKeyFromFileSystem(path string) (*memguard.LockedBuffer, error)
- func SerializePublicKey(public *PublicKey) (*memguard.LockedBuffer, error)
- func Sign(ctx context.Context, pub *PublicKey, login, sshMount, sshRole string, ...) (*memguard.LockedBuffer, error)
- type PublicKey
- type SSHCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CredentialsToMethods ¶
func CredentialsToMethods(credentials []SSHCredentials, logger *zap.SugaredLogger) (methods []ssh.AuthMethod)
func DecryptPrivateKey ¶
func DecryptPrivateKey(privkey, pass *memguard.LockedBuffer) (*memguard.LockedBuffer, error)
DecryptPrivateKey returns the decrypted version of the given private key, using a passphrase.
func GetAgentAuth ¶
func GetAgentAuth() (ssh.AuthMethod, error)
func InputPassword ¶
func InputPassword(prompt string) (*memguard.LockedBuffer, error)
func NeedPassphrase ¶
func NeedPassphrase(privkey *memguard.LockedBuffer) (bool, error)
NeedPassphrase checks if the given private key needs a passphrase to be decoded.
func ReadCertificateFromFileSystem ¶
func ReadCertificateFromFileSystem(path string) (*memguard.LockedBuffer, error)
func ReadPrivateKeyFromFileSystem ¶
func ReadPrivateKeyFromFileSystem(path string) (*memguard.LockedBuffer, error)
func SerializePublicKey ¶
func SerializePublicKey(public *PublicKey) (*memguard.LockedBuffer, error)
Types ¶
type PublicKey ¶
type PublicKey memguard.LockedBuffer
func DerivePublicKey ¶
func DerivePublicKey(privkey *memguard.LockedBuffer) (*PublicKey, error)
func (*PublicKey) MarshalJSON ¶
type SSHCredentials ¶
type SSHCredentials struct { PrivateKey *memguard.LockedBuffer PublicKey *PublicKey Certificate *memguard.LockedBuffer Password *memguard.LockedBuffer Agent bool }
func GetSSHCredentials ¶
func GetSSHCredentials(ctx context.Context, clictx params.CLIContext, loginName string, useAgent bool, l *zap.SugaredLogger) (*api.Client, []SSHCredentials, error)
func (SSHCredentials) AuthMethod ¶
func (c SSHCredentials) AuthMethod() (ssh.AuthMethod, error)
Click to show internal directories.
Click to hide internal directories.