WebSDK API

class WebSDK(host, username, password, token=None, application_id=None, scope=None, refresh_token=None, proxies=None, certificate_path=None, key_file_path=None, verify_ssl=False, connection_timeout=None, read_timeout=None)

Bases: object

Initializes a WebSDK session via username/password. Certificate authentication is not currently supported. Re-authentication occurs automatically when the API Key becomes invalidated. When initialized, all endpoints are also initialized.

Authenticates the given user to WebSDK. The only supported method for authentication at this time is with a username and password. Either an OAuth bearer token can be obtained, which requires both an Application ID and scope to be supplied, or the X-Venafi-API-Key can be obtained, which has been deprecated since TPP version 20.1.

Using the OAuth authentication method requires an API Application Integration to be created that defines the maximum possible scope and the users/groups that are authorized to use that scope. That can be accomplished through Aperture. The scope parameter simply has to define the subset of allowed scopes defined by that application.

Parameters
  • host (str) – Hostname or IP Address of TPP

  • username (str) – Username

  • password (str) – Password

  • token (str) – OAuth Access Bearer Token

  • application_id (str) – Application ID of the OAuth API Application Integration. Must supply scope.

  • scope (Union[Scope, str]) – Scope of the OAuth API Application Integration to be used. Must supply application_id.

  • proxies (dict) – An OrderedDict used by the python Requests library.

  • certificate_path (str) – Absolute path to the public certificate file.

  • key_file_path (str) – Absolute path to the private key file.

  • verify_ssl (bool) – If True, verify the SSL certificate of the target endpoints.

  • connection_timeout (float) – Timeout in seconds to establish a connection to the API service.

  • read_timeout (float) – Timeout in seconds between each byte received from the server.

  • refresh_token (str) –

re_authenticate()

Performs a re-authentication using the same parameters used to authorize initially.

property tpp_version