Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: support hide the authentication header in basic-auth and key-auth plugins #5900

Closed
starsz opened this issue Dec 23, 2021 · 4 comments · Fixed by #6039
Closed
Labels
good first issue Good for newcomers

Comments

@starsz
Copy link
Contributor

starsz commented Dec 23, 2021

Issue description

Hello,
When using base-auth plugins, I don't want to pass the Authentication header to upstream.
IMO, there is no need for upstream to perceive these authentication headers.

Now, I use proxy-rewrite plugin to rewrite the Authentication head like this:

 "plugins": {
        "basic-auth": {},
        "proxy-rewrite": {
            "headers": {
                "Authorization": ""
            }
        }
    },

I think we can add a config in the basic-auth plugin to hide the auth head.
That will be more convenient in using these plugins. So do key-auth plugin.

Environment

  • apisix version (cmd: apisix version): 2.11.0
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):
  • apisix-dashboard version, if have:
  • the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
  • luarocks version, if the issue is about installation (cmd: luarocks --version):
@tokers
Copy link
Contributor

tokers commented Dec 23, 2021

Agress +1.

@tzssangglass
Copy link
Member

useful, maybe *-auth plugins are all needed

@tokers
Copy link
Contributor

tokers commented Dec 24, 2021

useful, maybe *-auth plugins are all needed

Exactly.

@spacewander
Copy link
Member

useful, maybe *-auth plugins are all needed

I don't think blindly applying this to other *-auth plugins is a good idea. Take jwt-auth as an example, the JWT token serves both as a user id and storage containing user info. We should discuss it plugin by plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants