[#1574] tree: Introduce debug logging for APE check failures
All checks were successful
DCO action / DCO (pull_request) Successful in 31s
Vulncheck / Vulncheck (pull_request) Successful in 1m0s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m29s
Build / Build Components (pull_request) Successful in 1m33s
Tests and linters / Lint (pull_request) Successful in 3m0s
Tests and linters / Staticcheck (pull_request) Successful in 2m55s
Tests and linters / Run gofumpt (pull_request) Successful in 2m56s
Tests and linters / Tests (pull_request) Successful in 3m5s
Tests and linters / gopls check (pull_request) Successful in 3m56s
Tests and linters / Tests with -race (pull_request) Successful in 4m1s
All checks were successful
DCO action / DCO (pull_request) Successful in 31s
Vulncheck / Vulncheck (pull_request) Successful in 1m0s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m29s
Build / Build Components (pull_request) Successful in 1m33s
Tests and linters / Lint (pull_request) Successful in 3m0s
Tests and linters / Staticcheck (pull_request) Successful in 2m55s
Tests and linters / Run gofumpt (pull_request) Successful in 2m56s
Tests and linters / Tests (pull_request) Successful in 3m5s
Tests and linters / gopls check (pull_request) Successful in 3m56s
Tests and linters / Tests with -race (pull_request) Successful in 4m1s
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
521e72b995
commit
060e4b2f76
1 changed files with 13 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||||
core "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/container"
|
core "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||||
checkercore "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/common/ape"
|
checkercore "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/common/ape"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/refs"
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/refs"
|
||||||
|
@ -19,6 +20,7 @@ import (
|
||||||
frostfsecdsa "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
frostfsecdsa "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||||
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
type message interface {
|
type message interface {
|
||||||
|
@ -65,6 +67,17 @@ func (s *Service) verifyClient(ctx context.Context, req message, cid cidSDK.ID,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = s.checkAPE(ctx, bt, cnr, cid, op, role, pubKey); err != nil {
|
if err = s.checkAPE(ctx, bt, cnr, cid, op, role, pubKey); err != nil {
|
||||||
|
var chainRouterErr *checkercore.ChainRouterError
|
||||||
|
if errors.As(err, &chainRouterErr) {
|
||||||
|
s.log.Debug(ctx, logs.APECheckDeniedRequest,
|
||||||
|
zap.Stringer("status", chainRouterErr.Status()),
|
||||||
|
zap.String("operation", chainRouterErr.Request().Operation()),
|
||||||
|
zap.Any("target", chainRouterErr.Target()),
|
||||||
|
zap.Any("request_properties", chainRouterErr.Request().Properties()),
|
||||||
|
zap.Any("resource_name", chainRouterErr.Resource().Name()),
|
||||||
|
zap.Any("resource_properties", chainRouterErr.Resource().Properties()),
|
||||||
|
)
|
||||||
|
}
|
||||||
return apeErr(err)
|
return apeErr(err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue