Documentation ¶
Index ¶
- func WithRetryMaxAttempts(attempts int) func(*config)
- func WithRetryMaxBackoff(backoff time.Duration) func(*config)
- func WithRetryStrategy(strategy handler.RetryStrategy) func(*config)
- type Agent
- type ContainerOptions
- type ContainerPolicies
- type FrostFS
- type IssueSecretOptions
- type NetworkState
- type ObtainSecretOptions
- type Option
- type PrmContainerCreate
- type UpdateOptions
- type UpdateSecretOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithRetryMaxAttempts ¶ added in v0.31.0
func WithRetryMaxAttempts(attempts int) func(*config)
func WithRetryMaxBackoff ¶ added in v0.31.0
func WithRetryStrategy ¶ added in v0.31.0
func WithRetryStrategy(strategy handler.RetryStrategy) func(*config)
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent contains client communicating with FrostFS and logger.
func (*Agent) IssueSecret ¶
IssueSecret creates an auth token, puts it in the FrostFS network and writes to io.Writer a new secret access key.
func (*Agent) ObtainSecret ¶
ObtainSecret receives an existing secret access key from FrostFS and writes to io.Writer the secret access key.
func (*Agent) UpdateSecret ¶ added in v0.28.0
UpdateSecret updates an auth token (change list of gates that can use credential), puts new cred version to the FrostFS network and writes to io.Writer a result.
type ContainerOptions ¶
ContainerOptions groups parameters of auth container to put the secret into.
type ContainerPolicies ¶
ContainerPolicies contains mapping of aws LocationConstraint to frostfs PlacementPolicy.
type FrostFS ¶
type FrostFS interface { // FrostFS interface required by credential tool. tokens.FrostFS // ContainerExists checks container presence in FrostFS by identifier. // Returns nil if container exists. ContainerExists(context.Context, cid.ID) error // CreateContainer creates and saves parameterized container in FrostFS. // It sets 'Timestamp' attribute to the current time. // It returns the ID of the saved container. // // The container must be private with GET access for OTHERS group. // Creation time should also be stamped. // // It returns exactly one non-nil value. It returns any error encountered which // prevented the container from being created. CreateContainer(context.Context, PrmContainerCreate) (cid.ID, error) // TimeToEpoch computes the current epoch and the epoch that corresponds to the provided time. // Note: // * time must be in the future // * time will be ceil rounded to match epoch // // It returns any error encountered which prevented computing epochs. TimeToEpoch(context.Context, time.Time) (uint64, uint64, error) }
FrostFS represents virtual connection to FrostFS network.
type IssueSecretOptions ¶
type IssueSecretOptions struct { Container cid.ID AccessKeyID string SecretAccessKey string FrostFSKey *keys.PrivateKey GatesPublicKeys []*keys.PublicKey Impersonate bool SessionTokenRules []byte SkipSessionRules bool Lifetime time.Duration AwsCliCredentialsFile string ContainerPolicies ContainerPolicies CustomAttributes []object.Attribute }
IssueSecretOptions contains options for passing to Agent.IssueSecret method.
type NetworkState ¶
type NetworkState struct { // Current FrostFS time. Epoch uint64 // Duration of the Morph chain block in ms. BlockDuration int64 // Duration of the FrostFS epoch in Morph chain blocks. EpochDuration uint64 }
NetworkState represents FrostFS network state which is needed for authmate processing.
type ObtainSecretOptions ¶
type ObtainSecretOptions struct { Container cid.ID AccessKeyID string GatePrivateKey *keys.PrivateKey }
ObtainSecretOptions contains options for passing to Agent.ObtainSecret method.
type PrmContainerCreate ¶
type PrmContainerCreate struct { // FrostFS identifier of the container creator. Owner *keys.PublicKey // Container placement policy. Policy netmap.PlacementPolicy // Friendly name for the container (optional). FriendlyName string }
PrmContainerCreate groups parameters of containers created by authmate.
type UpdateOptions ¶ added in v0.28.0
UpdateOptions groups parameters to update existing the secret into.
type UpdateSecretOptions ¶ added in v0.28.0
type UpdateSecretOptions struct { FrostFSKey *keys.PrivateKey GatesPublicKeys []*keys.PublicKey IsCustom bool AccessKeyID string ContainerID cid.ID GatePrivateKey *keys.PrivateKey CustomAttributes []object.Attribute }
UpdateSecretOptions contains options for passing to Agent.UpdateSecret method.