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

Allow to add ssh elevate credential to target dialog and display elevate credential in details #2954

Merged
merged 11 commits into from
Jun 4, 2021

Conversation

saberlynx
Copy link
Contributor

@saberlynx saberlynx commented Jun 1, 2021

What:

  • Allow creating SSH elevate credentials if SSH credential is set
  • If we unset an SSH credential, the SSH elevate credential will be unset as well
  • If a target is in use, neither SSH nor SSH elevate credential will be editable
  • Can change SSH elevate credential if target is not in use
  • Show SSH elevate credentials in targets
  • Allow creating new SSH elevate credentials if target is not in use

Why:

How:

Checklist:

Visual confirmation. Will add tests in following PR.

  • Tests
  • CHANGELOG Entry
  • Labels for ports to other branches

@saberlynx saberlynx force-pushed the elevate-credentials-21.04 branch from 0588966 to f5b198a Compare June 1, 2021 13:42
@codecov
Copy link

codecov bot commented Jun 1, 2021

Codecov Report

Merging #2954 (be2f581) into gsa-21.04 (da7c00e) will decrease coverage by 0.03%.
The diff coverage is 12.50%.

Impacted file tree graph

@@              Coverage Diff              @@
##           gsa-21.04    #2954      +/-   ##
=============================================
- Coverage      53.84%   53.80%   -0.04%     
=============================================
  Files           1075     1075              
  Lines          26250    26269      +19     
  Branches        7506     7520      +14     
=============================================
+ Hits           14133    14135       +2     
- Misses         11000    11017      +17     
  Partials        1117     1117              
Impacted Files Coverage Δ
gsa/src/gmp/commands/targets.js 19.44% <0.00%> (-3.89%) ⬇️
gsa/src/gmp/models/target.js 100.00% <ø> (ø)
gsa/src/gmp/parser/cvss.js 100.00% <ø> (ø)
gsa/src/web/pages/results/detailspage.js 12.32% <0.00%> (ø)
gsa/src/web/pages/targets/component.js 2.45% <0.00%> (-0.07%) ⬇️
gsa/src/web/pages/targets/details.js 9.09% <0.00%> (-0.91%) ⬇️
gsa/src/web/pages/targets/dialog.js 19.23% <11.11%> (-0.22%) ⬇️
gsa/src/gmp/models/credential.js 96.66% <100.00%> (+0.05%) ⬆️
gsa/src/gmp/models/nvt.js 99.00% <100.00%> (ø)

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 58acb69...be2f581. Read the comment docs.

@saberlynx saberlynx force-pushed the elevate-credentials-21.04 branch 3 times, most recently from 3143f57 to cb8e54c Compare June 4, 2021 07:49
@saberlynx saberlynx changed the title Allow to add ssh elevate credential to target dialog Allow to add ssh elevate credential to target dialog and display elevate credential in details Jun 4, 2021
@saberlynx saberlynx force-pushed the elevate-credentials-21.04 branch from 5c65cb3 to aee9400 Compare June 4, 2021 08:17
@saberlynx saberlynx marked this pull request as ready for review June 4, 2021 08:17
@saberlynx saberlynx requested a review from a team as a code owner June 4, 2021 08:17
@@ -107,6 +118,10 @@ const NEW_SNMP = {
types: SNMP_CREDENTIAL_TYPES,
};

const ElevatePrivilegeText = styled(Layout)`
color: ${Theme.darkRed};
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, this should not be red. I talked about this with @bjoernricks and we realized that was an error in the mockup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will just regular black work?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes just use the standard black.

@saberlynx saberlynx requested a review from sarahd93 June 4, 2021 12:34
bjoernricks
bjoernricks previously approved these changes Jun 4, 2021
@saberlynx saberlynx force-pushed the elevate-credentials-21.04 branch from ea8ce7e to be2f581 Compare June 4, 2021 13:56
Copy link
Contributor

@sarahd93 sarahd93 left a comment

Choose a reason for hiding this comment

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

Awesome work, thank you!

@sarahd93 sarahd93 merged commit b1c1df5 into greenbone:gsa-21.04 Jun 4, 2021
@saberlynx saberlynx deleted the elevate-credentials-21.04 branch June 4, 2021 14:11
saberlynx added a commit that referenced this pull request Jun 5, 2021
Allow to add ssh elevate credential to target dialog and display elevate credential in details (backport #2954)
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