Compare commits

..

2 commits

Author SHA1 Message Date
ed4cc417b7 [#553] authmate: Add retryer to create access box
After using AddChain to provide access to container we have to wait:
* tx with APE chain be accepted by blockchain
* cache in storage node be updated

it takes a while. So we add retry
 (the same as when we add bucket settings during bucket creation)

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-11-19 11:22:39 +03:00
4253fc5b90 [#553] authmate: Don't use basic acl
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-11-18 15:32:10 +03:00
2 changed files with 7 additions and 8 deletions

View file

@ -42,7 +42,6 @@ type PrmContainerCreate struct {
AdditionalAttributes [][2]string AdditionalAttributes [][2]string
} }
// PrmAddContainerPolicyChain groups parameter of FrostFS.AddContainerPolicyChain operation.
type PrmAddContainerPolicyChain struct { type PrmAddContainerPolicyChain struct {
ContainerID cid.ID ContainerID cid.ID
Chain chain.Chain Chain chain.Chain

View file

@ -137,18 +137,18 @@ func (x *FrostFS) CreateContainer(ctx context.Context, prm frostfs.PrmContainerC
// AddContainerPolicyChain implements frostfs.FrostFS interface method. // AddContainerPolicyChain implements frostfs.FrostFS interface method.
func (x *FrostFS) AddContainerPolicyChain(ctx context.Context, prm frostfs.PrmAddContainerPolicyChain) error { func (x *FrostFS) AddContainerPolicyChain(ctx context.Context, prm frostfs.PrmAddContainerPolicyChain) error {
var prmAddAPEChain pool.PrmAddAPEChain
prmAddAPEChain.Target = ape.ChainTarget{
TargetType: ape.TargetTypeContainer,
Name: prm.ContainerID.EncodeToString(),
}
data, err := prm.Chain.MarshalBinary() data, err := prm.Chain.MarshalBinary()
if err != nil { if err != nil {
return err return err
} }
prmAddAPEChain := pool.PrmAddAPEChain{ prmAddAPEChain.Chain = ape.Chain{Raw: data}
Target: ape.ChainTarget{
TargetType: ape.TargetTypeContainer,
Name: prm.ContainerID.EncodeToString(),
},
Chain: ape.Chain{Raw: data},
}
err = x.pool.AddAPEChain(ctx, prmAddAPEChain) err = x.pool.AddAPEChain(ctx, prmAddAPEChain)
return handleObjectError("add ape chain to container", err) return handleObjectError("add ape chain to container", err)