-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
if auth is enabled, what takes precedence user/pass or CN from client-cert #8584
Comments
The CN will take priority. And user/password will be ignored. |
package name shows v2http, i'm interested in v3 auth behavior. |
@gyuho @xiang90 @heyitsanthony For auth v3 the flow can be:
If an auth token is passed then the token should take priority not cert. This simplifies the management of client user/roles wrather than client cert CN. A common client cert be shared per team with each app having its own basic auth. Usecase: |
@gyuho @hongchaodeng @xiang90 @heyitsanthony but this means, users who enabled v3 auth with basicAuth can never enable client-cert-auth even if they want to as they cannot migrate all the clients at the same time. Also users who were managing their etcd clusters now want to migrate to etcd-operator but etcd-operator enables client-cert-auth by default on tls and the existing clients would break as basicAuth will be ignored.
why do you think it breaks backward compatibility? I don't see anywhere in documentation it is mentioned that if client-cert-auth is enabled then passed --user is ignored. Basic auth and client cert are never mentioned together. |
@gyuho do you think it is worth to keep this issue open? |
I believe username and password specified in the request should take priority over CN in the cert. If it is not the case, we need to make it happen somehow without breaking compatibility. |
/cc @mitake |
@xiang90 thank you |
I still don't understand the breaking of the compatibility part. Let me pen it down and attempt to make things more clear. ☕ Current BehaviorAs per docs
As per code
Implies:
We can argue that point number 2 is an assumption and we should not break even a single user who is making a mistake of sending Authorization header even though it is never used/worked. So if we really want to cover up others mistakes then we can add a new flag something like --prioritize-token-over-cn(ETCD_PRIORITIZE_TOKEN_OVER_CN) which should be false by default and upon enabling the order first checks token and if not found gets user from CN IMHO a flag is unnecessary here. We can just document it as a warning in the release notes. Feel free to disagree. |
@raoofm thanks for pointing out. I agree with changing the priority. I also think the new flag for configuring priority is overkill because prioritizing password based auth is natural (although I'm not fully sure about this point). |
@mitake thanks |
Just wanted to check if v3 auth is enabled and client-cert-auth is enabled
As mentioned here
What is the expected behavior if client cert and user/pass both are presented? Which one of these two take priority?
The text was updated successfully, but these errors were encountered: