Feature request: Support Robot Framework Secret type
Robot Framework 7.4 introduced the new Secret type
(robot.api.types.Secret) to allow sensitive values to be passed between
keywords without exposing their content in logs.
Currently SSHLibrary keywords do not support Secret objects directly.
Affected keywords:
- Open Connection
- Login
- Login With Public Key
Example:
*** Variables ***
${HOST} ${Secret}
${USERNAME} ${Secret}
${PASSWORD} ${Secret}
*** Test Cases ***
SSH login using secrets
Open Connection ${HOST}
Login ${USERNAME} ${PASSWORD}
Expected behavior:
SSHLibrary should accept robot.api.types.Secret arguments and internally
use the secret value while keeping the value protected from Robot Framework
logging.
Current workaround:
Users must unwrap the secret manually:
Open Connection ${HOST.value}
Login ${USERNAME.value} ${PASSWORD.value}
This removes the Secret object protection and exposes the value as a normal
string.
Possible implementation:
Update keyword argument handling to support:
from robot.api.types import Secret
or:
Example:
def login(username: Secret, password: Secret):
username = username.value
password = password.value
# existing login implementation
This would make SSHLibrary compatible with the new Robot Framework secret
handling mechanism.
Feature request: Support Robot Framework Secret type
Robot Framework 7.4 introduced the new Secret type
(robot.api.types.Secret) to allow sensitive values to be passed between
keywords without exposing their content in logs.
Currently SSHLibrary keywords do not support Secret objects directly.
Affected keywords:
Example:
*** Variables ***
${HOST} ${Secret}
${USERNAME} ${Secret}
${PASSWORD} ${Secret}
*** Test Cases ***
SSH login using secrets
Open Connection ${HOST}
Login ${USERNAME} ${PASSWORD}
Expected behavior:
SSHLibrary should accept robot.api.types.Secret arguments and internally
use the secret value while keeping the value protected from Robot Framework
logging.
Current workaround:
Users must unwrap the secret manually:
This removes the Secret object protection and exposes the value as a normal
string.
Possible implementation:
Update keyword argument handling to support:
or:
Example:
This would make SSHLibrary compatible with the new Robot Framework secret
handling mechanism.