Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(agent *ClusterAgent) cluster.ClusterAgentAdminServerMethods
NewService returns a new clusterAgentService.
Types ¶
type AgentStorage ¶
type AgentStorage interface { // Get retrieves the blessings associated with secret. It returns an // error if the secret doesn't exist. Get(secret string) (blessings security.Blessings, err error) // Put stores the blessings and associates them with secret. It // returns an error if the secret already exists. Put(secret string, blessings security.Blessings) (err error) // Delete deletes the secret and its associated blessings. It returns // an error is there was a problem deleting the secret. Delete(secret string) error }
The interface for storing secrets and their associated blessings.
func NewFileStorage ¶
func NewFileStorage(dir string) AgentStorage
NewFileStorage returns an AgentStore implementation that uses the local file system, with all files placed under the directory 'dir'.
type ClusterAgent ¶
type ClusterAgent struct {
// contains filtered or unexported fields
}
The Cluster Agent keeps a list of Secret Keys and Blessings associated with them. It issues new Blessings when presented with a valid Secret Key. The new Blessings are extensions of the Blessings associated with the Secret Key.
func NewAgent ¶
func NewAgent(principal security.Principal, storage AgentStorage) *ClusterAgent
func (*ClusterAgent) Bless ¶
func (a *ClusterAgent) Bless(secret string, publicKey security.PublicKey, name string) (security.Blessings, error)
Bless creates new blessing extensions using the blessings associated with the given secret key.
func (*ClusterAgent) ForgetSecret ¶
func (a *ClusterAgent) ForgetSecret(secret string) error
ForgetSecret forgets the secret key and its associated blessings.
Click to show internal directories.
Click to hide internal directories.