473,779 Members | 1,913 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AuthenticateTok en method not firing in custom X509TokenManage r

I am developing a smart client application that I intend to use role-based
authentication using X509 certificates. That is, each client would have a
certificate that would uniquely identify them, via mapping of the thumbprint
hash on each certificate with a role.

I've got my own class that inherits from the X509SecurityTok enManager. When
the smart client (Windows App) calls a webmethod, this class is initialized,
but the AuthenticateTok en method is never entered.

A call to RequestSoapCont ext.Current.Sec urity does provide a valid X509
token. The result of the webmethod call throws back my own SOAP exception
because the caller cannot be authenticated.

Any suggestions?
Jul 11 '06 #1
3 2043
Hi Sid,

At first glance, I think the client is not sending the right tokens or some
security headers are wrong. Did you check the service trace to see if the
security headers are arriving in the inbound messages ?

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
[MVP - Connected Systems Developer]
"Sid DeLuca" <Si*******@disc ussions.microso ft.comwrote in message
news:09******** *************** ***********@mic rosoft.com...
>I am developing a smart client application that I intend to use role-based
authentication using X509 certificates. That is, each client would have a
certificate that would uniquely identify them, via mapping of the
thumbprint
hash on each certificate with a role.

I've got my own class that inherits from the X509SecurityTok enManager.
When
the smart client (Windows App) calls a webmethod, this class is
initialized,
but the AuthenticateTok en method is never entered.

A call to RequestSoapCont ext.Current.Sec urity does provide a valid X509
token. The result of the webmethod call throws back my own SOAP exception
because the caller cannot be authenticated.

Any suggestions?

Jul 17 '06 #2
Thanks for the reply, Pablo. I'll check the trace logs.

"Pablo Cibraro" wrote:
Hi Sid,

At first glance, I think the client is not sending the right tokens or some
security headers are wrong. Did you check the service trace to see if the
security headers are arriving in the inbound messages ?

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
[MVP - Connected Systems Developer]
"Sid DeLuca" <Si*******@disc ussions.microso ft.comwrote in message
news:09******** *************** ***********@mic rosoft.com...
I am developing a smart client application that I intend to use role-based
authentication using X509 certificates. That is, each client would have a
certificate that would uniquely identify them, via mapping of the
thumbprint
hash on each certificate with a role.

I've got my own class that inherits from the X509SecurityTok enManager.
When
the smart client (Windows App) calls a webmethod, this class is
initialized,
but the AuthenticateTok en method is never entered.

A call to RequestSoapCont ext.Current.Sec urity does provide a valid X509
token. The result of the webmethod call throws back my own SOAP exception
because the caller cannot be authenticated.

Any suggestions?


Jul 17 '06 #3
Ok - now my requirements have changed. I need to get specific user
credentials from the client app.

I've implemented a solution using a username token, which is encrypted with
a X509 certificate (the WSE Quickstart cert). It appears to be using to
Windows Integrated security - valid credentials work, invalid credentials
don't. Everything works fine until I associate a custom token manager with
the service (custom token inherits from "SecurityTo ken" - is this correct?).
Now, I get an error stating "...the security header is not present in the
incoming message...."

The Server policy looks like this:

<policy name="UsernameT oken Policy 1">
<usernameForCer tificateSecurit y establishSecuri tyContext="fals e"
renewExpiredSec urityContext="t rue" requireSignatur eConfirmation=" false"
messageProtecti onOrder="SignBe foreEncrypt" requireDerivedK eys="true"
ttlInSeconds="3 00">
<serviceToken >
<x509 storeLocation=" LocalMachine" storeName="My"
findValue="CN=W SE2QuickStartSe rver" findType="FindB ySubjectDisting uishedName"
/>
</serviceToken>
<protection>
<request signatureOption s="IncludeAddre ssing, IncludeTimestam p,
IncludeSoapBody " encryptBody="tr ue" />
<response signatureOption s="IncludeAddre ssing, IncludeTimestam p,
IncludeSoapBody " encryptBody="tr ue" />
<fault signatureOption s="IncludeAddre ssing, IncludeTimestam p,
IncludeSoapBody " encryptBody="fa lse" />
</protection>
</usernameForCert ificateSecurity >
<requireActionH eader />
</policy>

The "policy name" matches the "policy" attribute on the actual service class.

The client's code to setup the token looks like this:

