You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by Marcel Ammerlaan <ma...@gmail.com> on 2008/01/04 11:34:48 UTC
WS Scenario issues
Hi,
I'm currently implementing a specific WS scenario which is not really
supported by the current release of wss4j/axis2.
The main issues are:
1) Username token without a password (an issue has already been logged for
this)
2) Variable username
I've solved the first issue by interpreting a 'null' password from the
PWCallback handler to indicate that no <password> elements (and nonce etc.)
should be output.
For the second issue, I've introduced a UsernameCallback to pick up the
correct identity.
I have patches for both of these features locally (and will submit them via
JIRA), but am wondering, based on the age of some issues, wether anyone is
still updating wss4j ?
Regards,
Marcel Ammerlaan.
Re: WS Scenario issues
Posted by Ruchith Fernando <ru...@gmail.com>.
On Jan 7, 2008 7:18 PM, Marcel Ammerlaan <ma...@dyskolus.com> wrote:
> I've got a one-line fix. In the old code, when no passwordtype was given
> (i.e. it was null), the passwordtype was assumed to be of the DIGEST type.
> I've made this more obvious by making the default value in RequestData be
> DIGEST. The testsuite runs, but I am not so sure if all existing code
> will handle this graciously. Maybe someone can help me out here?
I made the necessary changes and I was able to get Apache Rampart
build running successfully on after this fix.
I think we are ok.
This is fixed in SVN revision 612671.
Thanks,
Ruchith
--
http://blog.ruchith.org
http://wso2.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: WS Scenario issues
Posted by Marcel Ammerlaan <ma...@dyskolus.com>.
I've got a one-line fix. In the old code, when no passwordtype was given (
i.e. it was null), the passwordtype was assumed to be of the DIGEST type.
I've made this more obvious by making the default value in RequestData be
DIGEST. The testsuite runs, but I am not so sure if all existing code
will handle this graciously. Maybe someone can help me out here?
Patch attached,
Regards,
Marcel Ammerlaan.
On Jan 7, 2008 2:01 PM, Marcel Ammerlaan <ma...@dyskolus.com> wrote:
> Hi,
>
> On Jan 7, 2008 3:57 AM, Ruchith Fernando <ru...@gmail.com>
> wrote:
>
> > This patch causes a test failure. Please fix it and attach the patch
>
>
> Took me some time, but with the extended policy inplace, I can actually
> run the test. First impression: Axis2 is setting the password type to null,
> so the
> cause is clear. In the old situation, a null password was interpreted as
> an actual type being set. In the new situation, null is interpreted as no
> password
> needed.... I will look into it.
>
> Regards,
>
> Marcel Ammerlaan.
>
>
>
Re: WS Scenario issues
Posted by Marcel Ammerlaan <ma...@dyskolus.com>.
Hi,
On Jan 7, 2008 3:57 AM, Ruchith Fernando <ru...@gmail.com> wrote:
> This patch causes a test failure. Please fix it and attach the patch
Took me some time, but with the extended policy inplace, I can actually run
the test. First impression: Axis2 is setting the password type to null, so
the
cause is clear. In the old situation, a null password was interpreted as an
actual type being set. In the new situation, null is interpreted as no
password
needed.... I will look into it.
Regards,
Marcel Ammerlaan.
Re: WS Scenario issues
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
This patch causes a test failure. Please fix it and attach the patch
to the JIRA issue (And make sure you select "Grant license to ASF for
inclusion in ASF works").
Thanks,
Ruchith
Test report:
<testcase classname="interop.TestScenario2a" name="testScenario2a"
time="0.045">
<error message="; nested exception is:
java.lang.NullPointerException"
type="org.apache.axis.AxisFault">AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
at org.apache.ws.security.message.token.UsernameToken.getFirstNode(UsernameToken.java:475)
at org.apache.ws.security.message.token.UsernameToken.setPassword(UsernameToken.java:413)
at org.apache.ws.security.message.WSSecUsernameToken.prepare(WSSecUsernameToken.java:136)
at org.apache.ws.security.action.UsernameTokenSignedAction.execute(UsernameTokenSignedAction.java:61)
at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:193)
at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:121)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.apache.ws.axis.oasis.ping.PingBindingStub.ping(PingBindingStub.java:159)
at org.apache.ws.axis.oasis.Scenario2a.main(Scenario2a.java:86)
at interop.TestScenario2a.testScenario2a(TestScenario2a.java:63)
{http://xml.apache.org/axis/}hostname:doc
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.apache.ws.axis.oasis.ping.PingBindingStub.ping(PingBindingStub.java:159)
at org.apache.ws.axis.oasis.Scenario2a.main(Scenario2a.java:86)
at interop.TestScenario2a.testScenario2a(TestScenario2a.java:63)
Caused by: java.lang.NullPointerException
at org.apache.ws.security.message.token.UsernameToken.getFirstNode(UsernameToken.java:475)
at org.apache.ws.security.message.token.UsernameToken.setPassword(UsernameToken.java:413)
at org.apache.ws.security.message.WSSecUsernameToken.prepare(WSSecUsernameToken.java:136)
at org.apache.ws.security.action.UsernameTokenSignedAction.execute(UsernameTokenSignedAction.java:61)
at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:193)
at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:121)
</error>
On Jan 5, 2008 8:44 AM, Marcel Ammerlaan <ma...@gmail.com> wrote:
> And a small fix (forgot to get the password from the callback data as well).
> Supersedes the previous patch.
>
> Regards,
>
> Marcel Ammerlaan.
>
>
>
> On Jan 5, 2008 3:55 AM, Marcel Ammerlaan < marcel.ammerlaan@gmail.com>
> wrote:
> > Hi,
> >
> > I've attached a patch to issue WSS-68 that includes the following:
> > 1) Allow for a PasswordNone option to configure passwordless
> UsernameTokens
> > 2) Allow Password callbacks to also provide the username
> >
> > For this some (small) changes and cleanups were needed, as it is now
> permissable to return 'null' passwords. Checks related
> > to this have been removed (which I think is not a real problem as code
> depending on passwords not being null, will now get a NullPointerException
> instead).
> > Also, it is allowable to always set the identity in the callback handler,
> but I've only tested it for the UsernameToken. Extending it to work for
> Signatures as
> > well seems logical, but I'd first like to hear feedback on a smaller scale
> change before making more changes.
> >
> > I've attached the patch to this mail as well.
> >
> > Regards,
> >
> > Marcel Ammerlaan.
> >
> >
>
>
--
http://blog.ruchith.org
http://wso2.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: WS Scenario issues
Posted by Marcel Ammerlaan <ma...@gmail.com>.
And a small fix (forgot to get the password from the callback data as well).
Supersedes the previous patch.
Regards,
Marcel Ammerlaan.
On Jan 5, 2008 3:55 AM, Marcel Ammerlaan <ma...@gmail.com> wrote:
> Hi,
>
> I've attached a patch to issue WSS-68 that includes the following:
> 1) Allow for a PasswordNone option to configure passwordless
> UsernameTokens
> 2) Allow Password callbacks to also provide the username
>
> For this some (small) changes and cleanups were needed, as it is now
> permissable to return 'null' passwords. Checks related
> to this have been removed (which I think is not a real problem as code
> depending on passwords not being null, will now get a NullPointerException
> instead).
> Also, it is allowable to always set the identity in the callback handler,
> but I've only tested it for the UsernameToken. Extending it to work for
> Signatures as
> well seems logical, but I'd first like to hear feedback on a smaller scale
> change before making more changes.
>
> I've attached the patch to this mail as well.
>
> Regards,
>
> Marcel Ammerlaan.
>
>
Re: WS Scenario issues
Posted by Marcel Ammerlaan <ma...@gmail.com>.
Hi,
I've attached a patch to issue WSS-68 that includes the following:
1) Allow for a PasswordNone option to configure passwordless UsernameTokens
2) Allow Password callbacks to also provide the username
For this some (small) changes and cleanups were needed, as it is now
permissable to return 'null' passwords. Checks related
to this have been removed (which I think is not a real problem as code
depending on passwords not being null, will now get a NullPointerException
instead).
Also, it is allowable to always set the identity in the callback handler,
but I've only tested it for the UsernameToken. Extending it to work for
Signatures as
well seems logical, but I'd first like to hear feedback on a smaller scale
change before making more changes.
I've attached the patch to this mail as well.
Regards,
Marcel Ammerlaan.
Re: WS Scenario issues
Posted by Ruchith Fernando <ru...@gmail.com>.
Thanks Marcel!
- Ruchith
On Jan 4, 2008 9:11 PM, Marcel Ammerlaan <ma...@dyskolus.com> wrote:
> Hi,
>
>
> On Jan 4, 2008 2:30 PM, Ruchith Fernando <ru...@gmail.com> wrote:
> > Hi Folks,
> >
> > I'm one of the guys who maintain WSS4J.
> > Sorry about not being able to spend much time on doing much ... I'll
> > try to have a look at these issues during the weekend.
>
> Ok, I will checkout the SVN trunk version to redo my patches and submit them
> to Jira.
>
> Regards,
>
> Marcel Ammerlaan.
>
>
--
http://blog.ruchith.org
http://wso2.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: WS Scenario issues
Posted by Marcel Ammerlaan <ma...@dyskolus.com>.
Hi,
On Jan 4, 2008 2:30 PM, Ruchith Fernando <ru...@gmail.com> wrote:
> Hi Folks,
>
> I'm one of the guys who maintain WSS4J.
> Sorry about not being able to spend much time on doing much ... I'll
> try to have a look at these issues during the weekend.
Ok, I will checkout the SVN trunk version to redo my patches and submit them
to Jira.
Regards,
Marcel Ammerlaan.
Re: WS Scenario issues
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi Folks,
I'm one of the guys who maintain WSS4J.
Sorry about not being able to spend much time on doing much ... I'll
try to have a look at these issues during the weekend.
Thanks,
Ruchith
On Jan 4, 2008 5:03 PM, Marc Jadoul <ma...@auth-o-matic.com> wrote:
> Good question!
>
> I do not completely understand who develop wss4j... last times I checked it
> seemed nothing really replaced it... but several times people proposed to
> help and nothing changed... strange...
>
> Note that adding a null password won't work with some infrastructure
> (Websphere).
>
> Marc
>
>
>
> On 1/4/08, Marcel Ammerlaan <ma...@gmail.com> wrote:
> > Hi,
> >
> > I'm currently implementing a specific WS scenario which is not really
> supported by the current release of wss4j/axis2.
> >
> > The main issues are:
> > 1) Username token without a password (an issue has already been logged for
> this)
> > 2) Variable username
> >
> > I've solved the first issue by interpreting a 'null' password from the
> PWCallback handler to indicate that no <password> elements (and nonce etc.)
> should be output.
> > For the second issue, I've introduced a UsernameCallback to pick up the
> correct identity.
> >
> > I have patches for both of these features locally (and will submit them
> via JIRA), but am wondering, based on the age of some issues, wether anyone
> is still updating wss4j ?
> >
> > Regards,
> >
> > Marcel Ammerlaan.
> >
> >
> >
>
>
>
> --
> Please note that my messages are kept by google. Do not send sensitive
> information on this email address unencrypted.
--
http://blog.ruchith.org
http://wso2.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: WS Scenario issues
Posted by Marcel Ammerlaan <ma...@dyskolus.com>.
On Jan 6, 2008 2:43 PM, Marc Jadoul <ma...@auth-o-matic.com> wrote:
> In short:
> It will work if you do not have a password tag. It will not work
> correctly if you have a password tag with a null password: websphere
> will not consider that as a identity assertion.
Thanks for this clear explanation and this does fit our scenario. The
password element is not allowed, nor expected. We've tested it with .Net/WCF
already, WAS is next, so I know what to expect.
Regards,
Marcel Ammerlaan.
Re: WS Scenario issues
Posted by Marc Jadoul <ma...@auth-o-matic.com>.
Both (client & server) wont work when you use the websphere Application
Server (=WAS) native web service stack and tools...
When using the native WAS (6.1) WS stack you can secure web service
using specific descriptors. AST help you to do that.
If you want to propagate identity, IBM call that "Identity Assertion".
You have several possible way to do "identity assertion", one of them is
using a username token to propagate the user identity. The jaas subject
is automatically generated by WAS Note that a second token and a
signature may be added to secure the message.
The generated username token won't in this case have a PASSWORD tag, and
the server wont accept one.
In short:
It will work if you do not have a password tag. It will not work
correctly if you have a password tag with a null password: websphere
will not consider that as a identity assertion.
I am not sure my explanation is clear ... :-/
Marc
On Fri, 2008-01-04 at 16:39 +0100, Marcel Ammerlaan wrote:
> Hi,
>
> On Jan 4, 2008 12:33 PM, Marc Jadoul <ma...@auth-o-matic.com>
> wrote:
> I do not completely understand who develop wss4j... last times
> I checked it seemed nothing really replaced it... but several
> times people proposed to help and nothing changed...
> strange...
>
> Note that adding a null password won't work with some
> infrastructure (Websphere).
>
> Do you mean as a server or as a client? I've got it working with .Net
> using both server and client mode and am currently looking at using
> WebSphere. In my case the solution should be usable both as a client
> and a server, so do you mean that WebSphere will not accept such a
> message or will it not generate it (in the second case, this is not
> really a problem, the service producer should just ignore it).
>
> Regards,
>
> Marcel Ammerlaan.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: WS Scenario issues
Posted by Marcel Ammerlaan <ma...@dyskolus.com>.
Hi,
On Jan 4, 2008 12:33 PM, Marc Jadoul <ma...@auth-o-matic.com> wrote:
> I do not completely understand who develop wss4j... last times I checked
> it seemed nothing really replaced it... but several times people proposed to
> help and nothing changed... strange...
>
> Note that adding a null password won't work with some infrastructure
> (Websphere).
Do you mean as a server or as a client? I've got it working with .Net using
both server and client mode and am currently looking at using WebSphere. In
my case the solution should be usable both as a client and a server, so do
you mean that WebSphere will not accept such a message or will it not
generate it (in the second case, this is not really a problem, the service
producer should just ignore it).
Regards,
Marcel Ammerlaan.
Re: WS Scenario issues
Posted by Marc Jadoul <ma...@auth-o-matic.com>.
Good question!
I do not completely understand who develop wss4j... last times I checked it
seemed nothing really replaced it... but several times people proposed to
help and nothing changed... strange...
Note that adding a null password won't work with some infrastructure
(Websphere).
Marc
On 1/4/08, Marcel Ammerlaan <ma...@gmail.com> wrote:
>
> Hi,
>
> I'm currently implementing a specific WS scenario which is not really
> supported by the current release of wss4j/axis2.
>
> The main issues are:
> 1) Username token without a password (an issue has already been logged for
> this)
> 2) Variable username
>
> I've solved the first issue by interpreting a 'null' password from the
> PWCallback handler to indicate that no <password> elements (and nonce etc.)
> should be output.
> For the second issue, I've introduced a UsernameCallback to pick up the
> correct identity.
>
> I have patches for both of these features locally (and will submit them
> via JIRA), but am wondering, based on the age of some issues, wether anyone
> is still updating wss4j ?
>
> Regards,
>
> Marcel Ammerlaan.
>
>
>
--
Please note that my messages are kept by google. Do not send sensitive
information on this email address unencrypted.