Page 1 of 1

Problem using the Ansible API since upgrading to WAPT 2.5

Published: Dec 18, 2024 - 3:26 PM
by fobrien
Good morning,

I am posting this message because since the upgrade to version 2.5 of WAPT, we have been experiencing problems using the Ansible API.
Indeed, we have seen that since this version, a certificate must be used.
We have therefore associated a certificate with the account historically used on the server, but the problem persists with the following error message:
401 Unauthorized
Are there other things to check?

Thanks in advance.

Fred

Re: Problem using the Ansible API since upgrading to WAPT 2.5

Published: Dec 19, 2024 - 7:06 PM
by dcardon
Hi Frédéric,

could you specify which call you're making from Ansible, and which API URL you're calling?

Authentication is now required to retrieve a session cookie. You can see a code example here [1]. It contains the necessary Python code for authentication using the `waptlicences.waptserver_login()` function, which allows you to retrieve an authenticated session.

Regards,

Denis


[1] https://github.com/sfonteneau/cyberwatc ... in/wapt.py

Re: Problem using the Ansible API since upgrading to WAPT 2.5

Published: January 16, 2025 - 5:27 PM
by dcardon
Hello Frédéric,

Happy New Year 2025!

Were you able to log in using the link I sent you?

Best regards,

Denis

Re: Problem using the Ansible API since upgrading to WAPT 2.5

Published: January 27, 2025 - 4:51 PM
by fobrien
Hi Denis,

Thanks for your reply.
I need to continue looking into it with my colleague and I'll keep you updated if the problem persists.

Fred