Skip to content

Hide/mask/scrub secrets/passwords in logs #9339

@lqkallas

Description

@lqkallas

🚀 Feature Proposal

Passwords and other secrets sent by sendKeys variants are seen in plaintext in the logs. It would be nice to be able to prevent that for example by providing an additional parameter to sendKeys function as done in Appium, FR appium/appium#7622, PR appium/appium-support#180.

I wonder if it’s technically possible to hide in the headers and body of responses as well as printing to standart output.

Motivation

As a developer, I would like to know that the data in Selenium logs does not expose secrets that can be used to harm my company in case an attacker would take over an account.

Example

Example given, if my tests requires me to have a secret as part of it – in a best case, a session token; in a worse case, credentials to an application – I would like to be sure it can not be retrieved from Selenium logs.

For that, I would like to have a way to tell Selenium that I want to mask or redact logging particular data in logs. For example, providing a regex to change QC123456789 in the logs to QC*********.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-gridEverything grid and server relatedC-javaJava BindingsI-enhancementSomething could be better

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions