waft.cli.keys module

class waft.cli.keys.WaftPublicKey

Bases: object

WAFT public key handler.

classmethod disable_key(sftp: SFTPClient, filepath: PurePosixPath)

Disable the existing public key from remote WAFT test system.

Parameters:
  • sftp (SFTPClient) – Remote SFTP connection

  • filepath (PurePath) – Target authorized keys path

classmethod init_last_key()

Capture existing key for rotation.

classmethod init_path() Path

Initialize key path.

Returns:

WAFT key directory

Return type:

Path

old_key = ''
static read_key() str

Read the existing public key.

Returns:

WAFT public key

Return type:

str

write_key(sftp: SFTPClient, filepath: PurePosixPath)

Write the new public key to remote WAFT test system.

Parameters:
  • sftp (SFTPClient) – Remote SFTP connection

  • filepath (PurePath) – Target authorized keys path

waft.cli.keys.deploy()

Deploy existing SSH key to WAFT test system(s).

waft.cli.keys.disable()

Disable existing SSH key for WAFT test system(s).

waft.cli.keys.generate()

Generate new SSH key, deploy, and/or rotate to WAFT test system(s).