authmate

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent contains client communicating with NeoFS and logger.

func New

func New(log *zap.Logger, conns pool.Pool) *Agent

New creates an object of type Agent that consists of Client and logger.

func (*Agent) IssueSecret

func (a *Agent) IssueSecret(ctx context.Context, w io.Writer, options *IssueSecretOptions) error

IssueSecret creates an auth token, puts it in the NeoFS network and writes to io.Writer a new secret access key.

func (*Agent) ObtainSecret

func (a *Agent) ObtainSecret(ctx context.Context, w io.Writer, options *ObtainSecretOptions) error

ObtainSecret receives an existing secret access key from NeoFS and writes to io.Writer the secret access key.

type ContainerPolicies added in v0.17.0

type ContainerPolicies map[string]string

ContainerPolicies contains mapping of aws LocationConstraint to neofs PlacementPolicy.

type IssueSecretOptions

type IssueSecretOptions struct {
	ContainerID           *cid.ID
	ContainerFriendlyName string
	NeoFSKey              *keys.PrivateKey
	GatesPublicKeys       []*keys.PublicKey
	EACLRules             []byte
	ContextRules          []byte
	SessionTkn            bool
	Lifetime              uint64
	AwsCliCredentialsFile string
	ContainerPolicies     ContainerPolicies
}

IssueSecretOptions contains options for passing to Agent.IssueSecret method.

type ObtainSecretOptions

type ObtainSecretOptions struct {
	SecretAddress  string
	GatePrivateKey *keys.PrivateKey
}

ObtainSecretOptions contains options for passing to Agent.ObtainSecret method.

Jump to

Keyboard shortcuts

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