Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
idanovo committed Jul 31, 2024
1 parent 253fce1 commit 078a201
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 78 deletions.
6 changes: 1 addition & 5 deletions pkg/api/auth_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,11 @@ func AuthMiddleware(logger logging.Logger, swagger *openapi3.Swagger, authentica
writeError(w, r, http.StatusBadRequest, err)
return
}
user, err := checkSecurityRequirements(r, securityRequirements, logger, authenticator, authService, sessionStore, oidcConfig, cookieAuthConfig)
_, err = checkSecurityRequirements(r, securityRequirements, logger, authenticator, authService, sessionStore, oidcConfig, cookieAuthConfig)
if err != nil {
writeError(w, r, http.StatusUnauthorized, err)
return
}
if user != nil {
ctx := logging.AddFields(r.Context(), logging.Fields{logging.UserFieldKey: user.Username})
r = r.WithContext(auth.WithUser(ctx, user))
}
next.ServeHTTP(w, r)
})
}
Expand Down
Empty file modified pkg/block/s3/testdata/chunk250_data500.input
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk250_data500.output
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk250_data510.input
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk250_data510.output
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk3000_data10.input
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk3000_data10.output
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk5_data0.input
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk5_data0.output
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk5_data10.input
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk5_data10.output
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk600_data240.input
100755 → 100644
Empty file.
Empty file modified pkg/block/s3/testdata/chunk600_data240.output
100755 → 100644
Empty file.
22 changes: 12 additions & 10 deletions pkg/gateway/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,18 @@ func NewHandler(region string, catalog *catalog.Catalog, multipartTracker multip

h = loggingMiddleware(h)

h = EnrichWithOperation(sc,
DurationHandler(
AuthenticationHandler(authService, EnrichWithParts(bareDomains,
EnrichWithRepositoryOrFallback(catalog, authService, fallbackHandler,
OperationLookupHandler(
h))))))
logging.ContextUnavailable().WithFields(logging.Fields{
"s3_bare_domain": bareDomains,
"s3_region": region,
}).Info("initialized S3 Gateway handler")
if isCloud {
h = EnrichWithOperation(sc,
DurationHandler(
AuthenticationHandler(authService, EnrichWithParts(bareDomains,
EnrichWithRepositoryOrFallback(catalog, authService, fallbackHandler,
OperationLookupHandler(
h))))))
logging.ContextUnavailable().WithFields(logging.Fields{
"s3_bare_domain": bareDomains,
"s3_region": region,
}).Info("initialized S3 Gateway handler")
}
return h
}

Expand Down
Empty file.
63 changes: 0 additions & 63 deletions pkg/permissions/actions.gen.go

This file was deleted.

0 comments on commit 078a201

Please sign in to comment.