Solved

Problem with X509 certificate - WSE 2.0

Posted on 2006-11-15
2
702 Views
Last Modified: 2013-11-30
I’m trying to secure the message level communications of my system using WSE 2.0, signing with X.509 certificates.

We have a web server (WEB) hosting a web app and another server (WS) hosting a web service. Both machines have acquired a certificate from the domain controller. Each of these certificates has been exported to the other machine, without a private key. All of the certs are in the local machine store.

I’ve configure WSE to use a policy file at each end. The problem I’m having is with the sending of the original web service request – it isn’t getting any further yet. The tracing on the web server is telling me that it cannot find a security token to sign the message with.

I’ve tried the following:
* Checked and double checked the token issuer, subject name and X509Extension (OID) keys in the policyCache file (I’ve also commented out the extension key to simplify the check)
* Double checked the URL of the endpoint (I’m using the default operation element)
* Used the X509Cert tool to check permissions on the private key of the certificate
* Used winhttpcertcfg.exe to grant access to the certificate to ASPNET and IUSR accounts (this only worked for the cert with a private key)
* Tried altering the policy to specify either of the two available certs.

The only trace message I’m getting is “could not find a security token”. I’m aware that the ASPNET process doesn’t by default look in the localmachine store but I’ve been through the workaround / fix for this (see below) and now I’m a bit stuck. It seems to me that the APSNET (or IUSR) cannot see the certificates, but I’ve no idea why. I’ve had all of this working on my dev machine (with a windows app and with a web app), but only on the one machine and only with test certs, so my local setup doesn’t really compare with our test env.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/secnetht13.asp

Any ideas much appreciated..!!!

Thanks
Alec
0
Comment
Question by:alecpotts
2 Comments
 
LVL 3

Author Comment

by:alecpotts
ID: 17964967
Cracked it.

The problem was mainly that the <tokenIssuer> key within the policy doesn't seem to work. No matter what I put in there - with spaces, without spaces, with commas, backwards (as specified by Microsoft).....everything I tried to make it match up to the Issued By field of the certificate....no joy. As soon as I removed the key completely....everything works fine.

The other thing was that you need to use the WseCertificate2.exe tool to set the access permission on the private key of each client cert - on Server 2000 you need to grant access to ASPNET, but on Server 2003 it's NETWORK SERVICE that needs access...

I've asked for a refund/PAQ....

ALec
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 17969420
Closed, 500 points refunded.
CetusMOD
Community Support Moderator
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Restrict RDP Remote Access through SonicWall 3 93
Unable to RDP to windows 10 pro machine 15 73
Radius Debug Error 16 45
logging buffered 8 38
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to count occurrences of each item in an array.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now