Closed buger closed 1 month ago
โฑ๏ธ Estimated effort to review: 3 ๐ต๐ต๐ตโชโช |
๐งช No relevant tests |
๐ No security concerns identified |
โก Key issues to review Code Quality The new hashing and token functions added to `storage.go` introduce significant complexity and potential for errors. It's recommended to add unit tests to ensure the correctness of these functions, especially since they handle sensitive operations like token generation and hashing. |
No code suggestions found for the PR.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
User description
Revert "TT-2539 added access/transaction logs" (#6524)
User description
Reverts TykTechnologies/tyk#6354 with QA failure
PR Type
enhancement, bug fix
Description
AccessLogsConfig
struct and related access log configurations from the codebase.crypto
tostorage
, consolidating related functionality.Changes walkthrough ๐
8 files
config.go
Remove access logs configuration from analytics settings
config/config.go
AccessLogsConfig
struct and its usage.middleware.go
Remove access log recording function from middleware
gateway/middleware.go - Removed `recordAccessLog` function.
hash.go
Remove crypto hashing functions
internal/crypto/hash.go - Deleted the entire file related to hashing functions.
token.go
Remove token generation and parsing functions
internal/crypto/token.go - Deleted the entire file related to token generation and parsing.
access_log.go
Remove access log record functionality
internal/httputil/accesslog/access_log.go - Deleted the entire file related to access log records.
alias.go
Remove storage alias for crypto functions
storage/alias.go
storage.go
Integrate hashing and token functions into storage
storage/storage.go - Moved hashing and token functions from `crypto` to `storage`.
schema.json
Remove access logs configuration from schema
cli/linter/schema.json - Removed `access_logs` configuration from the schema.
2 files
handler_error.go
Remove transaction log printing in error handler
gateway/handler_error.go - Removed transaction log printing for error situations.
handler_success.go
Remove transaction log printing in success handler
gateway/handler_success.go - Removed transaction log printing for successful requests.
3 files
handler_error_test.go
Remove access logs benchmark tests from error handler tests
gateway/handler_error_test.go - Removed benchmark tests related to access logs.
handler_success_test.go
Remove access logs benchmark tests from success handler tests
gateway/handler_success_test.go - Removed benchmark tests related to access logs.
access_log_test.go
Remove access log tests
internal/httputil/accesslog/access_log_test.go - Deleted the entire file related to access log tests.
1 files
Taskfile.yml
Update test command in Taskfile
internal/httputil/Taskfile.yml - Updated test command to remove specific coverage package.
PR Type
Bug fix, Enhancement
Description
AccessLogsConfig
struct and related configurations from the codebase.crypto
tostorage
, consolidating related functionality.Changes walkthrough ๐
9 files
config.go
Remove access logs configuration from analytics settings
config/config.go
AccessLogsConfig
struct and its usage.handler_error.go
Remove transaction log printing in error handler
gateway/handler_error.go - Removed transaction log printing for error situations.
handler_success.go
Remove transaction log printing in success handler
gateway/handler_success.go - Removed transaction log printing for success situations.
middleware.go
Remove access log recording function
gateway/middleware.go - Removed `recordAccessLog` function.
hash.go
Remove hash functions from crypto package
internal/crypto/hash.go - Removed hash-related functions.
token.go
Remove token functions from crypto package
internal/crypto/token.go - Removed token-related functions.
access_log.go
Remove access log record struct and methods
internal/httputil/accesslog/access_log.go - Removed access log record struct and related methods.
alias.go
Remove crypto alias references in storage
storage/alias.go - Removed alias references to crypto package.
storage.go
Move hashing and token functions to storage package
storage/storage.go - Moved hashing and token functions from `crypto` to `storage`.
3 files
handler_error_test.go
Remove access log benchmark tests from error handler tests
gateway/handler_error_test.go - Removed benchmark tests related to access logs.
handler_success_test.go
Remove access log benchmark tests from success handler tests
gateway/handler_success_test.go - Removed benchmark tests related to access logs.
access_log_test.go
Remove tests for access log record struct
internal/httputil/accesslog/access_log_test.go - Removed tests for access log record struct.
2 files
schema.json
Remove access logs configuration from schema
cli/linter/schema.json - Removed access logs configuration from schema.
Taskfile.yml
Update test coverage configuration in Taskfile
internal/httputil/Taskfile.yml - Updated test coverage configuration.