CA_BUNDLES
存储通过 创建 CA 捆绑包 创建的证书颁发机构 (CA) 捆绑包。
特权
-
请参阅 CA 捆绑包 OID、名称和所有者:CA 捆绑包的超级用户或所有者。
-
请参阅 CA 捆绑包内容:捆绑包的所有者
使用 CERTIFICATES 进行联接
CA_BUNDLES 仅存储 OID。由于对 CA 捆绑包的操作需要证书和所有者名称,因此可以使用以下查询将捆绑包映射到证书和所有者名称:
=> SELECT user_name AS owner_name,
owner AS owner_oid,
b.name AS bundle_name,
c.name AS cert_name
FROM (SELECT name,
STRING_TO_ARRAY(certificates) :: array[INT] AS certs
FROM ca_bundles) b
LEFT JOIN certificates c
ON CONTAINS(b.certs, c.oid)
LEFT JOIN users
ON user_id = owner
ORDER BY 1;
owner_name | owner_oid | bundle_name | cert_name
------------+-------------------+--------------+-----------
dbadmin | 45035996273704962 | ca_bundle | root_ca
dbadmin | 45035996273704962 | ca_bundle | ca_cert
(2 rows)