forked from TrueCloudLab/frostfs-node
[#92] Provide session token to all produced requests
If object service produces new request, the should contain session token. This is the only way for node to grant access for a private container. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
ace2362e74
commit
1332a6d3a8
4 changed files with 11 additions and 9 deletions
|
@ -20,7 +20,7 @@ type Service struct {
|
|||
type Option func(*cfg)
|
||||
|
||||
type RelationHeader interface {
|
||||
HeadRelation(context.Context, *objectSDK.Address) (*object.Object, error)
|
||||
HeadRelation(context.Context, *objectSDK.Address, *objutil.CommonPrm) (*object.Object, error)
|
||||
}
|
||||
|
||||
type cfg struct {
|
||||
|
@ -107,7 +107,7 @@ func (s *Service) Delete(ctx context.Context, prm *Prm) (*Response, error) {
|
|||
func (s *Service) getRelations(ctx context.Context, prm *Prm) ([]*objectSDK.Address, error) {
|
||||
var res []*objectSDK.Address
|
||||
|
||||
if linking, err := s.hdrLinking.HeadRelation(ctx, prm.addr); err != nil {
|
||||
if linking, err := s.hdrLinking.HeadRelation(ctx, prm.addr, prm.common); err != nil {
|
||||
cid := prm.addr.GetContainerID()
|
||||
|
||||
for prev := prm.addr.GetObjectID(); prev != nil; {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue