tenable / pyTenable

Python Library for interfacing into Tenable's platform APIs
https://pytenable.readthedocs.io
MIT License
350 stars 173 forks source link

Issue with sc.credential.create function due to vault_use_ssl field #761

Closed darwin3md closed 3 months ago

darwin3md commented 7 months ago

Description When attempting to create a cyberark credential, I cannot successfully create it due to the vault_use_ssl field. The field is supposedly optional and defaults to 'True.' However, when I create the credential without passing that specific field, I get an error stating "The vault_use_ssl field is invalid for Credential type 'database'." When I create it by setting the field to True or "True" or "Yes", I get the same error message.

To Reproduce Steps to reproduce the behavior:

  1. Login and authenticate
  2. Call sc.credential.create('testingCreation', 'database','cyberark',**kw)

Expected behavior I should be able to create the credential with or without the vault_use_ssl field.

Screenshots Please see case #01783791 in Tenable Community for an attachment with code snippets.

System Information:

Additional context I can successfully create a database credential with the auth_type of 'password' and I can call other functions such as sc.credentials.detail(id) without any problems.

aseemsavio commented 7 months ago

The field vault_use_ssl is only accepted when the auth type is "cyberarkLegacy", and it's not accepted when the same is "cyberark". Also vault_use_ssl is a "yes" or "no" String, and not a boolean string. These will be fixed in the coming release in pyTenable.

The SC team will address the inconsistencies in the SC documentation regarding vault_use_ssl shortly.