Skip to content

Mask secrets #310

@tomasbjerre

Description

@tomasbjerre

I configured logging like this:

gitLabApi.withRequestResponseLogging(
        new Logger(MyClass.class.getName(), null) {
          @Override
          public void log(final LogRecord record) {
            myLogger.log(record.getLevel(), record.getMessage());
          }
        },
        Level.FINE);

And in my log I got:

...
1 > PRIVATE-TOKEN: token-in-clear-text
...

It might be a good idea to mask secrets in this lib. I am now masking the token in my user code. But it is very likely that a user does not notice that the secret is there in clear text in the log.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions