Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-62820] Ability to hide credential usage in job output #924

Merged
merged 5 commits into from
Jul 3, 2020
Merged

[JENKINS-62820] Ability to hide credential usage in job output #924

merged 5 commits into from
Jul 3, 2020

Conversation

bartdevriendt
Copy link
Contributor

@bartdevriendt bartdevriendt commented Jun 26, 2020

JENKINS-62820 - add ability to hide credenital use in job output

In our company we are using git plugin to checkout git repositories with centrally managed credentials. Pipeline users should not know which credentials are being used to not give them the opportunity to use this credentials in a withCredentials block and bypass certain 4-eyes principles that are in place. Therefore we would like to introduce the possibility to add a global option to hide the output of credential usage in the job log.

Checklist

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • I have interactively tested my changes

Types of changes

  • New feature (non-breaking change which adds functionality)

Further comments

Not applicable

@bartdevriendt
Copy link
Contributor Author

Build only fails on windows nodes, with I guess timeouts. Is there a way to trigger build again without pushing dummy commits to the branch ?

@bartdevriendt
Copy link
Contributor Author

I cannot find the artifacts to download the hpi to test interactively ?

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Would you consider the comments that I've added.

src/main/java/hudson/plugins/git/GitSCM.java Outdated Show resolved Hide resolved
src/main/resources/hudson/plugins/git/GitSCM/global.jelly Outdated Show resolved Hide resolved
src/test/java/hudson/plugins/git/GitSCMTest.java Outdated Show resolved Hide resolved
@MarkEWaite
Copy link
Contributor

MarkEWaite commented Jun 29, 2020

I cannot find the artifacts to download the hpi to test interactively ?

I can't find downloadable artifacts either. I'm confident they were available previously, but they may now be deployed as incremental builds to the artifact repository.

I don't see them in the incremental builds in the artifact repository either.

README.adoc Outdated Show resolved Hide resolved
@MarkEWaite
Copy link
Contributor

I'm surprised that this change is sufficient for your requirements. This change does not alter the git client plugin output which reports:

Using GIT_SSH to set credentials Description of my credential

Is it enough to hide only the credential ID or do you also want to hide the disagnostic message in the build log that shows the description of the credential?

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Requesting changes to remind me not to merge until it is understood why it is enough to suppress the credentials ID but not necessary to suppress the credential description.

I confirmed with interactive testing that it behaves as expected.

@bartdevriendt
Copy link
Contributor Author

Requesting changes to remind me not to merge until it is understood why it is enough to suppress the credentials ID but not necessary to suppress the credential description.

I confirmed with interactive testing that it behaves as expected.

For us it is not necessary to hide the description. The most important thing is users cannot get the credential id to further use it in withCredentials blocks.

@MarkEWaite MarkEWaite merged commit 06d8a41 into jenkinsci:master Jul 3, 2020
@MarkEWaite MarkEWaite added the enhancement Improvement or new feature label Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants