Documentation
¶
Index ¶
- type Driver
- func (d *Driver) AddUser() (schema.IAMResult, error)
- func (d *Driver) AttachPolicy(ctx context.Context, userName, policyName string) error
- func (d *Driver) CreateAccessKey(ctx context.Context, userName string) (schema.IAMCredential, string, error)
- func (d *Driver) DelUser() (schema.IAMResult, error)
- func (d *Driver) DeleteAccessKey(ctx context.Context, userName, accessKeyID string) error
- func (d *Driver) DetachPolicy(ctx context.Context, userName, policyName string) error
- func (d *Driver) ListAccessKeys(ctx context.Context, userName string) ([]schema.IAMCredential, error)
- func (d *Driver) ListRoleBindings(ctx context.Context, userName string) ([]schema.RoleBinding, error)
- func (d *Driver) ListUsers(ctx context.Context) ([]schema.User, error)
- func (d *Driver) Validator() (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
func (*Driver) AttachPolicy ¶ added in v0.3.1
AttachPolicy binds policyName to userName. Reuses the same payload shape that the existing iam-user-check `add` flow already exercises.
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 access key pair for the sub user via `:createAccessKey`. Returns the public AccessKey and the one-shot Secret.
func (*Driver) DeleteAccessKey ¶ added in v0.3.1
DeleteAccessKey revokes an access key for the sub user via `:deleteAccessKey`. The accessKey is passed via query parameter to match the `:detachSubUserPolicy` DELETE convention.
func (*Driver) DetachPolicy ¶ added in v0.3.1
DetachPolicy removes policyName from userName. Mirrors `userdel`: JDCloud's detach action expects HTTP DELETE with policyName in the query string.
func (*Driver) ListAccessKeys ¶ added in v0.3.1
func (d *Driver) ListAccessKeys(ctx context.Context, userName string) ([]schema.IAMCredential, error)
ListAccessKeys enumerates the access keys attached to a JDCloud sub user via the pattern-inferred `:describeAccessKeys` action under /subUser. The path mirrors the existing `:attachSubUserPolicy` / `:detachSubUserPolicy` shape; verify against upstream SDK if behaviour deviates.
func (*Driver) ListRoleBindings ¶ added in v0.3.1
func (d *Driver) ListRoleBindings(ctx context.Context, userName string) ([]schema.RoleBinding, error)
ListRoleBindings returns the managed policies attached to the named sub user. JDCloud IAM is global; the region argument is left empty so the signer falls back to the `jdcloud-api` scope used by the other sub-user actions.
The action path follows the existing :attachSubUserPolicy / :detachSubUserPolicy pattern. If JDCloud renames the describe action upstream, both this driver and the demo replay handler in pkg/providers/jdcloud/replay need updating in lockstep.