-
Notifications
You must be signed in to change notification settings - Fork 4.4k
PR: Set autocomplete="off"
for new auth fields
#30444
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
Conversation
CI Results: |
Build Results: |
@@ -20,15 +18,4 @@ interface Field { | |||
export default class AuthFields extends Component<Args> { | |||
// token or password should render as "password" types, otherwise render text inputs | |||
setInputType = (field: string) => (['token', 'password'].includes(field) ? 'password' : 'text'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is small enough it could happen in the component, but I thought the interfaces might be helpful in the future:
vault/ui/app/components/auth/fields.ts
Lines 8 to 16 in e95f145
interface Args { | |
loginFields: Field[]; | |
} | |
interface Field { | |
name: string; // sets input name | |
label?: string; // label will be "name" capitalized unless label exists | |
helperText?: string; | |
} |
If they seem unnecessary, happy to remove the backing class!
* set autocomplete to off * add comment * update test
* set autocomplete to off * add comment * update test
Description
After consulting with security folks, we decided to hold off on implementing "autocomplete" functionality in the login form for now. There's concern this will upset the security expectations of some users.
We can revisit this if a strong case comes up to support autocomplete. If we end up making this change, we will likely only support autocomplete for non-token fields.
TODO only if you're a HashiCorp employee
backport/
label that matches the desired release branch. Note that in the CE repo, the latest release branch will look likebackport/x.x.x
, but older release branches will bebackport/ent/x.x.x+ent
.of a public function, even if that change is in a CE file, double check that
applying the patch for this PR to the ENT repo and running tests doesn't
break any tests. Sometimes ENT only tests rely on public functions in CE
files.
in the PR description, commit message, or branch name.
description. Also, make sure the changelog is in this PR, not in your ENT PR.