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

Option for more secure app passwords #3873

Closed
rugk opened this issue Mar 16, 2017 · 6 comments
Closed

Option for more secure app passwords #3873

rugk opened this issue Mar 16, 2017 · 6 comments

Comments

@rugk
Copy link

rugk commented Mar 16, 2017

The current app passwords (or "device/app pins") are quite short and only consist of capital letters (the hyphens can be added by any attacker as they are at specific positions), which violates all password best practises and policies (even the one you can set in NextCloud's password policy app). The login password is likely longer and if generated with a password manager also more secure (with a higher entropy).

So could you at least offer an option for more secure passwords (just the way password generators generate them, with all kinds of ASCII characters in it)? Either for the user or at least for the server admin?

@rugk rugk changed the title Short app passwords Option for more secure app passwords Mar 16, 2017
@MorrisJobke
Copy link
Member

cc @nickvergessen @rullzer

@MorrisJobke
Copy link
Member

cc @ChristophWurst

@rullzer
Copy link
Member

rullzer commented Mar 17, 2017

Yeah I'd like this!

@nickvergessen
Copy link
Member

I'd like to avoid this until we have a decent oauth endpoint, so the user doesn't have to type this anymore.

@stffabi
Copy link
Contributor

stffabi commented May 4, 2017

Wouldn't it be possible at least for the time being to use upper case, lower case characters and digits, and e.g. 5 blocks?

Should be fairly easy to change that here https://github.com/nextcloud/server/blob/master/settings/Controller/AuthSettingsController.php#L166

to e.g.

for ($i = 0; $i < 5; $i++) {
   $groups[] = $this->random->generate(5, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS);
}

That wouldn't make the device passwords that much harder to type in but would at least increase the entropy of the tokens.

@stffabi
Copy link
Contributor

stffabi commented May 4, 2017

@nickvergessen would you be interested in a PR for this? One could also add a config option for either old tokens or new token generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants