iam

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver added in v0.0.9

type Driver struct {
	Cred     auth.Credential
	Client   *api.Client
	Username string
	Password string
	DomainID string
}

func (*Driver) AddUser added in v0.0.9

func (d *Driver) AddUser() (schema.IAMResult, error)

func (*Driver) AttachGroup added in v0.3.1

func (d *Driver) AttachGroup(ctx context.Context, userName, groupName string) error

AttachGroup adds user to the named keystone group.

func (*Driver) CreateAccessKey added in v0.3.1

func (d *Driver) CreateAccessKey(ctx context.Context, userName string) (schema.IAMCredential, string, error)

CreateAccessKey provisions a new permanent access key for userName. The secret is returned only once at creation time.

func (*Driver) DelUser added in v0.0.9

func (d *Driver) DelUser() (schema.IAMResult, error)

func (*Driver) DeleteAccessKey added in v0.3.1

func (d *Driver) DeleteAccessKey(ctx context.Context, _ string, accessKeyID string) error

DeleteAccessKey revokes the permanent access key identified by accessKeyID. Huawei's DELETE endpoint takes the access key directly, so userName is only retained for parity with other providers.

func (*Driver) DetachGroup added in v0.3.1

func (d *Driver) DetachGroup(ctx context.Context, userName, groupName string) error

DetachGroup removes user from the named keystone group.

func (*Driver) GetUserName added in v0.2.1

func (d *Driver) GetUserName(ctx context.Context) (string, error)

func (*Driver) ListAccessKeys added in v0.3.1

func (d *Driver) ListAccessKeys(ctx context.Context, userName string) ([]schema.IAMCredential, error)

ListAccessKeys enumerates the permanent access keys of userName via the IAM v3.0 OS-CREDENTIAL endpoint. An empty userName resolves to the calling user via the AK that established the session.

func (*Driver) ListRoleBindings added in v0.3.1

func (d *Driver) ListRoleBindings(ctx context.Context, userName string) ([]schema.RoleBinding, error)

ListRoleBindings enumerates the keystone groups that user is a member of. Huawei IAM has no "policy attached to user" concept — policies attach to groups and users join groups, so the role-binding capability surfaces group membership as the closest CSPM-relevant analogue.

func (*Driver) ListUsers added in v0.1.5

func (d *Driver) ListUsers(ctx context.Context) ([]schema.User, error)

Jump to

Keyboard shortcuts

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