Open Bug 634697 Opened 10 years ago Updated 2 months ago

Remember user's client certificate selection across sessions

Categories

(Core :: Security: PSM, enhancement, P1)

x86
Windows 7
enhancement

Tracking

()

ASSIGNED

People

(Reporter: t.petrzilka, Assigned: mbirghan)

References

(Blocks 1 open bug)

Details

(Whiteboard: [psm-assigned])

Attachments

(3 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:2.0b11) Gecko/20100101 Firefox/4.0b11
Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b11) Gecko/20100101 Firefox/4.0b11

When page requires user certificate for https connection, the dialog for selecting right certificate comes every time after browser restart, although, option at the bottom of dialog to remember my choice was previously selected. (certificate is already successfully imported in browser)

Reproducible: Always

Steps to Reproduce:
0.Goto site configured for https connection requiring user certificate, select right certificate and mark checkbox to remember this choice in the dialog, continue.

1.Restart Firefox
2.Goto site configured for https connection requiring user certificate
Actual Results:  
The dialog for selecting certificate shows up again.


Expected Results:  
Firefox should connect to the site without any inquiries about selecting certificate.
Adg asked to have this bug assigned to them.
Assignee: nobody → amandeepgautam
I was not able to reproduce the bug on Firefox/4.0b11 as told. If you check the button corresponding to the "permanently store this exception" firefox successfully remembers->options->advanced->encryption->view certificates->servers.
Assignee: amandeepgautam → nobody
Tomas, can you try to reproduce this with the latest nightly Firefox 4.0b12pre?  Thanks.
I can confirm, that FF 4.0b12 (not nightly) is still behaving as described before.

Also when the dialog for choosing the certificate is canceled it won't come back after attempt for another connection to the server.

----
Firefox 4.0b12 
Mozilla/5.0 (Windows NT 6.1; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
(In reply to comment #3)
> I was not able to reproduce the bug on Firefox/4.0b11 as told. If you check the
> button corresponding to the "permanently store this exception" firefox
> successfully remembers->options->advanced->encryption->view
> certificates->servers.

The certificate is client-side so the exception dialog in: options->advanced->encryption->view certificates->servers
is not useful cause there is no server URL to remember the exception for.

The dialog I described is IMHO shown at very rare circumstances as for professional use mostly.. But still used.. 

It's just a glitch with lower importance..
Severity: normal → minor
Adding Paul to the cc list of this bug. Paul, is there some interaction with Session Store that could be causing this bug?

Tomas, would it be possible for you to either link or attach a test case we can use to try to reproduce this bug?
(In reply to comment #7)
> Adding Paul to the cc list of this bug. Paul, is there some interaction with
> Session Store that could be causing this bug?

Session Restore doesn't do anything with certs, so highly unlikely.
I also have this problem with an Aladdin E-Token.
I had the same 'issue' as described above, but I recognized the flag "Options->Advanced->Encryption->Certificates - When a site asks for a certificate:" (or similar, using German version). I switched from "Ask everytime" to "Select one automatically".
However, I'm not sure what this means exactlly does - in my opinion this misses a third option like "Ask only if new" or something. Maybe "Ask everytime" just ignores already stored site-cert associations?

---
Firefox 7.0.1 (German)
Win 7 x64
I have been annoyed by this problem for years, mentioned in in talks, discussed it with Anne van K in the TAG, and general taken it as indicating a lack of interest at Mozilla in client-side certs.   (Chrome does not have this problem, and so is easier to use if you use client certs a lot.)  At least from the discussion here it seems to be recognized as  bug -- but has a status of "UNCONFIRMED" surprises me.  So maybe it difficult to reproduce.  If it is supposed to work, where is the site->cert mapping stored?
For what it's worth, I can reproduce the bug. You're right that client-side certificate-related features aren't a high priority right now, since the majority of our users don't use them. It's unfortunate, but limited engineering resources mean we can't address everything we might want to.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Sufficient support of client certificates is one of the reasons, I use FireFox.

(In reply to Tim Berners-Lee from comment #11)
> So maybe it difficult to reproduce.

To my experience reproduction of this issue requires not very typical configuration: it need user, having several the same time valid client certificates in a certification chain. That, as I know, is not typical.
In the rest cases auto-fit client certificate works rather well.

(In reply to David Keeler [:keeler] (use needinfo?) from comment #12)
> For what it's worth, I can reproduce the bug. You're right that client-side
> certificate-related features aren't a high priority right now, since the
> majority of our users don't use them. It's unfortunate, but limited
> engineering resources mean we can't address everything we might want to.

Orienting on popularity NOW you can miss future.
Support of client certificates is not widely spread (yet?), but very _important_ (!) feature.

This feature (client certificates) is lessly used, than it should, because of insufficient support in clients.
And is lessly supported because of rare use.

P.S. Not long ago I've generate a certificate set for localhost to reproduce this issue.
If Mozilla developers need, I can attach these certs to this bug and, if necessary, consult in configuration of Apache web server (although it seems to be trivial).
This bug could have a more straightforward summary.
Summary: ff doesn't remember choice of certificate for https connection from previous session although "remember choice was selected" → Remember user's client certificate selection across sessions
Duplicate of this bug: 949443
Ref. my reply to related Thunderbird bug 803975 comment #6

In the present context, does the behaviour happen even if the preference "Ask me every time" is not selected?

In any case there is still Tim Berners-Lee's question in comment #11:
> If it is supposed to work, where is the site->cert mapping stored?
Duplicate of this bug: 1184411
Duplicate of this bug: 803975
Blocks: 803975
Duplicate of this bug: 1300289

(In reply to Tomáš from comment #6)

(In reply to comment #3)
The dialog I described is IMHO shown at very rare circumstances as for
professional use mostly.. But still used..

No, it happens to everyone who uses certificates* to do their taxes online, access their bank account etc.

  • even with a single installed certificate, the dialog is shown each time
Assignee: nobody → mbirghan

Found this bugzilla-entry by googleing for a solution for my problem - I have two client-certificates - one already expired and one is valid.
By default the already expired certificate is selected (due to the lower serial-number?) which is annoying because no error-message is displayed if I try to connect to the server with this expired client-cert - just an empty page. Checked with the webdeveloper-tools - there is a message that is at least a hint for the error that just occured ("SSL_ERROR_EXPIRED_CERT_ALERT").
And yes - I checked the "remeber this decision" for the valid client-cert with the higher serial-number. But after a browser-restart the expired certificate is the default-selection again.
Yes - the workaround would be to remove the expired client-cert from Firefox' certificate-store. But a workaround does not eliminate a bug ;-)

If I can help with some testing from user's side (as I am "only" a webdeveloper and webserver-admin, not a Firefox-programmer) I will be happy to do so.

Status: NEW → ASSIGNED
Type: defect → enhancement
Priority: -- → P3
Pushed by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a538b0497336
Refactoring nsClientAuthRememberService to work as a service r=keeler
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4143bf08dfe6
Backed out changeset a538b0497336 for causing android build bustages in /builds/worker/workspace/build/src/security/manager/ssl/nsNSSComponent.cpp CLOSED TREE

Moritz - when you fix the build issues, let's land this in a new bug so that the original purpose of this bug doesn't get lost.

Comment on attachment 9126100 [details]
Bug 634697 - Refactoring nsClientAuthRememberService to work as a service

Revision D62585 was moved to bug 1618710. Setting attachment 9126100 [details] to obsolete.

Attachment #9126100 - Attachment is obsolete: true

Comment on attachment 9110916 [details]
Bug 634697 - Remember user's client certificate selection across sessions

Revision D54336 was moved to bug 1620976. Setting attachment 9110916 [details] to obsolete.

Attachment #9110916 - Attachment is obsolete: true
Depends on: 1620976
Flags: needinfo?(mbirghan)

Dana, it looks like this new data storage could effectively be used as a source for (abridged) browser history and should come under our regular data clearing mechanisms, so that "clear recent history...", "forget about this site", the forget button and other mechanisms we have clear the data when the user chooses to do that. Can that happen here, or if not, would you mind filing a follow-up bug to hook this all into nsIClearDataService, if that's not already part of the patches here? That way we don't end up creating a privacy liability when fixing this bug. Thank you!

Flags: needinfo?(dkeeler)

Yes, that can happen here. Thanks for the reminder!

Flags: needinfo?(dkeeler)
Component: Security → Security: PSM
Priority: P3 → P1
Product: Firefox → Core
Whiteboard: [psm-assigned]
You need to log in before you can comment on or make changes to this bug.