Applications
- async add(self, app_name: str, description: str = '', location: str = '\\', access_from: int = None, access_to: int = None, expiration: str = None, disabled: bool = None, owner_first_name: str = '', owner_last_name: str = '', owner_email: str = None, owner_phone: str = '')
Create a new application
- Parameters:
app_name – Name of the application (“AppID”) - Required
description – Description - Optional
location – Location - Defaults to - Optional
access_from – The start hour that access is permitted to the application. - Defaults to None - Optional
access_to – The end hour that access is permitted to the application. - Defaults to None - Optional
expiration – The date when the application expires (format mm-dd-yyyy) - Defaults to None - Optional
disabled – Whether the application is disabled (True / False) - Defaults to None (False) - Optional
owner_first_name – Product Owner first name - Defaults to empty - Optional
owner_last_name – Product Owner last name - Defaults to empty - Optional
owner_email – Product Owner email - Defaults to empty - Optional
owner_phone – Product Owner phone - Defaults to empty - Optional
- Returns:
True if created
- async delete(self, app_name: str)
Delete an application
- Parameters:
app_name – The application name (AppID)
- Returns:
True if deleted
- async details(self, app_name: str)
Get application details
- Parameters:
app_name – The application name (AppID)
- Returns:
A dict with the application information
- async search(self, search: str)
Search applications by name
- Parameters:
search – free text to search application
- Returns:
list of application names
- async add_authentication(self, app_name: str, path: str = None, hash_string: str = None, os_user: str = None, address: str = None, serial_number: str = None, issuer: list = None, subject: list = None, subject_alternative_name: list = None, is_folder: bool = False, allow_internal_scripts: bool = False, comment: str = '') bool
Add one or more authentication methods to a given app_id with a named param
- Parameters:
app_name – the name of the application
path – path to authenticated
hash_string – hash of script / binary
os_user – os user that is running the script / binary
address – IP address
serial_number – certificate serial number
issuer – list of certificate issuer (PVWA >= 11.4)
subject – list of certificate subject (PVWA >= 11.4)
subject_alternative_name – list of certificate SAN (eg [“DNS Name=www.example.com”,”IP Address=1.2.3.4”])
allow_internal_scripts – relevant for path authentication only (False by default)
is_folder – relevant for path authentication only (False by default)
comment – relevant for hash and certificate serial number
- Returns:
boolean telling whether the application was updated or not
- async get_authentication(self, app_name: str) list
Get authenticated methods for an application
- Parameters:
app_name – The name of the application
- Returns:
a list of authentication methods