lastpassaws

package
v0.0.0-...-40c1973 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const LastPassServer = "https://lastpass.com"

LastPassServer points to the Lastpass Server

Variables

This section is empty.

Functions

func AssumeAWSRole

func AssumeAWSRole(assertion, roleArn, principalArn string, duration int) (*sts.AssumeRoleWithSAMLOutput, error)

AssumeAWSRole returns a response from assuming a role on AWS STS and includes the required credentials

func GetLastpassIdentitySession

func GetLastpassIdentitySession(session *http.Client) error

GetLastpassIdentitySession returns true if identity session is created

func HomeDir

func HomeDir() string

HomeDir returns the user's home directory

func Login

func Login(session *http.Client, username, password, otp string) error

Login will submit the credentials to LastPass to login and create the session for future use

func PromptForRole

func PromptForRole(roles [][]string) []string

PromptForRole asks the user to choose a role if there are multiple

func SamlRoles

func SamlRoles(assertion string) [][]string

SamlRoles returns a list of roles a user can assume

func SamlToken

func SamlToken(session *http.Client, samlURL string) (string, error)

SamlToken uses a LastPass login session to get a SAML token for assuming roles

func SetAWSProfile

func SetAWSProfile(profileName string, response *sts.AssumeRoleWithSAMLOutput)

SetAWSProfile saves the role credentials into ~/.aws/credentials

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL