Skip to content

Commit

Permalink
run the public share auth middleware after the create home middleware
Browse files Browse the repository at this point in the history
The x-access-token for public shares is scoped for only the share. That means create home would fail because the token is not valid.
  • Loading branch information
David Christofas committed Oct 1, 2021
1 parent 50cdb03 commit 4063323
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions proxy/pkg/command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,6 @@ func loadMiddlewares(ctx context.Context, logger log.Logger, cfg *config.Config)
middleware.OIDCIss(cfg.OIDC.Issuer),
middleware.CredentialsByUserAgent(cfg.Reva.Middleware.Auth.CredentialsByUserAgent),
),
middleware.PublicShareAuth(
middleware.Logger(logger),
middleware.RevaGatewayClient(revaClient),
),
middleware.SignedURLAuth(
middleware.Logger(logger),
middleware.PreSignedURLConfig(cfg.PreSignedURL),
Expand Down Expand Up @@ -253,6 +249,10 @@ func loadMiddlewares(ctx context.Context, logger log.Logger, cfg *config.Config)
middleware.TokenManagerConfig(cfg.TokenManager),
middleware.RevaGatewayClient(revaClient),
),
middleware.PublicShareAuth(
middleware.Logger(logger),
middleware.RevaGatewayClient(revaClient),
),
)
}

Expand Down

0 comments on commit 4063323

Please sign in to comment.