@sigstore/protobuf-specs
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -59,6 +59,9 @@ import { Envelope } from "./envelope"; | ||
/** | ||
* MUST be application/vnd.dev.sigstore.bundle+json;version=0.1 | ||
* or application/vnd.dev.sigstore.bundle+json;version=0.2 | ||
* or application/vnd.dev.sigstore.bundle+json;version=0.3 | ||
* MUST be application/vnd.dev.sigstore.bundle.v0.3+json when | ||
* when encoded as JSON. | ||
* Clients must to be able to accept media type using the previously | ||
* defined formats: | ||
* * application/vnd.dev.sigstore.bundle+json;version=0.1 | ||
* * application/vnd.dev.sigstore.bundle+json;version=0.2 | ||
* * application/vnd.dev.sigstore.bundle+json;version=0.3 | ||
*/ | ||
@@ -65,0 +68,0 @@ mediaType: string; |
@@ -14,7 +14,6 @@ /// <reference types="node" /> | ||
/** | ||
* The checkpoint contains a signature of the tree head (root hash), | ||
* size of the tree, the transparency log's unique identifier (log ID), | ||
* hostname and the current time. | ||
* The result is a string, the format is described here | ||
* https://github.com/transparency-dev/formats/blob/main/log/README.md | ||
* The checkpoint MUST contain a signature of the tree head (root hash), | ||
* size of the tree and the transparency log's unique identifier (log ID). | ||
* It MAY also be followed by any optional data. The result is a string, | ||
* the format is described here https://github.com/transparency-dev/formats/blob/main/log/README.md | ||
* The details are here https://github.com/sigstore/rekor/blob/a6e58f72b6b18cc06cefe61808efd562b9726330/pkg/util/signed_note.go#L114 | ||
@@ -21,0 +20,0 @@ * The signature has the same format as |
@@ -42,3 +42,7 @@ import { DistinguishedName, HashAlgorithm, LogId, PublicKey, TimeRange, X509CertificateChain } from "./sigstore_common"; | ||
uri: string; | ||
/** The certificate chain for this CA. */ | ||
/** | ||
* The certificate chain for this CA. The last certificate in the chain | ||
* MUST be the trust anchor. The trust anchor MAY be a self-signed root | ||
* CA certificate or MAY be an intermediate CA certificate. | ||
*/ | ||
certChain: X509CertificateChain | undefined; | ||
@@ -89,3 +93,9 @@ /** | ||
export interface TrustedRoot { | ||
/** MUST be application/vnd.dev.sigstore.trustedroot+json;version=0.1 */ | ||
/** | ||
* MUST be application/vnd.dev.sigstore.trustedroot.v0.1+json | ||
* when encoded as JSON. | ||
* Clients MUST be able to process and parse content with the media | ||
* type defined in the old format: | ||
* application/vnd.dev.sigstore.trustedroot+json;version=0.1 | ||
*/ | ||
mediaType: string; | ||
@@ -110,2 +120,56 @@ /** A set of trusted Rekor servers. */ | ||
} | ||
/** | ||
* SigningConfig represents the trusted entities/state needed by Sigstore | ||
* signing. In particular, it primarily contains service URLs that a Sigstore | ||
* signer may need to connect to for the online aspects of signing. | ||
*/ | ||
export interface SigningConfig { | ||
/** | ||
* A URL to a Fulcio-compatible CA, capable of receiving | ||
* Certificate Signing Requests (CSRs) and responding with | ||
* issued certificates. | ||
* | ||
* This URL **MUST** be the "base" URL for the CA, which clients | ||
* should construct an appropriate CSR endpoint on top of. | ||
* For example, if `ca_url` is `https://example.com/ca`, then | ||
* the client **MAY** construct the CSR endpoint as | ||
* `https://example.com/ca/api/v2/signingCert`. | ||
*/ | ||
caUrl: string; | ||
/** | ||
* A URL to an OpenID Connect identity provider. | ||
* | ||
* This URL **MUST** be the "base" URL for the OIDC IdP, which clients | ||
* should perform well-known OpenID Connect discovery against. | ||
*/ | ||
oidcUrl: string; | ||
/** | ||
* One or more URLs to Rekor-compatible transparency log. | ||
* | ||
* Each URL **MUST** be the "base" URL for the transparency log, | ||
* which clients should construct appropriate API endpoints on top of. | ||
*/ | ||
tlogUrls: string[]; | ||
/** | ||
* One ore more URLs to RFC 3161 Time Stamping Authority (TSA). | ||
* | ||
* Each URL **MUST** be the **full** URL for the TSA, meaning that it | ||
* should be suitable for submitting Time Stamp Requests (TSRs) to | ||
* via HTTP, per RFC 3161. | ||
*/ | ||
tsaUrls: string[]; | ||
} | ||
/** | ||
* ClientTrustConfig describes the complete state needed by a client | ||
* to perform both signing and verification operations against a particular | ||
* instance of Sigstore. | ||
*/ | ||
export interface ClientTrustConfig { | ||
/** MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json */ | ||
mediaType: string; | ||
/** The root of trust, which MUST be present. */ | ||
trustedRoot: TrustedRoot | undefined; | ||
/** Configuration for signing clients, which MUST be present. */ | ||
signingConfig: SigningConfig | undefined; | ||
} | ||
export declare const TransparencyLogInstance: { | ||
@@ -123,1 +187,9 @@ fromJSON(object: any): TransparencyLogInstance; | ||
}; | ||
export declare const SigningConfig: { | ||
fromJSON(object: any): SigningConfig; | ||
toJSON(message: SigningConfig): unknown; | ||
}; | ||
export declare const ClientTrustConfig: { | ||
fromJSON(object: any): ClientTrustConfig; | ||
toJSON(message: ClientTrustConfig): unknown; | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TrustedRoot = exports.CertificateAuthority = exports.TransparencyLogInstance = void 0; | ||
exports.ClientTrustConfig = exports.SigningConfig = exports.TrustedRoot = exports.CertificateAuthority = exports.TransparencyLogInstance = void 0; | ||
/* eslint-disable */ | ||
@@ -101,4 +101,56 @@ const sigstore_common_1 = require("./sigstore_common"); | ||
}; | ||
function createBaseSigningConfig() { | ||
return { caUrl: "", oidcUrl: "", tlogUrls: [], tsaUrls: [] }; | ||
} | ||
exports.SigningConfig = { | ||
fromJSON(object) { | ||
return { | ||
caUrl: isSet(object.caUrl) ? String(object.caUrl) : "", | ||
oidcUrl: isSet(object.oidcUrl) ? String(object.oidcUrl) : "", | ||
tlogUrls: Array.isArray(object?.tlogUrls) ? object.tlogUrls.map((e) => String(e)) : [], | ||
tsaUrls: Array.isArray(object?.tsaUrls) ? object.tsaUrls.map((e) => String(e)) : [], | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.caUrl !== undefined && (obj.caUrl = message.caUrl); | ||
message.oidcUrl !== undefined && (obj.oidcUrl = message.oidcUrl); | ||
if (message.tlogUrls) { | ||
obj.tlogUrls = message.tlogUrls.map((e) => e); | ||
} | ||
else { | ||
obj.tlogUrls = []; | ||
} | ||
if (message.tsaUrls) { | ||
obj.tsaUrls = message.tsaUrls.map((e) => e); | ||
} | ||
else { | ||
obj.tsaUrls = []; | ||
} | ||
return obj; | ||
}, | ||
}; | ||
function createBaseClientTrustConfig() { | ||
return { mediaType: "", trustedRoot: undefined, signingConfig: undefined }; | ||
} | ||
exports.ClientTrustConfig = { | ||
fromJSON(object) { | ||
return { | ||
mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", | ||
trustedRoot: isSet(object.trustedRoot) ? exports.TrustedRoot.fromJSON(object.trustedRoot) : undefined, | ||
signingConfig: isSet(object.signingConfig) ? exports.SigningConfig.fromJSON(object.signingConfig) : undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.mediaType !== undefined && (obj.mediaType = message.mediaType); | ||
message.trustedRoot !== undefined && | ||
(obj.trustedRoot = message.trustedRoot ? exports.TrustedRoot.toJSON(message.trustedRoot) : undefined); | ||
message.signingConfig !== undefined && | ||
(obj.signingConfig = message.signingConfig ? exports.SigningConfig.toJSON(message.signingConfig) : undefined); | ||
return obj; | ||
}, | ||
}; | ||
function isSet(value) { | ||
return value !== null && value !== undefined; | ||
} |
{ | ||
"name": "@sigstore/protobuf-specs", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "code-signing for npm packages", | ||
@@ -24,3 +24,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@tsconfig/node14": "^1.0.3", | ||
"@tsconfig/node16": "^16.1.1", | ||
"@types/node": "^18.14.0", | ||
@@ -30,4 +30,4 @@ "typescript": "^4.9.5" | ||
"engines": { | ||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0" | ||
"node": "^16.14.0 || >=18.0.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
234136
5443