Pivotal Greenplum record

/api/2.0/fo/auth/greenplum/

[POST]

List, create, update, and delete Pivotal Greenplum records for authenticated scans of Pivotal Greenplum 5.x and 6.x instances running on Unix. Compliance scans are supported (using PC).

Input Parameters

Parameter

Description

action={action}

(Required) Specify create, update, delete (using POST) or list (using GET or POST).

details={value}

(Optional) Default value is Basic. You can choose from None, Basic, and All.

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 only for 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.

Greenplum

 

greenplum_unix_conf_file={value}

 

(Required for create request) The full path to the configuration file (postgresql.conf) on your Unix assets (IP addresses). The file must be in the same location on all assets for this record.

greenplum_db_name={value}

(Required for create request) The database instance you want to authenticate to.

port={value}

(Optional) The port where the database instance is running. Default is 5432.

ssl_verify={0|1}

(Optional) 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.

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 Greenplum 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 Greenplum account to be used for authentication. Maximum 100 characters (ascii).

login_type={value}

(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. See “Vault Definition” in the API user guide.

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. See “Vault Support Matrix” in the API user guide.

Keys, Passphrase

 

client_key_type={value}

(Optional) Client key type basic (default) or vault.

client_key={value}

(Optional if client_key_type=basic) Client key content, if private key not in vault.

client_key_vault_type={value}

(Required if client_key_type=vault) The third party vault to be used to retrieve the private key. Certain vaults support this capability. See “Vault Support Matrix” in the API user guide.

client_key_vault_id={value}

(Required if client_key_type=vault) The ID of the vault to get the private key from.

passphrase_type={value}

 (Optional) Passphrase type can be basic (default) or vault.

passphrase={value}

(Optional if passphrase_type=basic) The passphrase value.

client_cert={value}

 (Optional if passphrase_type=basic) The passphrase certificate content.

passphrase_vault_type= {value}

(Required if passphrase_type=vault) The vault where the private key passphrase is stored. For example CA Access Control, CyberArk AIM, Thycotic Secret Server.

passphrase_vault_id= {value}

(Required if passphrase_type=vault) The ID of the vault to get the passphrase from.

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 only when the networks feature is enabled) The network ID for the record.

 

Sample: List all record types

API request

curl -u "USERNAME:PASSWORD" -H 'X-Requested-With:curl' -d

"action=list" "https://qualysapi.qualys.com/api/2.0/fo/auth/"

XML output

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE AUTH_RECORDS_OUTPUT SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/auth/auth_records.dtd">

<AUTH_RECORDS_OUTPUT>

  <RESPONSE>

    <DATETIME>2019-10-04T09:24:19Z</DATETIME>

    <AUTH_RECORDS>

      <AUTH_UNIX_IDS>

        <ID_SET>

          <ID>1029116</ID>

          <ID>1296290</ID>

          <ID_RANGE>1375563-1375564</ID_RANGE>

          <ID>1505926</ID>

        </ID_SET>

      </AUTH_UNIX_IDS>

      <AUTH_GREENPLUM_IDS>

        <ID_SET>

          <ID>1505929</ID>

        </ID_SET>

      </AUTH_GREENPLUM_IDS>

    </AUTH_RECORDS>

  </RESPONSE>

</AUTH_RECORDS_OUTPUT>

Sample - List Greenplum Records with All Details

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/greenplum/"

 

XML output

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE AUTH_GREENPLUM_LIST_OUTPUT SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/auth/greenplum/auth_greenplum_list_output.dtd">

