cmd

package
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DOCKER = "/usr/bin/docker"

Docker binary

Variables

View Source
var AuthorizedKeys = cli.Command{
	Name:      "authorized-keys",
	Usage:     "List AWS IAM user registered SSH public keys.",
	ArgsUsage: "username",
	Action:    getAuthorizedKeysForUser,
	Aliases:   []string{"authorized_keys"},
	Flags: []cli.Flag{
		cli.StringSliceFlag{
			Name:  "allowed-groups",
			Usage: "Comma separated list of AWS IAM Groups allowed to SSH. (defaults to bastrd)",
		},
	},
}
View Source
var PAM = cli.Command{
	Name:   "pam",
	Usage:  "Authenticate an user against an IAM role. This command is designed to be called by PAM pam_exec module.",
	Action: pamMain,
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:   "username",
			Usage:  "AWS IAM username.",
			EnvVar: "PAM_USER",
		},
		cli.BoolFlag{
			Name:  "skip-credential-update",
			Usage: "Skip session credential update.",
		},
	},
}
View Source
var Proxy = cli.Command{
	Name:   "proxy",
	Usage:  "AWS IAM authenticated HTTP proxy.",
	Action: proxyMain,
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:   "bind",
			Usage:  "Address to listen for HTTP requests.",
			EnvVar: "BIND",
			Value:  "0.0.0.0:8080",
		},
		cli.StringFlag{
			Name:   "secret-key",
			Usage:  "Cookie/JWT secret key.",
			EnvVar: "SECRET_KEY",
		},
		cli.StringFlag{
			Name:   "session-cookie-name",
			Usage:  "Cookie/JWT secret key.",
			EnvVar: "SESSION_COOKIE_NAME",
			Value:  "sessionToken",
		},
		cli.StringFlag{
			Name:   "upstream",
			Usage:  "Upstream URL, may include path.",
			EnvVar: "UPSTREAM_URL",
		},
	},
}
View Source
var Sync = cli.Command{
	Name:    "sync",
	Usage:   "Sync AWS IAM users.",
	Action:  syncMain,
	Aliases: []string{"sync-users", "sync_users"},
	Flags: []cli.Flag{
		cli.StringSliceFlag{
			Name:  "additional-groups",
			Usage: "System user additional groups.",
			Value: &defaultAdditionalGroups,
		},
		cli.BoolFlag{
			Name:  "disable-sandbox",
			Usage: "Disable users sandboxed sessions.",
		},
		cli.StringSliceFlag{
			Name:  "groups",
			Usage: "AWS IAM group names to be synced. ATTENTION: Make sure these groups names don't conflict with existent system groups.",
		},
		cli.DurationFlag{
			Name:  "interval",
			Usage: "Time interval between sync loops.",
		},
	},
}
View Source
var Toolbox = cli.Command{
	Name:    "toolbox",
	Usage:   "Validates MFA and open a new authenticated toolbox session.",
	Action:  toolboxSessionMain,
	Aliases: []string{"session"},
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:  "c",
			Usage: "SSH command arguments.",
		},
		cli.Int64Flag{
			Name:  "duration",
			Usage: "Session credentials duration, in hours.",
			Value: 4,
		},
		cli.StringFlag{
			Name:  "image",
			Usage: "Sandbox container image.",
			Value: "docker.io/rochacon/bastrd-toolbox:latest",
		},
		cli.StringFlag{
			Name:  "token",
			Usage: "AWS IAM MFA token.",
		},
		cli.StringFlag{
			Name:  "username",
			Usage: "AWS IAM username for the sessioned.",
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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