Skip to content

From Authentication Hashes #2428

Closed

Description

@alexte

I started implementing delegated authentication or ldap/api auth.
For this I try to understand your authentication mechanisms.

If I read your code correctly, password check works like this:
. Client asks for salt and nonce.
. Server gives salt from config file and random nonce
. Client hashes password with salt and again with nonce
. Server hashes passwordhash from config with nonce and compares.

IMHO at the end the password is actually not needed for authentication.
If you have the passwordhash you can login, because the server will tell
you the same salt your config file passwordhash has.

. If the client gets the passwordhash somehow
. Client asks for salt and nonce
. Server gives salt and nonce
. Client ignores salt, and hashes the passwordhash with nonce
. server compares ok

This means the password in the config file, works actually as a plain text password.

I think every challenge/response mechanism for login ends up with a plaintext passwords on the server side.

Please tell me if I'm wrong.

Why didn't you go the usual way:
. tell admins to use https
. send the password plain through https
. do the usual hash on the server

that's what the other do when not using TFA: twitter, facebook, microsoft...

Activity

  1. Alkarex commented on Jun 23, 2019

    @Alkarex
    Member

    Hello,
    You can see this old diagram for a bit of documentation #104 (comment)
    It is true that the current Web-form login option is not robust against all forms of attacks, and we could/should have used a more sophisticated protocol (e.g. SIP). Design priorities (from memory) were:

    • Do not store plain-text passwords (the focus being on avoiding problems when the same password is used on other sites)
    • Do not transmit plain-text passwords nor hashed passwords
    • Provide some basic security for non-HTTPS contexts (e.g. replay attacks...)

    The last point in particular differs from your suggestion. The targetted audience, especially when it was designed in 2014, could often-times not deploy HTTPS. Nowadays, it is less of a problem of course, but we still cannot be sure all deployments will have proper HTTPS.

    By the way, I plan to add a login option based on WebAuthn (which will require HTTPS).

    P.S.: We also have an HTTP Basic Auth login option, which more or less does what you ask

  2. Frenzie commented on Jun 23, 2019

    @Frenzie
    Member

    I think a bit of obfuscation without SSL, even if easily circumvented, can still offer some protection against random sniffing.

    But yeah, if you can just use Let's Encrypt. ;-)

  3. alexte commented on Jun 23, 2019

    @alexte
    Author

    Thank you for you response.

    You are right. BasicAuth might be a workaround for my case (if freshrss, allows auto registration for authenticated users).

    The main disadvantages of basic auth from my point of view are:
    . the client keeps the password in memory and sends it with every request
    . there is no easy way to logout, directly or indirectly

    My suggestion for freshrss would be:

    seperate authentication and authorization.

    allow a plugin to do whatever authentication possible (oauth, webauth, onetimepaswords, sms auth, RESTapi, LDAP, TFA, google-login, apple-login). Independent of your software.

    And hand out a long living authorization token on successful authentication, when the auth
    plugin asks for createUser() and/or getAuthToken().

    this also helps for the API and would allow to devalidate authenticated devices, that are
    lost/offline. And neither the client nor the server would need to store the plaintext password,
    or equivalent. Still this long and random auth token only works when the client server connection
    is secure.

    BTW: thanks for your nice software ! :-)

  4. Alkarex commented on Jun 26, 2019

    @Alkarex
    Member

    Yes, a plug-in approach would probably be a good idea.
    For login out when using Basic Auth, one can just follow a link, which contains invalid username:password.

  5. math-GH commented on Sep 3, 2022

    @math-GH
    Contributor

    @alexte How is the progress?

  6. added this to the 1.31.0 milestone on Oct 30, 2026
  7. added a commit that references this issue on Oct 31, 2026
    76e8993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions