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

Python Gmp. delete_scanner() API always fails with 404 #1063

Open
bwittmeyer opened this issue Aug 23, 2023 · 0 comments
Open

Python Gmp. delete_scanner() API always fails with 404 #1063

bwittmeyer opened this issue Aug 23, 2023 · 0 comments

Comments

@bwittmeyer
Copy link

The Python Gmp. delete_scanner() API always returns 404 when deleting a OSP-Sensor instance.
This is either a python-gvm API bug for not sending the correct command to GVMD or a GVMD bug for not implementing the delete_scanner request correctly.

Expected behavior

OSP-Scanner deleted the same as if gvmd --delete-scanner was invoked

Current behavior

gmp.delete_scanner() failed: Response Error 404. Failed to find scanner '4693f870-774e-4441-bde5-b694ace9c887'

Steps to reproduce

  1. create certificates for scanner docker-compose exec -u gvmd gvmd gvm-manage-certs -a -q -f
  2. create OSP-Sensor with:
    docker-compose $OPTIONS exec -u gvmd gvmd gvmd --create-scanner=TEST
    --scanner-host=hostname
    --scanner-port=9390
    --scanner-type=OSP-Sensor
    --scanner-ca-pub=/var/lib/gvm/CA/cacert.pem
    --scanner-key-pub=/var/lib/gvm/CA/clientcert.pem
    --scanner-key-priv=/var/lib/gvm/private/CA/clientkey.pem
  3. get the scanner id:
    docker-compose $OPTIONS exec -u gvmd gvmd --get-scanners | grep OSP-Sensor
    5 delete the scanner id reported in step 4 with the following command:
    docker compose $OPTIONS run -it --rm -v $PWD:$PWD -w $PWD gvm-tools socket $PWD/delete-fails.py --scanner_id=XXX

GVM versions

gsa: (gsad --version)
22.5.3
gvm: (gvmd --version)
22.6.0
openvas-scanner: (openvassd --version)
22.5.3
gvm-libs:
22.6.3
gvm-tools: (gvm-cli --version)
23.4.0
delete-fails.py,txt

Environment

Operating system:
Rocky Linux
Installation method / source: (packages, source installation)
docker containers/source

Logfiles

greenbone-community-scanner-gvmd-1 | event scanner:MESSAGE:2023-08-23 18h45.40 UTC:2546: Scanner TEST(4693f870-774e-4441-bde5-b694ace9c887) could not be deleted by XXXX

Script to reproduce the bug: rename to delete-fails.py to be able to use it.
delete-fails.py,txt

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

No branches or pull requests

1 participant