Class CertificateMetadata

java.lang.Object
io.confluent.security.mtls.CertificateMetadata

public class CertificateMetadata extends Object
Utility class for generating certificate metadata.
  • Constructor Details

    • CertificateMetadata

      public CertificateMetadata(X509Certificate certificate)
    • CertificateMetadata

      public CertificateMetadata(String certificate)
  • Method Details

    • getCelVars

      public Map<String,String> getCelVars()
      Get the certificate metadata variables for Cert Identity Pool CEL filter evaluation. The variables (mapping of key value) include: 1. "DN" subject DN, 2. DN components, including (inclusive): DC, CN, OU, O, STREET, L, ST, C, and UID, 3. "SAN" subject alternative name, 4. "SNID" serial number, and 5. SHA-1 fingerprint. If any of the metadata is not available, the corresponding variable is not included in the result.
    • getIssuerDn

      public String getIssuerDn()
      Get the Issuer DN of the certificate (in RFC2253 format).
    • getDn

      public String getDn()
      Get the subject DN of the certificate.
    • getSan

      public String getSan()
      Get the subject alternative name of the certificate.
    • getCn

      public String getCn()
      Get the CN (Common Name) of the certificate.
    • getSnid

      public String getSnid()
      Get the serial number of the certificate.
    • getSha1

      public String getSha1()
      Get the SHA-1 fingerprint of the certificate.
    • getIssuerDn

      public static String getIssuerDn(X509CRL crlEntry)
      Get the Issuer DN of the CRL entry (in RFC2253 format).
    • getSerialNumber

      public static String getSerialNumber(X509CRLEntry crlEntry)