MarketSquare / MarketSquare/SSHLibrary

Support Robot Framework Secret type in SSHLibrary keywords

Open
#486 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Python
Stars
167
Forks
145
PR merge metrics
No merged PRs in 30d

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing argument handling for Open Connection, Login, and Login With Public Key in SSHLibrary and review how their existing implementations receive values. Verify the Robot Framework 7.4 Secret API, then exercise the example login flow with Secret arguments. Done means all three keywords accept Secret values while preserving protection from Robot Framework logging without manual .value unwrapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.