Documentation
¶
Overview ¶
Package server implements the connection-oriented state machine for the Hologram centralised server.
Index ¶
- func BuildARN(role string, defaultAccount string, accountAliases *map[string]string) string
- func New(userCache UserCache, credentials CredentialService, defaultRole string, ...) *server
- func NewDirectSessionTokenService(iamAccount string, sts *sts.STS, accountAliases *map[string]string) *directSessionTokenService
- func NewLDAPUserCache(server LDAPImplementation, stats g2s.Statter, userAttr string, baseDN string, ...) (*ldapUserCache, error)
- type Authenticator
- type CredentialService
- type LDAPImplementation
- type STSImplementation
- type User
- type UserCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(userCache UserCache, credentials CredentialService, defaultRole string, stats g2s.Statter, ldapServer LDAPImplementation, userAttr string, baseDN string, enableLDAPRoles bool, defaultRoleAttr string) *server
New returns a server that can be used as a handler for a MessageConnection loop.
Types ¶
type Authenticator ¶
type CredentialService ¶
type CredentialService interface {
AssumeRole(user *User, role string, enableLDAPRoles bool) (*sts.Credentials, error)
GetSessionToken() (*sts.Credentials, error)
}
CredentialService implements workflows that return temporary credentials to calling processes. No caching is done of these results other than that which the CredentialService does itself.
type LDAPImplementation ¶
type LDAPImplementation interface {
Search(*ldap.SearchRequest) (*ldap.SearchResult, error)
Modify(*ldap.ModifyRequest) error
}
LDAPImplementation implementers provide access to LDAP servers for operations that Hologram uses. This interface exists for testing purposes.
func NewPersistentLDAP ¶
func NewPersistentLDAP(open func() (LDAPImplementation, error)) (LDAPImplementation, error)
type STSImplementation ¶
type STSImplementation interface {
AssumeRole(options *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
GetSessionToken(options *sts.GetSessionTokenInput) (*sts.GetSessionTokenOutput, error)
}
STSImplementation exists to enable dependency injection of an implementation of STS.
type UserCache ¶
type UserCache interface {
// They also need to implement the SSH key verification interface.
Authenticator
Update() error
}
UserCache implementers provide information about registered users.