Documentation ¶
Index ¶
- Constants
- Variables
- func Bootstrap(env evergreen.Environment) error
- func DeleteByID(ctx context.Context, name string) error
- func FindByID(ctx context.Context, name string) (*rpc.Credentials, error)
- func FindExpirationByID(ctx context.Context, name string) (time.Time, error)
- func ForJasperClient(ctx context.Context) (*rpc.Credentials, error)
- func GenerateInMemory(ctx context.Context, name string) (*rpc.Credentials, error)
- func SaveByID(ctx context.Context, name string, creds *rpc.Credentials) error
Constants ¶
const ( Collection = "credentials" CAName = "evergreen" )
Variables ¶
var ( IDKey = bsonutil.MustHaveTag(certdepot.User{}, "ID") CertKey = bsonutil.MustHaveTag(certdepot.User{}, "Cert") PrivateKeyKey = bsonutil.MustHaveTag(certdepot.User{}, "PrivateKey") CertReqKey = bsonutil.MustHaveTag(certdepot.User{}, "CertReq") CertRevocListKey = bsonutil.MustHaveTag(certdepot.User{}, "CertRevocList") TTLKey = bsonutil.MustHaveTag(certdepot.User{}, "TTL") )
Constants for bson struct tags.
Functions ¶
func Bootstrap ¶
func Bootstrap(env evergreen.Environment) error
Bootstrap performs one-time initialization of the credentials collection with the certificate authority and service certificate. In order to perform operations on this collection, collection, this must succeed.
func DeleteByID ¶
DeleteByID removes the credentials from the database if they exist.
func FindExpirationByID ¶
FindExpirationByID returns the time at which the credentials for the given name will expire.
func ForJasperClient ¶
func ForJasperClient(ctx context.Context) (*rpc.Credentials, error)
ForJasperClient returns the app server's credentials to authenticate with hosts running Jasper.
func GenerateInMemory ¶
GenerateInMemory generates the credentials without storing them in the database. This is not idempotent, so separate calls with the same inputs will return different credentials. This will fail if credentials for the given name already exist in the database.
Types ¶
This section is empty.