Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToProtoSlice ¶
func ToProtoSlice(input []*UserKey) []*initproto.SSHUserKey
ToProtoSlice converts a SSH UserKey definition from Go to pubproto flavor.
Types ¶
type Access ¶
type Access struct {
// contains filtered or unexported fields
}
Access reads SSH public keys from a channel, creates the specified users if required and writes the public keys to the users authorized_keys file.
func NewAccess ¶
func NewAccess(log *logger.Logger, userManager user.LinuxUserManager) *Access
NewAccess creates a new Access.
func (*Access) DeployAuthorizedKey ¶
DeployAuthorizedKey takes an user & public key pair, creates the user if required and deploy a SSH key for them. TODO: Refactor to not write to /etc or /home.
func (*Access) GetAuthorizedKeys ¶
GetAuthorizedKeys returns a list of authorized keys for the specified user.
type UserKey ¶
UserKey describes an user that should be created with a corresponding public SSH key.
func FromProtoSlice ¶
func FromProtoSlice(input []*initproto.SSHUserKey) []UserKey
FromProtoSlice converts a SSH UserKey definition from pubproto to the Go flavor.