mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-06-23 04:10:25 +00:00
30092c6a45
* Implement gRPC auth interceptors and update dependencies Introduced gRPC authentication interceptors for unary and stream calls in the agent's API to enhance security. These interceptors verify signatures based on roles before handling requests, rejecting unauthorized ones. The authentication logic was refactored, adding relevant error handling. Added mocks for authentication interfaces to facilitate testing and replaced direct errors with wrapped ones to provide additional context. The Makefile now includes a version pin for the Mockery tool, ensuring consistent mock generation across environments. Updated the gRPC server setup in `grpc.go` to utilize the new interceptors. This change aims to reinforce the API's access control by authenticating users according to their roles and is expected to prevent unauthorized access to sensitive endpoints. Lastly, dependencies in go.mod and go.sum were updated, most notably the inclusion of testify for improved testing capabilities. Signed-off-by: SammyOina <sammyoina@gmail.com> * fix linting errors Signed-off-by: SammyOina <sammyoina@gmail.com> * * chore(Makefile): remove unused variables and update 'mocks' target Signed-off-by: SammyOina <sammyoina@gmail.com> --------- Signed-off-by: SammyOina <sammyoina@gmail.com>