Tags for Marketplace-Launched OCI Instances
Retrieve metadata and configuration details for a Compute instance.
To retrieve metadata and configuration details for an OCI instance deployed using Marketplace, locate the instance in the Console by selecting Instances under Compute. Review its attributes such as instance OCID, shape, availability domain, compartment, and network configuration.
In the Tags section, examine both the defined tags and the system tags. Marketplace-deployed instances typically include oracle-tags.created-by, oracle-tags.created-on, and might contain listing-specific tags (for example, listing ID and listing version).
oci compute instance get --instance-id <INSTANCE_OCID>
This command returns the full instance payload, including system and defined tags. Alternatively, you can query the instance metadata service (IMDS) from within the instance using the following command:
curl -H "Authorization: Bearer Oracle" -L http://169.254.169.254/opc/v2/instance/
Combining this with the rest of the instance metadata provides more information around instance ID.
Automated Verification
The automated use of APIs is supported for access and validation of the instance. Use the following IAM policy to grant access to the user group that's using Marketplace:
Allow group UserGroup to manage marketplace-attested-metadata in tenancy
To automatically verify that the instance is a marketplace listing and to access a signed JWT token that can be used to validate the instance, use the following CLI command:
oci marketplace create-marketplace-external-attested-metadata-details create-marketplace-external-attested-metadata --instance-id <instance_OCID> --compartment-id <instance_compartment_OCID>
To fetch the public key used to decrypt the JWT token, use the following CLI command:
oci marketplace marketplace-metadata-public-key-summary list-marketplace-metadata-public-keys