Dim tkn As New UsernameToken(t xtLogin.Text, txtPassword.Tex t,
PasswordOption. SendPlainText)
Dim oProxy As New TestClient.ws.A PIServiceWse
oProxy.SetClien tCredential(Of UsernameToken)( tkn)
oProxy.SetPolic y("Test - Username token")

The X509 Certificate can be found in both the "Personal" and "Trusted
People" folders in the Current User Store.

Any suggestions?

"Sid DeLuca" wrote:
Thanks for the reply, Pablo. I'll check the trace logs.

"Pablo Cibraro" wrote:
Hi Sid,

At first glance, I think the client is not sending the right tokens or some
security headers are wrong. Did you check the service trace to see if the
security headers are arriving in the inbound messages ?

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
[MVP - Connected Systems Developer]
"Sid DeLuca" <Si*******@disc ussions.microso ft.comwrote in message
news:09******** *************** ***********@mic rosoft.com...
>I am developing a smart client application that I intend to use role-based
authentication using X509 certificates. That is, each client would have a
certificate that would uniquely identify them, via mapping of the
thumbprint
hash on each certificate with a role.
>
I've got my own class that inherits from the X509SecurityTok enManager.
When
the smart client (Windows App) calls a webmethod, this class is
initialized,
but the AuthenticateTok en method is never entered.
>
A call to RequestSoapCont ext.Current.Sec urity does provide a valid X509
token. The result of the webmethod call throws back my own SOAP exception
because the caller cannot be authenticated.
>
Any suggestions?
Jul 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
13402
by: Max Adams | last post by:
Using System.Timers.ElapsedEventHandler to specify a method and and ElapsedEventArgs object I've trawled the internet looking for some help on this topic. What I want to do is, every x seconds call function y with some parameters. Simple. The ElapsedEventArgs paramerter I want to pass in is an object "c" of a custom type. The following does not work: Clock.Elapsed += new System.Timers.ElapsedEventHandler( OnTimer, new
1
2245
by: | last post by:
Hi, All, I'm having problems getting OnInit to fire in my UserControl, when I use a custom template to render the control. The control will render to the browser and it wasn't until I needed to perform some initialization in the OnInit event did I realize that this event was never firing. Two Question:
1
7588
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a dropdown in UC1 _________________________ 1) MainPage_Load 2) User Control_1 Load
4
3992
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques was endeavoring to create a custom user control to make things a bit simpler, but she noticed that her Page_Load eventhandler was firing twice. So after long hours of research and experimentation, I stumbled upon, imho, is quite the discovery. ...
5
1660
by: John Abbler | last post by:
I'm currently testing doing some testing with other browsers and have found that my custom field validators aren't firing with Firefox or Netscape, but they work fine with Ie. Here's the code I'm using: <asp:CustomValidator id="vld1PaymentType" ClientValidationFunction="ValidateRadiobutton" runat="server" ErrorMessage="Payment Type must be selected" CssClass="ValidationMessage"></asp:CustomValidator>
0
922
by: scotprince | last post by:
Hi, I am hoping someone here can help. I have one custom control called "MyButton". On another custom control (CC2) I dynamically create a table and add the "MyButton" control to a cell or cells depending on what happens on the web form. Then I embed CC2 onto a web form and everything compiles and runs. I get the custom button(s) generated. The problem is that the button click event is not firing on the web form. Below is the code...
0
850
by: Mike Hofer | last post by:
I've noticed that some of my server-side event handlers are firing twice. I should point out that my web forms are derived from a custom base class that derives from System.Web.UI.Page. The custom base class doesn't override anything, and doesn't handle any of Page's events; it just adds properties and methods. None of the pages in the system have AutoEventwireup set to True.
4
4201
by: TS | last post by:
I am creating a User control and i create some dynamic controls in the init handler. one of the controls is a custom validator which i assign a serverValidate event handler. I usally always do my controls as custom server controls and don't understand why this event won't fire. I figured if the creation of the control was in the init, it would be initialized and have its event handlers set up, then after Load, the control would call its...
1
1514
by: Don Q. | last post by:
Hi, I'm writing a class in VB that will (once I get it working) be rolled up into a DLL for use in all our web applications. However I'm running into problems with button events not firing. Essentially, my (trimmed-down) code contains this: Public Class ModalDialog Protected WithEvents btnYes As New Button
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.