Class PathBasedCertResolverBase

  • Direct Known Subclasses:
    PathBasedCertPrincipalResolver

    public abstract class PathBasedCertResolverBase
    extends Object
    Abstract base class for implementing path-based certificate resolvers. This class provides common functionality for extracting and processing certificate information based on configurable paths and filters.
    • Constructor Detail

      • PathBasedCertResolverBase

        public PathBasedCertResolverBase()
    • Method Detail

      • createCertResolverPattern

        protected CertResolverPattern createCertResolverPattern​(Map<String,​Object> config,
                                                                String defaultPath)
        Creates a CertResolverPattern from a given configuration map and a default path. The pattern defines how certificate information should be extracted and processed.
        Parameters:
        config - The configuration map containing resolver settings.
        defaultPath - The default path to use if none is specified in the configuration.
        Returns:
        A new instance of CertResolverPattern based on the provided configuration.
      • getValuesFromPaths

        protected Map<String,​Set<String>> getValuesFromPaths​(X509Certificate certificate,
                                                                   List<CertResolverPattern> patterns)
                                                            throws CertificateParsingException
        Extracts values from specified paths in a certificate and organizes them into a map. The map's keys are derived from the names specified in the patterns, and the values are sets of strings extracted from the certificate according to the pattern definitions.
        Parameters:
        certificate - The X509Certificate from which to extract information.
        patterns - A list of CertResolverPattern objects defining the extraction criteria.
        Returns:
        A map where each key is a pattern name and each value is a set of extracted strings.
        Throws:
        CertificateParsingException - If an error occurs while parsing the certificate.