Skip to content

Redact registry auth token from swarm-rafttool#2501

Merged
anshulpundir merged 1 commit into
moby:masterfrom
dperny:redact-registry-auth
Feb 12, 2018
Merged

Redact registry auth token from swarm-rafttool#2501
anshulpundir merged 1 commit into
moby:masterfrom
dperny:redact-registry-auth

Conversation

@dperny
Copy link
Copy Markdown
Collaborator

@dperny dperny commented Feb 5, 2018

When I added the --redact flag for swarm-rafttool, I forgot to include the registry auth token as sensitive data to be redacted, so it was present in redacted raft dumps. This replaces it with a redaction.

@anshulpundir
Copy link
Copy Markdown
Contributor

This is not blocking, but we should probably add a unit-test at some point.

if task != nil {
if container := task.Spec.GetContainer(); container != nil {
container.Env = []string{"ENVVARS REDACTED"}
container.PullOptions.RegistryAuth = "REDACTED"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dperny don't we need to check for container.PullOptions to be nil?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

When I added the --redact flag for swarm-rafttool, I forgot to include
the registry auth token as sensitive data to be redacted, so it was
present in redacted raft dumps. This replaces it with a redaction.

Signed-off-by: Drew Erny <drew.erny@docker.com>
@dperny dperny force-pushed the redact-registry-auth branch from 0ed9c00 to 8fbde78 Compare February 12, 2018 19:23
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2018

Codecov Report

Merging #2501 into master will increase coverage by 0.21%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #2501      +/-   ##
==========================================
+ Coverage   61.33%   61.54%   +0.21%     
==========================================
  Files         133      129       -4     
  Lines       21714    21331     -383     
==========================================
- Hits        13318    13128     -190     
+ Misses       6965     6794     -171     
+ Partials     1431     1409      -22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants