Issue 39382 - OOo won't access certificate stored in token or SmartCard
Summary: OOo won't access certificate stored in token or SmartCard
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: OOo 2.0
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 2.0.4
Assignee: frank
QA Contact: issues@framework
URL:
Keywords: oooqa, security
: 65771 (view as issue list)
Depends on:
Blocks:
 
Reported: 2004-12-21 10:28 UTC by Roberto Salomon
Modified: 2006-10-21 12:43 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Roberto Salomon 2004-12-21 10:28:04 UTC
Once a certificate is stored in Mozilla's Software Security Device, I am able to
sign documents using it. However, certificates stored in hardware devices, such
as a USB Token, are not accessed even though they are correctly configured in
Mozilla and can be used by it to sign e-mails. Since these certificates stored
in hardware are usable in Evolution through libnss, I assume that OOo has still
to implement the interface to access these devices. Is this currently a
restriction or are there plans to implement access to hardware devices though
libnss?

Environment: SuSE Linux 9.2, Java 1.5.0, OOo 2.0 (1.9 m65)

eAladdin eToken Pro
Comment 1 michael.ruess 2004-12-21 10:47:10 UTC
framework issue.
Comment 2 mci 2004-12-21 18:20:20 UTC
reassigned to reauirements...
Comment 3 mci 2004-12-22 12:51:18 UTC
This issue is duplicate to issue 39448...

*** This issue has been marked as a duplicate of 39448 ***
Comment 4 mci 2004-12-22 12:53:05 UTC
.
Comment 5 frank 2005-03-31 14:30:55 UTC
reopened for fixing an Issue with USB Sticks bound to mozillas security device
Comment 6 frank 2005-03-31 14:36:34 UTC
Hi Malte,

please have a look at this Issue.

Frank
Comment 7 frank 2005-03-31 14:41:35 UTC
Have a look at the latest comment from rfsalomon in Issue 39448 also.

Frank
Comment 8 flibby05 2005-04-03 18:22:03 UTC
set to NEW
Comment 9 Roberto Salomon 2005-04-06 16:55:09 UTC
Any progress on this issue? If needed, I can provide the required modules for
the USB token I'm using.
Comment 10 Roberto Salomon 2005-04-12 12:32:32 UTC
Please see comments on issue 46283
Comment 11 malte_timmermann 2005-10-04 18:27:03 UTC
JL...
Comment 12 malte_timmermann 2005-10-05 07:52:10 UTC
keyword security
Comment 13 Mathias_Bauer 2005-10-18 11:20:38 UTC
retargetted due to workload
Comment 14 Roberto Salomon 2005-11-14 11:38:50 UTC
With 2.0.0 out the door, are we ready to start work on this issue? I would like
to remind that digital signatures are an important issue for government users
here in Brazil.
Comment 15 Roberto Salomon 2005-11-24 19:20:10 UTC
I understand the workload issue but fixing this and issue 46283 would make
OpenOffice.org a must for Brazilian Public Service. Is there any documentation
regarding how OOo accesses Mozilla's NSS libraries?
Comment 16 joachim.lingner 2005-11-25 06:59:10 UTC
Unfortunately there is no documentation available.
Comment 17 Roberto Salomon 2005-11-25 08:35:49 UTC
So this is one of those cases where the code is the only available
documentation? Surely someone must have some kind of doc available on the
implementation of digital signatures em OOo. I don't mean the user spec
available, but some real info on how the OOo/libnss was made...
Comment 18 Roberto Salomon 2005-11-30 09:55:43 UTC
Downloaded and tested 2.0.1 RC1. Despite the mention on the changelog of work
having been done in xmlsecurity to address smartcard access the problem
continues on Linux.
Comment 19 kai.sommerfeld 2005-12-01 14:30:05 UTC
Due to limited resources and time release the fix will not make it into 2.0.2,
sorry. Retargeting to OOo 2.0.3
Comment 20 joachim.lingner 2006-03-15 10:52:09 UTC
.
Comment 21 joachim.lingner 2006-04-26 15:45:04 UTC
retarget to 2.0.4
Comment 22 joachim.lingner 2006-05-16 09:48:36 UTC
.
Comment 23 joachim.lingner 2006-05-19 14:01:33 UTC
Please verify.

