luci: go.chromium.org/luci/appengine/gaesecrets Index | Files

package gaesecrets

import "go.chromium.org/luci/appengine/gaesecrets"

Package gaesecrets implements storage of secret blobs on top of datastore.

It is not super secure, but we have what we have: there's no other better mechanism to persistently store non-static secrets on GAE.

All secrets are global (live in default GAE namespace).

Index

Package Files

gaesecrets.go

func Use Uses

func Use(c context.Context, cfg *Config) context.Context

Use injects the GAE implementation of secrets.Store into the context. The context must be configured with GAE datastore implementation already.

type Config Uses

type Config struct {
    NoAutogenerate bool      // if true, GetSecret will NOT generate secrets
    SecretLen      int       // length of generated secrets, 32 bytes default
    Prefix         string    // optional prefix for entity keys to namespace them
    Entropy        io.Reader // source of random numbers, crypto rand by default
}

Config can be used to tweak parameters of the store. It is fine to use default values.

Package gaesecrets imports 12 packages (graph) and is imported by 2 packages. Updated 2018-10-22. Refresh now. Tools for package owners.