<AUTH_GREENPLUM_LIST_OUTPUT>

    <RESPONSE>

        <DATETIME>2020-01-05T11:41:28Z</DATETIME>

        <AUTH_GREENPLUM_LIST>

            <AUTH_GREENPLUM>

                <ID>66186</ID>

                <TITLE>

                    <![CDATA[greenplum auth]]>

                </TITLE>

                <USERNAME>

                    <![CDATA[root]]>

                </USERNAME>

                <DATABASE>

                    <![CDATA[postgres]]>

                </DATABASE>

                <PORT>5432</PORT>

                <SSL_VERIFY>

                    <![CDATA[0]]>

                </SSL_VERIFY>

                <IP_SET>

                    <IP>10.20.32.111</IP>

                </IP_SET>

                <UNIX_CONF_FILE>

                    <![CDATA[/usr/local/greenplum-db/master/gpseg-1/postgresql.conf]]>

                </UNIX_CONF_FILE>

                <NETWORK_ID>0</NETWORK_ID>

                <CREATED>

                    <DATETIME>2019-12-31T10:51:10Z</DATETIME>

                    <BY>qualys_jd</BY>

                </CREATED>

                <LAST_MODIFIED>

                    <DATETIME>2019-12-31T10:51:10Z</DATETIME>

                </LAST_MODIFIED>

            </AUTH_GREENPLUM>

            <AUTH_GREENPLUM>

                <ID>66390</ID>

                <TITLE>

                    <![CDATA[my greenplum record]]>

                </TITLE>

                <USERNAME>

                    <![CDATA[root]]>

                </USERNAME>

                <DATABASE>

                    <![CDATA[postgres]]>

                </DATABASE>

                <PORT>5432</PORT>

                <SSL_VERIFY>

                    <![CDATA[0]]>

                </SSL_VERIFY>

                <IP_SET>

                    <IP>10.10.10.1</IP>

                </IP_SET>

                <UNIX_CONF_FILE>

                    <![CDATA[ /var/lib/pgsql/data/postgresql.conf]]>

                </UNIX_CONF_FILE>

                <NETWORK_ID>0</NETWORK_ID>

                <CREATED>

                    <DATETIME>2020-01-05T09:14:54Z</DATETIME>

                    <BY>qualys_jd</BY>

                </CREATED>

                <LAST_MODIFIED>

                    <DATETIME>2020-01-05T09:14:54Z</DATETIME>

                </LAST_MODIFIED>

            </AUTH_GREENPLUM>

        </AUTH_GREENPLUM_LIST>

        <GLOSSARY>

            <USER_LIST>

                <USER>

                    <USER_LOGIN>qualys_jd</USER_LOGIN>

                    <FIRST_NAME>John</FIRST_NAME>

                    <LAST_NAME>Doe</LAST_NAME>

                </USER>

            </USER_LIST>

        </GLOSSARY>

    </RESPONSE>

</AUTH_GREENPLUM_LIST_OUTPUT>

Sample - Create Greenplum Record

API request

curl -u "USERNAME:PASSWORD" -H 'X-Requested-With: curl' -d

"action=create&title=my greenplum record&ips=10.10.10.1&username=root&password=root&greenplum_db_name=postgres&port=5421&greenplum_unix_conf_path=/tmp/postgresql.conf"

"https://qualysapi.qualys.com/api/2.0/fo/auth/greenplum/"

 

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>2020-01-05T12:04:32Z</DATETIME>

        <BATCH_LIST>

            <BATCH>

                <TEXT>Successfully Created</TEXT>

                <ID_SET>

                    <ID>66391</ID>

                </ID_SET>

            </BATCH>

        </BATCH_LIST>

    </RESPONSE>

</BATCH_RETURN>

Sample - Update Greenplum Record

API request

curl -u "USERNAME:PASSWORD" -H 'X-Requested-With: curl' -d

"action=update&ids=66391&title=my greenplum record&comments=new comment"

"https://qualysapi.qualys.com/api/2.0/fo/auth/greenplum/"

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>2020-01-05T12:09:25Z</DATETIME>

        <BATCH_LIST>

            <BATCH>

                <TEXT>Successfully Updated</TEXT>

                <ID_SET>

                    <ID>66391</ID>

                </ID_SET>

            </BATCH>

        </BATCH_LIST>

    </RESPONSE>

</BATCH_RETURN>

Sample - Delete Greenplum Records

API request to update basic information

curl -u "USERNAME:PASSWORD" -H 'X-Requested-With: curl' -d

"action=delete&ids=66391"

"https://qualysapi.qualys.com/api/2.0/fo/auth/greenplum/"

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>2020-01-05T12:10:16Z</DATETIME>

        <BATCH_LIST>

            <BATCH>

                <TEXT>Successfully Deleted</TEXT>

                <ID_SET>

                    <ID>66391</ID>

                </ID_SET>

            </BATCH>

        </BATCH_LIST>

    </RESPONSE>

</BATCH_RETURN>

DTDs for auth type "greenplum"

<platform API server>/api/2.0/fo/auth/auth_records.dtd

<platform API server>/api/2.0/fo/auth/greenplum/auth_greenplum_list_output.dtd