Commit graph

8 commits

Author SHA1 Message Date
bd61f7bf0a [#1666] audit: Fix duplicated log in Patch method
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m17s
Pre-commit hooks / Pre-commit (push) Successful in 1m38s
Build / Build Components (push) Successful in 1m49s
Tests and linters / Run gofumpt (push) Successful in 2m10s
Tests and linters / Staticcheck (push) Successful in 2m21s
Tests and linters / Lint (push) Successful in 2m33s
Tests and linters / Tests with -race (push) Successful in 2m34s
Tests and linters / Tests (push) Successful in 2m59s
Tests and linters / gopls check (push) Successful in 3m1s
OCI image / Build container images (push) Successful in 4m12s
When we do `object patch` with audit enabled we get several
duplicated entries in logs.

`object patch` request is logged in 2 places:
1. `(*auditPatchStream) CloseAndRecv()` - when the client closes
   the request stream or when stream gets aborted.
2. `(*auditPatchStream) Send()` - when stream was NOT aborted.

`Send()` doesn't check if `err != nil` before logging.
It led to to logging on every `Send()` call.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-03-07 13:27:07 +00:00
471aeeaff3 [#1659] audit: Fix duplicated request logs
All checks were successful
DCO action / DCO (pull_request) Successful in 56s
Vulncheck / Vulncheck (pull_request) Successful in 1m23s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m44s
Build / Build Components (pull_request) Successful in 2m9s
Tests and linters / Tests with -race (pull_request) Successful in 4m2s
Tests and linters / gopls check (pull_request) Successful in 4m7s
Tests and linters / Lint (pull_request) Successful in 4m40s
Tests and linters / Run gofumpt (pull_request) Successful in 4m38s
Tests and linters / Tests (pull_request) Successful in 5m1s
Tests and linters / Staticcheck (pull_request) Successful in 5m14s
Vulncheck / Vulncheck (push) Successful in 1m12s
Build / Build Components (push) Successful in 1m53s
Pre-commit hooks / Pre-commit (push) Successful in 2m5s
Tests and linters / Tests with -race (push) Successful in 4m25s
Tests and linters / gopls check (push) Successful in 4m28s
OCI image / Build container images (push) Successful in 4m41s
Tests and linters / Staticcheck (push) Successful in 5m11s
Tests and linters / Lint (push) Successful in 5m20s
Tests and linters / Tests (push) Successful in 5m28s
Tests and linters / Run gofumpt (push) Successful in 8m5s
When we do `object put` with audit enabled we get several entries
in logs: with and without object id.

`object put` request is logged in 2 places:
1. `(*auditPutStream) CloseAndRecv()` - when the client closes the
   request stream or when stream gets aborted.
2. `(*auditPutStream) Send()` - when stream was NOT aborted.

`Send()` does error check for `ErrAbortStream` because if there
is any other error - CloseAndRecv will not be called and there
won't be any audit log about failed request.
It led to logging on every object chunck put, even if `err == nil`.

Added check for `err != nil` in `Send()` to fix it.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-03-06 12:36:16 +03:00
7429553266
[#1437] node: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-11-13 10:36:10 +03:00
9b13a18aac [#1479] go.mod: Bump frostfs-sdk-go version
* Update version within go.mod;
* Fix deprecated frostfs-api-go/v2 package and use frostfs-sdk-go/api
  instead.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-11-08 10:43:19 +03:00
d6b42972a8 [#1338] object: Fix audit patch stream
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-08-27 16:18:29 +03:00
e890f1b4b1 [#1307] object: Implement Patch method
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-08-16 14:13:09 +00:00
a4a1c3f18b [#1307] go.mod: Bump frostfs-sdk-go/frostfs-api-go/v2 versions
* Also, resolve dependencies and conflicts for object service
  by creating stub for `Patch` method.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-08-16 14:13:09 +00:00
ecd1ed7a5e [#1184] node: Add audit middleware for grpc services
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-06-19 16:05:53 +03:00