Class Bundle

java.lang.Object
dev.sigstore.bundle.Bundle

@Immutable public abstract class Bundle extends Object
A representation of sigstore signing materials. See protobuf-specs
  • Constructor Details

    • Bundle

      public Bundle()
  • Method Details

    • getMediaType

      @Default public String getMediaType()
      The bundle version
    • getMessageSignature

      public abstract Optional<Bundle.MessageSignature> getMessageSignature()
      A signature represented as a signature and digest
    • getDsseEnvelope

      public abstract Optional<Bundle.DsseEnvelope> getDsseEnvelope()
      A DSSE envelope signature type that may contain an arbitrary payload
    • checkOnlyOneSignature

      @Check protected void checkOnlyOneSignature()
    • checkAtLeastOneTimestamp

      @Check protected void checkAtLeastOneTimestamp()
    • getCertPath

      public abstract CertPath getCertPath()
      The partial certificate chain provided by fulcio for the public key and identity used to sign the artifact, this should NOT contain the trusted root or any trusted intermediates. But users of this object should understand that older signatures may include the full chain.
    • getEntries

      public abstract List<RekorEntry> getEntries()
      The entry in the rekor transparency log (represented as a list for future compatibility, but currently only allow for at most one entry.
    • getTimestamps

      public abstract List<Bundle.Timestamp> getTimestamps()
      A list of timestamps to verify the time of signing. Currently, allows rfc3161 timestamps.
    • from

      public static Bundle from(Reader bundleJson) throws BundleParseException
      Read a json formatted bundle.
      Throws:
      BundleParseException
    • from

      public static Bundle from(Path file, Charset cs) throws BundleParseException, IOException
      Read a json formatted bundle from a file.
      Throws:
      BundleParseException
      IOException
    • toJson

      @Lazy public String toJson()