feat: Completed SigV4 authentication for the root user

This commit is contained in:
jonaustin09
2023-05-31 22:20:58 +04:00
parent 510cf6ed57
commit ecd28bc2f7
6 changed files with 132 additions and 31 deletions

View File

@@ -17,9 +17,8 @@ type S3ApiServer struct {
func New(app *fiber.App, be backend.Backend, port string, rootUser utils.RootUser) (s3ApiServer *S3ApiServer, err error) {
s3ApiServer = &S3ApiServer{app, be, new(S3ApiRouter), port}
utils.GetRootUserCreds()
app.Use(middlewares.CheckUserCreds(rootUser))
app.Use(middlewares.VerifyV4Signature(rootUser))
app.Use(logger.New())
s3ApiServer.router.Init(app, be)
return