Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 558229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:06:35+00:00 2026-05-13T12:06:35+00:00

I want to use HTTP Digest Authentication with a central database that stores usernames

  • 0

I want to use HTTP Digest Authentication with a central database that stores usernames and encrypted passwords. These data should be used by different servers like Apache httpd or Tomcat for example. The clients will be humans with browsers and other applications communicating in a RESTful way.

As far as I understand I could not use a table with hashed passwords. It is only possibly to store HA1 = MD5(username:realm:password) where a clear text password is required – correct?

On the other hand it seems to be possible to use hashed passwords with Apache httpd:

Apache httpd doc says:

The first column value of the first
row returned by the query statement
should be a string containing the
encrypted password.

Does it work with digest authentication? There is no parameter to specify the hash algorithm. How does Apache httpd decide which algorithm to use?

RFC 2617 says:

4.13 Storing passwords

Digest authentication requires that
the authenticating agent (usually
the server) store some data derived
from the user’s name and password
in a “password file” associated with a
given realm. Normally this might
contain pairs consisting of username
and H(A1), where H(A1) is the
digested value of the username, realm,
and password as described above.

It sounds like the password has to be clear text.

The Servlet 3.0 spec says:

Although passwords are not sent on the
wire, HTTP Digest authentication
requires that clear text password
equivalents be avaialble to the
authenticating container so that it
can validate received authenticators
by calculating the expected digest.

What is the “clear text password equivalent” here? The password hash?

Tomcat documentation says:

If using digested passwords with
DIGEST authentication, the cleartext
used to generate the digest is
different. In the examples above
{cleartext-password} must be replaced
with
{username}:{realm}:{cleartext-password}.
For example, in a development
environment this might take the form
testUser:localhost:8080:testPassword.

Here is a clear text password required.

So, can HTTP Digest authentication be used with already encrypted passwords or have the passwords to be clear text?

Must the user re-enter his credentials if he requests a page from a different subdomain?

Does the browser delete the cached password when the tab is closed or only when the whole is closed? Maybe this differs from browser to browser – I’d be interested in which browser delete it and which keep it.

The overall question is, whether digest authentication is suitable for my scenario with a central user db with already encrypted passwords. Or should I better use session based single sign on service?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:06:36+00:00Added an answer on May 13, 2026 at 12:06 pm

    In this scenario where you have already a database of hashed passwords it’s not possible to use digest authentication as far as they were not hashed using the same function.

    I think the best solution for you here is create a login page and use cookie sessions to control the privileges of the users. With this solution you get the answer for the other questions:

    • The cookie can be set to be use between subdomains: http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_attributes
    • The session is going to be valid until the users close the browser, the timeout expired or the users click in the logoff button. Never forget to offer this option to your users!!!
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 375k
  • Answers 375k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer just look at the Latest WPF Toolkit they have introduced… May 14, 2026 at 8:11 pm
  • Editorial Team
    Editorial Team added an answer This helps: window.onload = function () { for (var i… May 14, 2026 at 8:11 pm
  • Editorial Team
    Editorial Team added an answer In WPF this kind of chart is absolutely trivial. No… May 14, 2026 at 8:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.