Supported Operations

The plugin follows the standard discovery-plugin CLI contract.

Command

Purpose

info

Emits plugin metadata (id, version, description, contact).

schema

Emits the JSON schema for the configuration.

uischema

Emits UI rendering hints (field order, password widget, help text).

test

Validates the config and verifies connectivity/auth against /v2.0/cluster/.

scan

Runs all discovery routines and emits scan results plus a state record.

./nutanix-pe-plugin info
./nutanix-pe-plugin schema
./nutanix-pe-plugin uischema
./nutanix-pe-plugin test --inputfile input.json --outputfile test-result.json
./nutanix-pe-plugin scan --inputfile input.json --outputfile scan-result.json

APIs Scanned

The plugin scans 15 distinct API endpoints across v1 and v2.0 PrismGateway:

#

API endpoint

API

Asset (s) Produced

1

TLS handshake against the Prism endpoint

TLS

cert (tls-server-certificate)

2

/PrismGateway/services/rest/v1/keys/ca_chain (fallback /v1/keys/pem)

v1

cert (ca-chain) / secret(metadata)

3

/v2.0/data_at_rest_encryption_certificates/ca_certificates/

v2

cert (dare-ca)

4

/v2.0/cluster/public_keys

v2

pubkey (cluster SSH public key)

5

/v2.0/authconfig/client_auth/

v2

cert / secret (mTLS client auth)

6

/v2.0/key_management_servers/

v2

secret (KMS configuration)

7

/v2.0/data_at_rest_encryption_certificates/csrs

v2

secret (pending DARE CSR)

8

/v2.0/snmp/users

v2

secret (SNMPv3 auth/priv keys)

9

/v2.0/data_at_rest_encryption/

v2

secret (encryption posture)

10

/v1/vfilers/ and /v1/vfilers/{id}/ssl_certificate

v1

cert/secret (file server SSL)

11

/v2.0/authconfig/ and /v2.0/authconfig/directories/

v2

secret (auth config, LDAP directories)

12

/v1/keys/certificate

v1

cert (full SSL certificate PEM)

13

/v2.0/remote_sites/

v2

secret (DR replication sites)

14

/v1/http_proxies/

v1

secret/cert (HTTP proxy config)

15

/v2.0/cluster/syslog_config

v2

secret/cert (syslog TLS certs)

API Endpoint Reference

Endpoint definitions live in api_endpoints.go. All endpoints require HTTP Basic Auth and HTTPS.

Output

All results are written as newline-separated JSON documents (one per line). Each scan document is a formatter-produced asset record; a final state document carries lastScanDate. Certificate assets include a cert_pem field (base64 DER body, no embedded newlines) from which PEM-intrinsic metadata (subject, issuer, validity, serial) is derived rather than duplicated in extra.

Full vs Incremental Scans

The plugin does not support incremental scanning because Prism Element APIs lack modification timestamps and filtering capabilities. Each scan performs a full reconciliation of the cluster's cryptographic assets. The state field is present for framework compatibility.

Building & Testing

make build        # build the plugin binary
make test         # run unit + integration tests
make docker       # build the plugin container image

Unit and integration tests exercise all CLI commands. Integration tests use a mock Prism Element server built with httptest.NewTLSServer.

References