re-open issue and reassign to fst@openoffice.org
Comment 24 joachim.lingner 2006-05-19 14:01:39 UTC
reassign to fst@openoffice.org
Comment 25 joachim.lingner 2006-05-19 14:01:44 UTC
reset resolution to FIXED
Comment 26 joachim.lingner 2006-05-26 07:20:11 UTC
*** Issue 65771 has been marked as a duplicate of this issue. ***
Comment 27 frank 2006-07-06 13:09:37 UTC
found fixed on cws jl34
Comment 28 frank 2006-08-10 13:27:14 UTC
Found integrated on master m181 
Comment 29 alonbl 2006-10-16 19:54:28 UTC
Hello OpenOffice Developers,

I want to help you to integrate smartcards directly into openoffice using PKCS#11 
implementation without the need of external Mozilla dependency.
I have implemented PKCS#11 support into OpenVPN, OpenSSH, GnuPG, QCA, 
and I think I can help you to do it for OpenOffice as well, using OpenSSL or 
GnuTLS for your choice.
The problem is that I am not a GUI programmer, I can lay the infrastructure for you if 
you point me to the right interface.

More info is at:
http://alon.barlev.googlepages.com/

Best Regards,
Alon Bar-Lev.
Comment 30 joachim.lingner 2006-10-17 09:55:03 UTC
OOo currently uses the mozilla certificate store and certificate verification
function. Moreover it uses the libxmlsec (external project) which uses itself
mozilla functionality. The libxmlsec could be configured to use another PKI
framework, such as OpenSSL. However, Mozilla already brings a GUI for
certificate management.

Direct support of PKCS#11 is certainly interessting but does not seem to solve
the problem of the dependency to Mozilla. Currently we do not intent to
implement a certificate store on our own. Frankly, this should be part of the
operating system. 

Was your idea to completely get rid of the dependency or only decouple the
PKCS#11 functionality?
Comment 31 alonbl 2006-10-17 19:33:27 UTC
Hello,

Let's divide the subject into two:
1. Signing document, this process requires user private credential and X.509 
certificate.

Here there should be a simple implementation to use PKCS#12 files or PKCS#11 
tokens in order to actually perform the signature, using libxmlsec and OpenSSL.

If using PKCS#12 based storage, GUI should prompt the user for a file and 
passphrase.
If using PKCS#11 based token, GUI should prompt the user with a list of certificates 
and allow the user to select one. Also a GUI should be available to allow user to 
specify which providers to load.

This should be simple enough, and can be integrated directly into Open Office.

2. Verifying document, this process requires validating a certificate chain.

This feature is more complex only because it involve in more GUI... Since it really 
doesn't access any user private credentials.

But actually it quite simple... Since the verification using libxmlsec and OpenSSL 
should be simple.

Displaying the certificate chain using text dump is also simple enough.

The problem is verifying the certificate chain, downloading CRLs, using OCSP etc...

> OOo currently uses the mozilla certificate store and certificate verification
> function.

True... But it is not built in... I don't think I am simple user, but I was unable to 
activate it... The external dependency makes it very hard.

One option is integrating NSS into your build, but I find OpensSSL better API.

> Moreover it uses the libxmlsec (external project) which uses itself
> mozilla functionality. The libxmlsec could be configured to use another PKI
> framework, such as OpenSSL. However, Mozilla already brings a GUI for
> certificate management.

True... But I think the GUI should be Open Office built-in... To be user friendly, many 
people have already national id cards, and wish to sign... But in KDE/Open Office 
environment, external dependency of Mozilla is not intuitive.

> Direct support of PKCS#11 is certainly interessting but does not seem to solve
> the problem of the dependency to Mozilla. Currently we do not intent to
> implement a certificate store on our own. Frankly, this should be part of the
> operating system. 

Well... I don't agree...
Operating system should handle resource allocation... and be as small as it can... 
(Unlike Windows...).
Operating system should not pop up dialogs (Unlike Windows, again).
Maybe you refer to a common library that can be used by multiple applications... 
But again, I don't think this common library should provide user interface, but allow 
you to perform your requirements using a simple API. 

