Class RekorClientHttp

  • All Implemented Interfaces:
    RekorClient

    public class RekorClientHttp
    extends java.lang.Object
    implements RekorClient
    A client to communicate with a rekor service instance over http.
    • Field Detail

      • REKOR_ENTRIES_PATH

        public static final java.lang.String REKOR_ENTRIES_PATH
        See Also:
        Constant Field Values
      • REKOR_INDEX_SEARCH_PATH

        public static final java.lang.String REKOR_INDEX_SEARCH_PATH
        See Also:
        Constant Field Values
    • Method Detail

      • getEntry

        public java.util.Optional<RekorEntry> getEntry​(java.lang.String UUID)
                                                throws java.io.IOException,
                                                       RekorParseException
        Description copied from interface: RekorClient
        Get an entry from the log
        Specified by:
        getEntry in interface RekorClient
        Parameters:
        UUID - the uuid of the log entry
        Returns:
        the entry if found on the log, empty otherwise
        Throws:
        java.io.IOException
        RekorParseException
      • searchEntry

        public java.util.List<java.lang.String> searchEntry​(java.lang.String email,
                                                            java.lang.String hash,
                                                            java.lang.String publicKeyFormat,
                                                            java.lang.String publicKeyContent)
                                                     throws java.io.IOException
        Description copied from interface: RekorClient
        Returns a list of UUIDs for matching entries for the given search parameters.
        Specified by:
        searchEntry in interface RekorClient
        Parameters:
        email - the OIDC email subject
        hash - sha256 hash of the artifact
        publicKeyFormat - format of public key (one of 'pgp','x509','minisign', 'ssh', 'tuf')
        publicKeyContent - public key base64 encoded content
        Throws:
        java.io.IOException