iam

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GroupTables = []interface{}{
	&Group{},
	&GroupPolicy{},
}
View Source
var PasswordPolicyTables = []interface{}{
	&PasswordPolicy{},
}
View Source
var PolicyTables = []interface{}{
	&Policy{},
	&PolicyVersion{},
}
View Source
var RoleTables = []interface{}{
	&Role{},
	&RoleTag{},
	&RolePolicy{},
}
View Source
var UserTables = []interface{}{
	&User{},
	&UserAccessKey{},
	&UserTag{},

	&UserAttachedPolicy{},
	&UserGroup{},
}
View Source
var VirtualMFADeviceTables = []interface{}{
	&VirtualMFADevice{},
}

Functions

func NewClient

func NewClient(awsConfig aws.Config, db *database.Database, log *zap.Logger,
	accountID string, _ string) resource.ClientInterface

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) CollectResource

func (c *Client) CollectResource(resource string, config interface{}) error

type Group

type Group struct {
	ID         uint `gorm:"primarykey"`
	AccountID  string
	Arn        *string `neo:"unique"`
	CreateDate *time.Time
	GroupId    *string
	GroupName  *string
	Path       *string
	Policies   []*GroupPolicy `gorm:"constraint:OnDelete:CASCADE;"`
}

func (Group) TableName

func (Group) TableName() string

type GroupPolicy

type GroupPolicy struct {
	ID         uint   `gorm:"primarykey"`
	GroupID    uint   `neo:"ignore"`
	AccountID  string `gorm:"-"`
	PolicyArn  *string
	PolicyName *string
}

func (GroupPolicy) TableName

func (GroupPolicy) TableName() string

type PasswordPolicy

type PasswordPolicy struct {
	ID                         uint   `gorm:"primarykey"`
	AccountID                  string `neo:"unique"`
	AllowUsersToChangePassword *bool
	ExpirePasswords            *bool
	HardExpiry                 *bool
	MaxPasswordAge             *int32
	MinimumPasswordLength      *int32
	PasswordReusePrevention    *int32
	RequireLowercaseCharacters *bool
	RequireNumbers             *bool
	RequireSymbols             *bool
	RequireUppercaseCharacters *bool
}

func (PasswordPolicy) TableName

func (PasswordPolicy) TableName() string

type Policy

type Policy struct {
	ID                            uint    `gorm:"primarykey"`
	AccountID                     string  `neo:"unique"`
	Arn                           *string `neo:"unique"`
	AttachmentCount               *int32
	CreateDate                    *time.Time
	DefaultVersionId              *string
	Description                   *string
	IsAttachable                  *bool
	Path                          *string
	PermissionsBoundaryUsageCount *int32
	PolicyId                      *string `neo:"unique"`
	PolicyName                    *string
	UpdateDate                    *time.Time
	PolicyVersions                []*PolicyVersion `gorm:"constraint:OnDelete:CASCADE;"`
}

func (Policy) TableName

func (Policy) TableName() string

type PolicyVersion

type PolicyVersion struct {
	ID               uint   `gorm:"primarykey"`
	PolicyID         uint   `neo:"ignore"`
	AccountID        string `gorm:"-"`
	VersionID        *string
	CreateDate       *time.Time
	Document         *string
	IsDefaultVersion *bool
}

func (PolicyVersion) TableName

func (PolicyVersion) TableName() string

type ReportUser

type ReportUser struct {
	User                  string    `csv:"user"`
	ARN                   string    `csv:"arn"`
	UserCreationTime      time.Time `csv:"user_creation_time"`
	PasswordEnabled       string    `csv:"password_enabled"`
	PasswordLastUsed      string    `csv:"password_last_used"`
	PasswordLastChanged   string    `csv:"password_last_changed"`
	PasswordNextRotation  string    `csv:"password_next_rotation"`
	MFAActive             bool      `csv:"mfa_active"`
	AccessKey1Active      bool      `csv:"access_key_1_active"`
	AccessKey2Active      bool      `csv:"access_key_2_active"`
	AccessKey1LastRotated string    `csv:"access_key_1_last_rotated"`
	AccessKey2LastRotated string    `csv:"access_key_2_last_rotated"`
}

type Role

