Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractSubject(ctx context.Context, tok *oidc.IDToken, publicKey crypto.PublicKey, ...) (*challenges.ChallengeResult, error)
- func New(ct ctl.Client, ca certauth.CertificateAuthority) http.Handler
- func WithMaxBytes(next http.Handler, n int64) http.Handler
- type CertificateRequest
- type CertificateResponse
- type Client
- type ClientOption
- type Key
- type RootResponse
Constants ¶
View Source
const SigstorePublicServerURL = "https://fulcio.sigstore.dev"
SigstorePublicServerURL is the URL of Sigstore's public Fulcio service.
Variables ¶
View Source
var ( MetricLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "fulcio_api_latency", Help: "API Latency on calls", }, []string{"code", "method"}) RequestsCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "http_requests_total", Help: "Count all HTTP requests", }, []string{"code", "method"}) )
Functions ¶
func ExtractSubject ¶ added in v0.2.0
func ExtractSubject(ctx context.Context, tok *oidc.IDToken, publicKey crypto.PublicKey, challenge []byte) (*challenges.ChallengeResult, error)
Types ¶
type CertificateRequest ¶ added in v0.2.0
type CertificateResponse ¶ added in v0.2.0
type Client ¶ added in v0.2.0
type Client interface {
// SigningCert sends the provided CertificateRequest to the /api/v1/signingCert
// endpoint of a Fulcio API, authenticated with the provided bearer token.
SigningCert(cr CertificateRequest, token string) (*CertificateResponse, error)
// RootCert sends a request to get the current CA used by Fulcio.
RootCert() (*RootResponse, error)
}
Client is the interface for accessing the Fulcio API.
type ClientOption ¶ added in v0.2.0
type ClientOption func(*clientOptions)
ClientOption is a functional option for customizing static signatures.
func WithTimeout ¶ added in v0.2.0
func WithTimeout(timeout time.Duration) ClientOption
WithTimeout sets the request timeout for the client
func WithUserAgent ¶ added in v0.2.0
func WithUserAgent(userAgent string) ClientOption
WithUserAgent sets the media type of the signature.
type RootResponse ¶ added in v0.2.0
type RootResponse struct {
ChainPEM []byte
}
Click to show internal directories.
Click to hide internal directories.