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

fix(scannercli): Pass temporary robot account credentials to scannercli #50

Merged
merged 3 commits into from
Jun 5, 2020
Merged

fix(scannercli): Pass temporary robot account credentials to scannercli #50

merged 3 commits into from
Jun 5, 2020

Conversation

danielpacak
Copy link
Contributor

Resolves: #37

Signed-off-by: Daniel Pacak [email protected]

@danielpacak danielpacak marked this pull request as draft May 8, 2020 13:55
Pass Robot Account credentials generated by Harbor for each scan
request through to the scannercli command as --registry-username
and --registry-password flags.

This feature is enabled by setting the value of the
SCANNER_CLI_OVERRIDE_REGISTRY_CREDENTIALS to true.

It has to be enable explicitly as not every version of scannercli
accepts the --registry-username and --registry-password flags.

Resolves: #37

Signed-off-by: Daniel Pacak <[email protected]>
@danielpacak danielpacak requested a review from simar7 May 8, 2020 16:08
@danielpacak danielpacak marked this pull request as ready for review May 8, 2020 16:08
Copy link
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

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

lgtm, there's a missing case that I added here f858b8d but am unable to push to this fork.

@danielpacak danielpacak added the do not merge Code is ready, but for some reason cannot be merged label May 21, 2020
@danielpacak
Copy link
Contributor Author

danielpacak commented May 21, 2020

Before merging we have to wait for the new release of scannercli , which supports --registry-username and --registry-password flags.

Also we'll have to explain that only newer versions of Aqua / scannercli do support Harbor with deployment security enabled. /cc @simar7

@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #50 into master will increase coverage by 4.88%.
The diff coverage is 97.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
+ Coverage   40.55%   45.43%   +4.88%     
==========================================
  Files          15       15              
  Lines         503      548      +45     
==========================================
+ Hits          204      249      +45     
  Misses        293      293              
  Partials        6        6              
Impacted Files Coverage Δ
pkg/etc/config.go 28.57% <ø> (ø)
pkg/scanner/adapter.go 90.90% <92.30%> (+5.19%) ⬆️
pkg/aqua/command.go 93.65% <100.00%> (+0.79%) ⬆️
pkg/harbor/model.go 60.00% <100.00%> (+60.00%) ⬆️
pkg/http/api/v1/handler.go 40.81% <0.00%> (+3.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3db793e...8f8f5be. Read the comment docs.

@danielpacak danielpacak removed the do not merge Code is ready, but for some reason cannot be merged label Jun 5, 2020
Signed-off-by: Daniel Pacak <[email protected]>
@danielpacak danielpacak merged commit 8a5503a into aquasecurity:master Jun 5, 2020
@danielpacak danielpacak deleted the fix/issue_37/use_tmp_robot_account_credentials branch June 5, 2020 12:47
danielpacak added a commit that referenced this pull request Jun 5, 2020
…li (#50)

Pass Robot Account credentials generated by Harbor for each scan
request through to the scannercli command as --robot-username
and --robot-password flags.

This feature is enabled by setting the value of the
SCANNER_CLI_OVERRIDE_REGISTRY_CREDENTIALS to true.

It has to be enable explicitly as not every version of scannercli
accepts the --robot-username and --robot-password flags.

Resolves: #37

Co-authored-by: Simarpreet Singh <[email protected]>
Signed-off-by: Daniel Pacak <[email protected]>
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.

Harbor integration fails when deployment security is enabled
2 participants