Documentation
¶
Index ¶
- type CA
- func (c *CA) FetchDiscovery(ctx context.Context) (*wire.Discovery, error)
- func (c *CA) PolicyURL() string
- func (c *CA) PublicKey() sshcert.RawPublicKey
- func (c *CA) RequestPolicy(ctx context.Context, token string, conn policy.Connection) (*wire.PolicyResponse, error)
- func (c *CA) SignPublicKey(rawPubKey sshcert.RawPublicKey, params *wire.CertParams) (sshcert.RawCertificate, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CA ¶
type CA struct {
// contains filtered or unexported fields
}
CA performs CA operations.
func (*CA) FetchDiscovery ¶ added in v0.14.0
FetchDiscovery fetches discovery data from the policy server. The request carries a CA-minted, request-bound JWT (pkg/serviceauth). The response's Cache-Control header is preserved on the returned Discovery so callers (the CA server's /discovery handler) can pass it through to clients; this CA client itself does not cache.
func (*CA) PublicKey ¶
func (c *CA) PublicKey() sshcert.RawPublicKey
PublicKey returns the ssh on-disk format public key for the CA.
func (*CA) RequestPolicy ¶
func (c *CA) RequestPolicy(ctx context.Context, token string, conn policy.Connection) (*wire.PolicyResponse, error)
RequestPolicy requests policy from the policy server for a cert request. The request carries a CA-minted, request-bound JWT (pkg/serviceauth).
func (*CA) SignPublicKey ¶
func (c *CA) SignPublicKey(rawPubKey sshcert.RawPublicKey, params *wire.CertParams) (sshcert.RawCertificate, error)
SignPublicKey signs a key to generate a certificate.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures the CA.
func WithLogger ¶ added in v0.3.3
WithLogger configures the CA to use the specified logger.
func WithTLSConfig ¶ added in v0.1.4
WithTLSConfig creates an HTTP client with the specified TLS configuration, using tlsconfig's shared default timeout rather than a locally-duplicated literal.