churner

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2025 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseDomainEnv     cmd.EnvVar = "BASE_DOMAIN"
	ACMEDirectoryEnv  cmd.EnvVar = "ACME_DIRECTORY"
	DynamoTableEnv    cmd.EnvVar = "DYNAMO_TABLE"
	DynamoEndpointEnv cmd.EnvVar = "DYNAMO_ENDPOINT"
	RevokeDeadline    cmd.EnvVar = "REVOKE_DEADLINE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Churner

type Churner struct {
	// contains filtered or unexported fields
}

The Churner creats and immediately revokes certificates. Certificates are issued using the configured ACME client using DNS01 challenges under the configured baseDomain. Serials and revocation time are stored in the db.

func New

func New(baseDomain string, acmeDirectory string, dnsProvider certmagic.DNSProvider, db *db.Database, cutoff time.Time) (*Churner, error)

New returns a Churner with an ACME client configured. `baseDomain` should be a domain name that the `dnsProvider` can create/delete records for. The certs will be issued from the CA at `acmeDirectory`. The resulting serials are stored into `db`

func NewFromEnv

func NewFromEnv(ctx context.Context) (*Churner, error)

func (*Churner) CheckMissing

func (c *Churner) CheckMissing(ctx context.Context) ([]db.CertMetadata, error)

CheckMissing looks if previously stored serials are still in the database, meaning they haven't been seen in a CRL. CheckMissing returns all certs revoked before a cutoff time.

func (*Churner) Churn

func (c *Churner) Churn(ctx context.Context) error

Churn issues a certificate, revokes it, and stores the result in DynamoDB

func (*Churner) RegisterAccount

func (c *Churner) RegisterAccount(ctx context.Context) error

RegisterAccount sets up a new account. TODO: Store accounts to reuse. For now we just make a new one each time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL