/api/2.0/fo/auth/sap_hana/
[POST]
The SAP Hana API lets you list, create, update and delete SAP Hana authentication records for compliance scans (using PC or SCA). User permissions for this API are the same as other authentication record APIs.
Use these parameters to create or update SAP Hana authentication records.
Parameter |
Description |
action={action} |
(Required) Specify create, update, delete (using POST) or list (using GET or POST). See List Auth Records for type |
echo_request={0|1} |
(Optional) Specify 1 to view (echo) input parameters in the XML output. By default these are not included. |
ids={value} |
(Required to update or delete record) Record IDs to update/delete. Specify record IDs and/or ID ranges (for example, 1359-1407). Multiple entries are comma separated. |
title={value} |
(Required to create record) A title for the record. The title must be unique. Maximum 255 characters (ascii). |
comments={value} |
(Optional to create or update record) User defined comments. Maximum of 1999 characters. |
SAP Hana |
|
database={value} |
(Required for create request) The name of the database you want to authenticate to. |
port={value} |
(Required to create record) The port the database is running on. |
unix_conf_path={value} |
(Required for create request when this record will be used for scanning Unix hosts) The SAP Hana configuration path on Unix hosts (up to 255 multi-byte characters). |
ssl_verify={0|1} |
(Optional to create or update record) SSL verification is skipped by default. Set to 1 if you want to verify the server’s certificate is valid and trusted. |
hosts={value} |
(Required if ssl_verify=1) A list of FQDNs for all host IP addresses on which a custom SSL certificate signed by a trusted root CA is installed. Multiple hosts are comma separated. |
Login Credentials |
|
username={value} |
(Required for create request) The username of the account to be used for authentication. If password is specified this is the username of a SAP Hana account. If login_type=vault is specified, this is the username of a vault account. Maximum 255 characters (ascii). |
password={value} |
(For create request, password or login_type=vault is required) The password of the SAP Hana account to be used for authentication. Maximum 100 characters (ascii). |
password_encryption={0|1} |
(Optional to create or update record) Enable this option when your database instance requires an encrypted password for successful login. If password encryption is required and you do not enable this option then authentication will fail. When set to 1, password encryption is enabled in the record. When set to 0 (the default), password encryption is not enabled. |
Vault |
|
login_type={basic|vault} |
(For create request, password or login_type=vault is required) Login type can be basic (default) or vault. Set to vault if a third party vault will be used to retrieve the password. Vault parameters need to be provided in the record. |
vault_id={value} |
(Required if login_type=vault) The ID of the vault to be used to retrieve the password for login. |
vault_type={value} |
(Required if login_type=vault) The third party vault to be used to retrieve the password for login. Certain vaults support this capability. |
{vault parameters} |
(Required only when action=create and login_type=vault) Vault specific parameters required depend on the vault type you've selected. See Vault Parameters |
Target Hosts |
|
ips={value} |
(Required to create record) The IP address(es) the server will log into using the record’s credentials. Multiple entries are comma separated. (Optional to update record) IPs specified will overwrite existing IPs in the record, and existing IPs will be removed. This parameter and the add_ips parameter or the remove_ips parameter cannot be specified in the same request. |
add_ips={value} |
(Optional to update record) Add IPs and/or ranges to the IPs list for this record. Multiple IPs/ranges are comma separated. This parameter and the ips parameter cannot be specified in the same request. |
remove_ips={value} |
(Optional to update record) IPs to be removed from your record. You may enter a combination of IPs and ranges. Multiple entries are comma separated. This parameter and the ips parameter cannot be specified in the same request. |
network_id={value} |
(Optional to create or update record, and valid when the networks feature is enabled) The network ID for the record. |
API request
curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -d
"action=create&title=sap_hana_API&username=root&password=root&database=sapDb&port=39013&ips=1.1.1.1&ssl_verify=1&hosts=test.domain.com&unix_conf_path=/etc/saphana.conf&password_encryption=1"
"https://qualysapi.qualys.com/api/2.0/fo/auth/sap_hana/"
XML output
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/batch_return.dtd">
<BATCH_RETURN>
<RESPONSE>
<DATETIME>2021-01-12T14:39:46Z</DATETIME>
<BATCH_LIST>
<BATCH>
<TEXT>Successfully Created</TEXT>
<ID_SET>
<ID>4474043</ID>
</ID_SET>
</BATCH>
</BATCH_LIST>
</RESPONSE>
</BATCH_RETURN>
API request
curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -d
"action=update&ids=4474043&comments=update1"
"https://qualysapi.qualys.com/api/2.0/fo/auth/sap_hana/"
XML output
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/batch_return.dtd">
<BATCH_RETURN>
<RESPONSE>
<DATETIME>2021-01-12T14:45:58Z</DATETIME>
<BATCH_LIST>
<BATCH>
<TEXT>Successfully Updated</TEXT>
<ID_SET>
<ID>4474043</ID>
</ID_SET>
</BATCH>
</BATCH_LIST>
</RESPONSE>
</BATCH_RETURN>
Use these parameters to list SAP Hana authentication records.
Parameter |
Description |
action={action} |
(Required) Specify list (using GET or POST) to list records. |
details={value} |
(Optional) Default value is Basic. You can choose from None, Basic, and All. |
ids={value} |
(Optional) SAP HANA auth record IDs to list. Specify record IDs and/or ID ranges (for example, 1359-1407). Multiple entries are comma separated. |
API request
curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -d
"action=list&details=All"
"https://qualysapi.qualys.com/api/2.0/fo/auth/sap_hana/"
XML output
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE AUTH_SAP_HANA_LIST_OUTPUT SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/auth/sap_hana/auth_sap_hana_list_output.dtd">
<AUTH_SAP_HANA_LIST_OUTPUT>
<RESPONSE>
<DATETIME>2021-01-12T14:34:42Z</DATETIME>
<AUTH_SAP_HANA_LIST>
<AUTH_SAP_HANA>
<ID>4474042</ID>
<TITLE><![CDATA[SAP_HANA]]></TITLE>
<USERNAME><![CDATA[SYSTEM]]></USERNAME>
<DATABASE><![CDATA[SYSTEMDB]]></DATABASE>
<PORT>39013</PORT>
<SSL_VERIFY><![CDATA[1]]></SSL_VERIFY>
<HOSTS>
<HOST><![CDATA[host.domain1]]></HOST>
</HOSTS>
<IP_SET>
<IP>10.11.70.185</IP>
</IP_SET>
<UNIX_CONF_PATH><![CDATA[/etc/saphana.conf]]></UNIX_CONF_PATH>
<PASSWORD_ENCRYPTION><![CDATA[1]]></PASSWORD_ENCRYPTION>
<LOGIN_TYPE><![CDATA[basic]]></LOGIN_TYPE>
<CREATED>
<DATETIME>2021-01-12T14:28:16Z</DATETIME>
<BY>joe_user</BY>
</CREATED>
<LAST_MODIFIED>
<DATETIME>2021-01-12T14:33:05Z</DATETIME>
</LAST_MODIFIED>
<COMMENTS><![CDATA[created successfully]]></COMMENTS>
</AUTH_SAP_HANA>
</AUTH_SAP_HANA_LIST>
<GLOSSARY>
<USER_LIST>
<USER>
<USER_LOGIN>joe_user</USER_LOGIN>
<FIRST_NAME>Joe</FIRST_NAME>
<LAST_NAME>User</LAST_NAME>
</USER>
</USER_LIST>
</GLOSSARY>
</RESPONSE>
</AUTH_SAP_HANA_LIST_OUTPUT>
Use the following parameter to delete one or more SAP Hana authentication records.
Parameter |
Description |
ids={value} |
(Required to delete record) SAP Hana auth record IDs to delete. Specify record IDs and/or ID ranges (for example, 1359-1407). Multiple entries are comma separated. |
API request
curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -d
"action=delete&ids=4474043"
"https://qualysapi.qualys.com/api/2.0/fo/auth/sap_hana/"
XML output
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/batch_return.dtd">
<BATCH_RETURN>
<RESPONSE>
<DATETIME>2021-01-12T14:48:56Z</DATETIME>
<BATCH_LIST>
<BATCH>
<TEXT>Successfully Deleted</TEXT>
<ID_SET>
<ID>4474043</ID>
</ID_SET>
</BATCH>
</BATCH_LIST>
</RESPONSE>
</BATCH_RETURN>
<platform API server>/api/2.0/batch_return.dtd
<platform API server>/api/2.0/fo/auth/sap_hana/auth_sap_hana_list_output.dtd