type Role struct {
	ID                       uint    `gorm:"primarykey"`
	AccountID                string  `neo:"unique"`
	Arn                      *string `neo:"unique"`
	AssumeRolePolicyDocument *string
	CreateDate               *time.Time
	Description              *string
	MaxSessionDuration       *int32
	Path                     *string

	PermissionsBoundaryArn  *string
	PermissionsBoundaryType *string

	RoleId         *string `neo:"unique"`
	LastUsedDate   *time.Time
	LastUsedRegion *string

	RoleName *string
	Tags     []*RoleTag    `gorm:"constraint:OnDelete:CASCADE;"`
	Policies []*RolePolicy `gorm:"constraint:OnDelete:CASCADE;"`
}

func (Role) TableName

func (Role) TableName() string

type RolePolicy

type RolePolicy struct {
	ID         uint   `gorm:"primarykey"`
	RoleID     uint   `neo:"ignore"`
	AccountID  string `gorm:"-"`
	PolicyArn  *string
	PolicyName *string
}

func (RolePolicy) TableName

func (RolePolicy) TableName() string

type RoleTag

type RoleTag struct {
	ID        uint   `gorm:"primarykey"`
	RoleID    uint   `neo:"ignore"`
	AccountID string `gorm:"-"`
	Key       *string
	Value     *string
}

func (RoleTag) TableName

func (RoleTag) TableName() string

type User

type User struct {
	ID                   uint    `gorm:"primarykey"`
	AccountID            string  `neo:"unique"`
	Arn                  *string `neo:"unique"`
	PasswordEnabled      *bool
	PasswordLastUsed     *time.Time
	PasswordLastChanged  *time.Time
	PasswordNextRotation *time.Time
	MFAActive            *bool
	CreateDate           *time.Time
	Path                 *string

	PermissionsBoundaryArn  *string
	PermissionsBoundaryType *string

	Tags             []*UserTag `gorm:"constraint:OnDelete:CASCADE;"`
	UserId           *string
	UserName         *string               `csv:"user"`
	AccessKeys       []*UserAccessKey      `gorm:"constraint:OnDelete:CASCADE;"`
	AttachedPolicies []*UserAttachedPolicy `gorm:"constraint:OnDelete:CASCADE;"`
	Groups           []*UserGroup          `gorm:"constraint:OnDelete:CASCADE;"`
}

func (User) TableName

func (User) TableName() string

type UserAccessKey

type UserAccessKey struct {
	ID        uint   `gorm:"primarykey"`
	UserID    uint   `neo:"ignore"`
	AccountID string `gorm:"-"`

	AccessKeyId         *string
	CreateDate          *time.Time
	Status              *string
	LastUsed            *time.Time
	LastRotated         *time.Time
	LastUsedServiceName *string
}

func (UserAccessKey) TableName

func (UserAccessKey) TableName() string

type UserAttachedPolicy

type UserAttachedPolicy struct {
	ID         uint   `gorm:"primarykey"`
	UserID     uint   `neo:"ignore"`
	AccountID  string `gorm:"-"`
	PolicyArn  *string
	PolicyName *string
}

func (UserAttachedPolicy) TableName

func (UserAttachedPolicy) TableName() string

type UserGroup

type UserGroup struct {
	ID        uint   `gorm:"primarykey"`
	UserID    uint   `neo:"ignore"`
	AccountID string `gorm:"-"`

	Arn        *string
	CreateDate *time.Time
	GroupId    *string
	GroupName  *string
	Path       *string
}

func (UserGroup) TableName

func (UserGroup) TableName() string

type UserTag

type UserTag struct {
	ID        uint   `gorm:"primarykey"`
	UserID    uint   `neo:"ignore"`
	AccountID string `gorm:"-"`

	Key   *string
	Value *string
}

func (UserTag) TableName

func (UserTag) TableName() string

type VirtualMFADevice

type VirtualMFADevice struct {
	ID           uint    `gorm:"primarykey"`
	AccountID    string  `neo:"unique"`
	SerialNumber *string `neo:"unique"`
	UserARN      *string
	EnableDate   *time.Time
}

func (VirtualMFADevice) TableName

func (VirtualMFADevice) TableName() string

Jump to

Keyboard shortcuts

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