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 Sep 23, 2021
1 parent aca967a commit 4dac4ef
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 @@ -218,10 +218,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 @@ -249,6 +245,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 4dac4ef

Please sign in to comment.