diff --git a/api/layer/container.go b/api/layer/container.go index 6d49926da..8b816162f 100644 --- a/api/layer/container.go +++ b/api/layer/container.go @@ -26,8 +26,6 @@ type ( } ) -const nnsNameAttr = "__NEOFS__NAME" - func (n *layer) containerInfo(ctx context.Context, cid *cid.ID) (*data.BucketInfo, error) { var ( err error @@ -128,8 +126,8 @@ func (n *layer) createContainer(ctx context.Context, p *CreateBucketParams) (*ci container.WithPolicy(p.Policy), container.WithCustomBasicACL(p.ACL), container.WithAttribute(container.AttributeName, p.Name), - container.WithAttribute(nnsNameAttr, p.Name), container.WithAttribute(container.AttributeTimestamp, strconv.FormatInt(bktInfo.Created.Unix(), 10))) + container.SetNativeName(cnr, p.Name) cnr.SetSessionToken(p.SessionToken) cnr.SetOwnerID(bktInfo.Owner) diff --git a/authmate/authmate.go b/authmate/authmate.go index abd067061..d6ed17f74 100644 --- a/authmate/authmate.go +++ b/authmate/authmate.go @@ -115,6 +115,7 @@ func (a *Agent) checkContainer(ctx context.Context, cid *cid.ID, friendlyName st container.WithCustomBasicACL(defaultAuthContainerBasicACL), container.WithAttribute(container.AttributeName, friendlyName), container.WithAttribute(container.AttributeTimestamp, strconv.FormatInt(time.Now().Unix(), 10))) + container.SetNativeName(cnr, friendlyName) cid, err = a.pool.PutContainer(ctx, cnr) if err != nil {