NSS is one API.... But you should implement a UI to integrate correctly, OpenSSL is 
another, the same effort of integrating UI, with simpler API. KDE has its own 
certificate store, I am sure Gnome has one also... 

> Was your idea to completely get rid of the dependency or only decouple the
> PKCS#11 functionality?

I think PKI functionality should be integrated into Open Office.
So first stage is to integrate this functionality, then the what most projects find it hard 
to accomplish is to integrate smart card functionality. Here I usually come to help... :)

But reading your response, I think I can help you also with integrating PKI 
functionality... I prefer OpenSSL, this do require some UI additions. And we can do 
the chain checking in steps, first one is to require CRLs already downloaded, 
second stage is to use OCSP, third is to download CRL automatically.

In short... I think it is very important to integrate X.509 into Open Office, thus 
allowing out of the box solution for users, this solution should support smartcards 
using PKCS#11 interface, to used in Windows and *inux environments.

Best Regards,
Alon Bar-Lev.
Comment 32 joachim.lingner 2006-10-18 08:13:09 UTC
>True... But it is not built in... I don't think I am simple user, but I was
unable to 
>activate it... The external dependency makes it very hard.

This has certainly to do with the right Mozilla/Firefox profile that has not
been found. Selecting the proper profile should be improved in OOo. However,
this idea was postponed because of lack of resources. 

Integrating PKI into OOo is interesting but I would still rely on external
libraries for signature and certificate validation. Since this is a sensible
area it needs a great deal of time to maintain this particular code in terms of
security and compliance to specifications, such as RFC3280, ISIS-MTT.

I do not want to put you off but currently there is no one available (who I know
of) who could spend time on this. Nevertheless, you could start a discussion on
dev@openoffice.org with regard to integrating PKI in OOo. This may be the place
to find other developers who are willing to contribute. But do not underestimate
the effort for creating a feature specification and GUI. 

If you are interested in helping with the current implementation, there come two
things to mind:
1. Help for selecting the right Mozilla profile (Unix). For example, when the
user wants to sign a document or receives a signed document for the first time,
he could be asked by a dialog to select the proper profile. The profile should
also be selectable in the options.

2. We are using an older version of libxmlsec which contains a lot of bugfixes.
To migrate to using the latest version, it is necessary to 
-evaluate every fix made
-confer with the owner of libxmlsec if the fix can be integrated there
-if not apply the fix in the latest version.
I assume that this alone could cost a couple of weeks.

What do you think?
Comment 33 alonbl 2006-10-18 10:16:25 UTC
> Integrating PKI into OOo is interesting but I would still rely on external
> libraries for signature and certificate validation. Since this is a sensible
> area it needs a great deal of time to maintain this particular code in terms of
> security and compliance to specifications, such as RFC3280, ISIS-MTT.

This is why you have OpenSSL library... This is the only major external 
dependency you have to integrate, dropping much more problematic dependency 
of mozilla and NSS.

> I do not want to put you off but currently there is no one available (who I know
> of) who could spend time on this.

Well.. I hope you add the removal of Mozilla dependency into your roadmap, and 
remember me when you reach to the point when you start implementing that.

> But do not underestimate
> the effort for creating a feature specification and GUI. 

I don't!
Because of this I did not send a patch... :)

> 1. Help for selecting the right Mozilla profile (Unix). For example, when the

I won't do that, since I think it is wrong approach. I will be able to help dropping this 
dependency when you have resources for this.

> 2. We are using an older version of libxmlsec which contains a lot of bugfixes.

I can help with this one.
But I rather see you have roadmap to dropping Mozilla first, so I will be able to 
provide you a full solution based on libxmlsec and OpenSSL. I will do this is stages 
(of course), first integrating new version into corrent codebase, then continue to the 
second stage.

It is just entering a new project, especially as large as Open Office, requires vast 
resource investment, even before the first line of code... So I need to know we are 
going to a direction I like... :)

Thank you for your offerings!