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

Add sensor relays and OSP sensors #756

Merged
merged 19 commits into from
Sep 26, 2019

Conversation

timopollmeier
Copy link
Member

@timopollmeier timopollmeier commented Sep 24, 2019

This adds a way to replace connections to remote scanners with connections to relays and a new OSP sensor scanner type.

Checklist:

If a suitable relay mapper executable is given it will replace the
connection data of the scanner with that of a relay.
The new scanner type can be used to connect to ospd-openvas scanners,
optionally via a relay like GMP scanner.
Only scanners of type SCANNER_TYPE_GMP require a credential now.
Also, the error messages for missing elements are now more specific.
The credential can now be removed for types other than SCANNER_TYPE_GMP
and will be always be checked in case a scanner of a different type is
changed to SCANNER_TYPE_GMP.
This adds the option to the man page and logs all non-warning output
for it at the debug level.
@timopollmeier timopollmeier marked this pull request as ready for review September 24, 2019 14:08
Copy link
Contributor

@mattmundell mattmundell left a comment

Choose a reason for hiding this comment

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

Looks good. Neatly done.

src/manage.c Outdated Show resolved Hide resolved
src/manage.c Show resolved Hide resolved
src/manage_sql.c Show resolved Hide resolved
src/gvmd.c Outdated Show resolved Hide resolved
timopollmeier and others added 6 commits September 26, 2019 08:25
The new_ca_cert parameter is used for output, not input.

Co-Authored-By: Matt Mundell <32057441+mattmundell@users.noreply.github.com>
The cases for using a UNIX socket and a TCP port were reversed.
OSP scanners can now also provide a list of available system/performance
reports with the GET_PERFORMANCE command.
This does not yet include getting the actual graphs.
The GMP command get_system_reports can now get its reports from OSP
scanners, not just the a list of available ones.
@timopollmeier
Copy link
Member Author

In addition to the requested changes I've also added the use of OSP sensors for the get_system_reports command.

src/manage.c Show resolved Hide resolved
src/manage.c Show resolved Hide resolved
src/manage.c Outdated Show resolved Hide resolved
src/manage.c Outdated Show resolved Hide resolved
The scanner info string like the host and certificate have to be freed.
The get_slave_system_report_types and gmp_slave_system_report functions
will return -1 if slave is 0 because this should be checked before they
are called.
The doc of these functions now also no longer contains the unused return
values 2 and 3.
The comment is now put after the variable declaration.
@mattmundell mattmundell merged commit dbe3ac6 into greenbone:master Sep 26, 2019
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.

2 participants