redpanda-data / redpanda-data/console

Base path stripped from request url for /security/acls request, causes 405 response code

Open
#2,041 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.3k
Forks
432
Avg merge
3d 6h
Merged PRs (30d)
40

Description

Hello,

We have an issue accessing Security Access Control ACLs tab (/security/acl), in redpanda-console interface.
Access to redpanda-console is facilitated through a nginx reverse proxy, having a location where X-Forwarded-Prefix header is set to: /redpanda-console.
In redpanda-console config we use:
server:
setBasePathFromXForwardedPrefix: true

Example of header for a succesful request (http code 200):
Request URL Header: https://app-dev.ing.net/redpanda-console/api/topics
Referer Header: https://app-dev.ing.net/redpanda-console/topics

Example of Request URL Header, for ACLs tab request (http code 405):
Request URL Header: https://app-dev.ing.net/redpanda.api.dataplane.v1.ACLService/ListACLs
Referer Header: https://app-dev.ing.net/redpanda-console/security/acls

As you can see, for /security/acls, the base path prefix is stripped from the request URL.

We are using redpanda-console 3.3.1. This issue is present in 3.2.1 also.

Can you clarify what the cause is, and if you can deliver a fix for this?

Thank you,
Gabriel Patrascu

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Security ACLs request behind the nginx reverse proxy with X-Forwarded-Prefix set to /redpanda-console, then compare it with the working topics request. Trace the request entry point and base-path handling; done means the ACL request retains the /redpanda-console prefix and no longer returns 405.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx, typescript
Domain
api, authorization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.