revocation

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package revocation provides tools to create and manage revocation caveats.

Index

Constants

This section is empty.

Variables

View Source
var NotRevokedCaveat = security.CaveatDescriptor{
	Id: uniqueid.Id{
		75,
		70,
		92,
		86,
		55,
		121,
		209,
		59,
		123,
		163,
		167,
		214,
		165,
		52,
		128,
		0,
	},
	ParamType: vdl.TypeOf((*[]byte)(nil)),
}

NotRevokedCaveat is used to implement revocation. It validates iff the parameter is not included in a list of blacklisted values.

The third-party discharging service checks this revocation caveat against a database of blacklisted (revoked) keys before issuing a discharge.

Functions

This section is empty.

Types

type RevocationManager

type RevocationManager interface {
	NewCaveat(discharger security.PublicKey, dischargerLocation string) (security.Caveat, error)
	Revoke(caveatID string) error
	GetRevocationTime(caveatID string) *time.Time
}

RevocationManager persists information for revocation caveats to provided discharges and allow for future revocations.

func NewMockRevocationManager

func NewMockRevocationManager(ctx *context.T) RevocationManager

func NewRevocationManager

func NewRevocationManager(ctx *context.T, sqlDB *sql.DB) (RevocationManager, error)

NewRevocationManager returns a RevocationManager that persists information about revocationCaveats in a SQL database and allows for revocation and caveat creation. This function can only be called once because of the use of global variables.

Jump to

Keyboard shortcuts

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