Package dev.sigstore.rekor.client
Class RekorClientHttp
- java.lang.Object
-
- dev.sigstore.rekor.client.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRekorClientHttp.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREKOR_ENTRIES_PATHstatic java.lang.StringREKOR_INDEX_SEARCH_PATH-
Fields inherited from interface dev.sigstore.rekor.client.RekorClient
PUBLIC_GOOD_URI, STAGING_URI
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RekorClientHttp.Builderbuilder()java.util.Optional<RekorEntry>getEntry(HashedRekordRequest hashedRekordRequest)Get an entry from the logjava.util.Optional<RekorEntry>getEntry(java.lang.String UUID)Get an entry from the logRekorResponseputEntry(HashedRekordRequest hashedRekordRequest)Put a new hashedrekord entry on the Rekor log.java.util.List<java.lang.String>searchEntry(java.lang.String email, java.lang.String hash, java.lang.String publicKeyFormat, java.lang.String publicKeyContent)Returns a list of UUIDs for matching entries for the given search parameters.
-
-
-
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
-
builder
public static RekorClientHttp.Builder builder()
-
putEntry
public RekorResponse putEntry(HashedRekordRequest hashedRekordRequest) throws java.io.IOException, RekorParseException
Description copied from interface:RekorClientPut a new hashedrekord entry on the Rekor log.- Specified by:
putEntryin interfaceRekorClient- Parameters:
hashedRekordRequest- the request to send to rekor- Returns:
- a
RekorResponsewith information about the log entry - Throws:
java.io.IOExceptionRekorParseException
-
getEntry
public java.util.Optional<RekorEntry> getEntry(HashedRekordRequest hashedRekordRequest) throws java.io.IOException, RekorParseException
Description copied from interface:RekorClientGet an entry from the log- Specified by:
getEntryin interfaceRekorClient- Parameters:
hashedRekordRequest- the entry to find- Returns:
- the entry if found on the log, empty otherwise
- Throws:
java.io.IOExceptionRekorParseException
-
getEntry
public java.util.Optional<RekorEntry> getEntry(java.lang.String UUID) throws java.io.IOException, RekorParseException
Description copied from interface:RekorClientGet an entry from the log- Specified by:
getEntryin interfaceRekorClient- Parameters:
UUID- the uuid of the log entry- Returns:
- the entry if found on the log, empty otherwise
- Throws:
java.io.IOExceptionRekorParseException
-
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.IOExceptionDescription copied from interface:RekorClientReturns a list of UUIDs for matching entries for the given search parameters.- Specified by:
searchEntryin interfaceRekorClient- Parameters:
email- the OIDC email subjecthash- sha256 hash of the artifactpublicKeyFormat- format of public key (one of 'pgp','x509','minisign', 'ssh', 'tuf')publicKeyContent- public key base64 encoded content- Throws:
java.io.IOException
-
-