Support Robot Framework Secret type in SSHLibrary keywords
#486 opened on Jul 16, 2026
Repository metrics
- Stars
- (167 stars)
- PR merge metrics
- (PR metrics pending)
Description
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:
str | Secret
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.