Improve logs for APE checking #1574

Open
opened 2024-12-20 09:57:11 +00:00 by dkirillov · 1 comment
Member

Sometime storage node returns Access Denied after APE checking and we not always can understand what goes wrong.
We can know what policies presence in system with frostfs-adm morph ape list-rule-chains but we don't know what request be checked in APE.

Describe the solution you'd like

Add debug logs here for example
and in any other similar places.
Something like in s3-gw

reqLogOrDefault(r.Context(), cfg.Log).Debug(logs.PolicyRequest, zap.String("action", op),
zap.String("resource", res), zap.Any("request properties", requestProps),
zap.Any("resource properties", resourceProps))

Describe alternatives you've considered

Hide such debug logs behind tags

Additional context

Having such additional logs could help understand the reason of #1572 faster

## Is your feature request related to a problem? Please describe. Sometime storage node returns `Access Denied` after APE checking and we not always can understand what goes wrong. We can know what policies presence in system with `frostfs-adm morph ape list-rule-chains` but we don't know what request be checked in APE. ## Describe the solution you'd like Add debug logs [here](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/df05057ed46632e7746fcaa26731987a9070b2e5/pkg/services/common/ape/checker.go#L98) for example and in any other similar places. Something like in s3-gw https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/e0ce59fd32beb9274e48adf1c52d41292ceeafd5/api/middleware/policy.go#L201-L203 ## Describe alternatives you've considered Hide such debug logs behind tags ## Additional context Having such additional logs could help understand the reason of https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/1572 faster
dkirillov added the
triage
label 2024-12-20 09:57:11 +00:00
fyrchik added the
frostfs-node
observability
labels 2024-12-25 09:53:22 +00:00
Owner

I suggest extending ChainRouterError with target and use it in stringified representation.

I suggest extending `ChainRouterError` with target and use it in stringified representation.
aarifullin self-assigned this 2025-02-24 13:14:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1574
No description provided.