steampipe plugin install oci

Table: oci_certificates_management_certificate_version - Query OCI Certificates Management Certificate Versions using SQL

The Oracle Cloud Infrastructure (OCI) Certificates Management service helps you manage SSL/TLS certificates for your services. It provides a centralized way to upload and manage certificates, including the ability to monitor certificates for expiration. The Certificates Management service supports both Oracle-managed certificates and customer-managed certificates.

Table Usage Guide

The oci_certificates_management_certificate_version table provides insights into each version of a certificate in OCI Certificates Management. As a security administrator, you can explore certificate-specific details through this table, including certificate data, creation time, and associated metadata. Use it to uncover information about certificates, such as their validity period, the entities they are issued to, and the entities they are issued by.

Examples

Basic info

Explore the details of each certificate version in your Oracle Cloud Infrastructure, including its stages, validity, and revocation status. This can be useful in managing your certificates and ensuring they are up to date and secure.

select
certificate_id,
version_number,
stages,
serial_number,
issuer_ca_version_number,
version_name,
subject_alternative_names,
time_of_deletion,
validity,
revocation_status
from
oci_certificates_management_certificate_version;
select
certificate_id,
version_number,
stages,
serial_number,
issuer_ca_version_number,
version_name,
subject_alternative_names,
time_of_deletion,
validity,
revocation_status
from
oci_certificates_management_certificate_version;

Get all certificate versions

Discover the different versions of your certificates, including details such as stages, validity, and revocation status. This query is useful for maintaining an overview of your certificate statuses and identifying any potential issues or changes that might impact your system's security.

select
cmcv.certificate_id,
cmcv.version_number,
cmcv.stages,
cmcv.serial_number,
cmcv.issuer_ca_version_number,
cmcv.version_name,
cmcv.subject_alternative_names,
cmcv.time_of_deletion,
cmcv.validity,
cmcv.revocation_status
from
oci_certificates_management_certificate_version cmcv
inner join oci_certificates_management_certificate cmc on cmcv.certificate_id = cmc.id;
select
cmcv.certificate_id,
cmcv.version_number,
cmcv.stages,
cmcv.serial_number,
cmcv.issuer_ca_version_number,
cmcv.version_name,
cmcv.subject_alternative_names,
cmcv.time_of_deletion,
cmcv.validity,
cmcv.revocation_status
from
oci_certificates_management_certificate_version cmcv
inner join oci_certificates_management_certificate cmc on cmcv.certificate_id = cmc.id;

Count versions by certificate

Explore the number of versions associated with each certificate to effectively manage and track certificate updates. This can be particularly useful in maintaining security standards and ensuring optimal system performance.

select
certificate_id,
count(version_number)
from
oci_certificates_management_certificate_version
group by
certificate_id;
select
certificate_id,
count(version_number)
from
oci_certificates_management_certificate_version
group by
certificate_id;

List certificate versions created in the last 30 days

Explore which certificate versions were created in the last month. This can be helpful in tracking recent changes and additions to your certificates, ensuring you're up-to-date on your security configurations.

select
certificate_id,
version_number,
time_of_deletion,
time_created,
serial_number
from
oci_certificates_management_certificate_version
where
time_created >= now() - interval '30' day;
select
certificate_id,
version_number,
time_of_deletion,
time_created,
serial_number
from
oci_certificates_management_certificate_version
where
time_created >= datetime('now', '-30 day');

Schema for oci_certificates_management_certificate_version

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
certificate_idtext=The OCID of the certificate.
issuer_ca_version_numberbigintThe version number of the issuing certificate authority (CA).
revocation_statusjsonbRevocation details for the certificate.
serial_numbertextA unique certificate identifier used in certificate revocation tracking, formatted as octets.
stagesjsonbA list of stages of this entity.
subject_alternative_namesjsonbA list of subject alternative names.
tenant_idtextThe OCID of the Tenant in which the resource is located.
time_createdtimestamp with time zoneTime that the Certificate Version was created.
time_of_deletiontimestamp with time zoneAn optional property indicating when to delete the certificate version.
titletextTitle of the resource.
validityjsonbCertificate validity details.
version_nametextThe name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
version_numberbigint=The version number of the certificate.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci

You can pass the configuration to the command with the --config argument:

steampipe_export_oci --config '<your_config>' oci_certificates_management_certificate_version