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 Luca Risello <re...@yahoo.it> on 2006/09/11 17:23:52 UTC
info about PWCallback
Hi Anastasia,
I think this is my last problem to fix to reach my goal!!!!!
"Be sure to add the right passwords in your password callback class...
Good luck"
I've added the usernamen and the password of the client_keystore in the client side PWCallaback.class but this is the exception:
General security error (WSSecurityEngine: Callback supplied no password for: secureserver)
secureserver is the alias of the srver_keystore but there are some problems.
PWCallback (client)
package prova.client;
import java.io.IOException;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import org.apache.ws.security.WSPasswordCallback;
_/**
* PWCallback for the Client
*/
public class PWCallback implements CallbackHandler {
_/**
* @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
*/
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
// set the password given a username
if ("wss4j".equals(pc.getIdentifer())) {
pc.setPassword("security");
}
} else {
throw new UnsupportedCallbackException(callbacks[i],
"Unrecognized Callback");
}
}
}
}
PWCallback (server)
import java.io.IOException;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import org.apache.ws.security.WSPasswordCallback;
public class PWCallback implements CallbackHandler {
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
// set the password given a username
if ("wss4j".equals(pc.getIdentifer())) {
pc.setPassword("changeit");
}
} else {
throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
}
}
}
}
Thanks for the reply!
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
Re: info about PWCallback
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
> Some rapid theoretical questions:
>
> - But the class PWCallback contains the alias and the password alias, so if
> I install a client in a remote pc the users can see the pass to access to my
> keystore...It's a problem!
Usually client will be using its own keystore.
>
> - Isn't There a user-guide or a tuttorial that full-explain how to use
> wss4j?
Please see these [1], [2]
[1] http://ws.apache.org/wss4j/axis.html
[2] http://ws.apache.org/wss4j/package.html
Thanks,
Ruchith
>
>
> Bye!!!
>
> Andrea
>
>
>
>
> Ruchith Fernando <ru...@gmail.com> ha scritto:
>
> On 9/12/06, Luca Risello wrote:
> >
> > Hi Fernando I've fixed the bug!!!! : )
> > Yeahhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!! Thanks to You,
> > Josè, Anastasia and to all the peolple helps me!!!
> >
> >
> > Now I must do the same thing for the response...I must confing the wsdd
> > files with a symmetric config!?
> >
> >
> > ...
> >
> >
> > ...
>
> >
>
> If you want to send a secured message to the server then you have to
> configure the clien't requestFlow (with WSDoAllSender) and the
> service's requestFlow (with WSDoAllReceiver).
>
> And if you want to secure the response from the service to the client
> then you have to configure the service's responseFlow with
> WSDoAllSender and the client's responseFlow with WSDoAllReceiver.
>
> A sample client config is here:
> https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
>
> And the service config is here:
> https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
>
> Thanks,
> Ruchith
>
>
>
>
> ________________________________
> ____________________________________________________
> ________________________________
> Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
>
>
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: info about PWCallback
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
> Some rapid theoretical questions:
>
> - But the class PWCallback contains the alias and the password alias, so if
> I install a client in a remote pc the users can see the pass to access to my
> keystore...It's a problem!
Usually client will be using its own keystore.
>
> - Isn't There a user-guide or a tuttorial that full-explain how to use
> wss4j?
Please see these [1], [2]
[1] http://ws.apache.org/wss4j/axis.html
[2] http://ws.apache.org/wss4j/package.html
Thanks,
Ruchith
>
>
> Bye!!!
>
> Andrea
>
>
>
>
> Ruchith Fernando <ru...@gmail.com> ha scritto:
>
> On 9/12/06, Luca Risello wrote:
> >
> > Hi Fernando I've fixed the bug!!!! : )
> > Yeahhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!! Thanks to You,
> > Josè, Anastasia and to all the peolple helps me!!!
> >
> >
> > Now I must do the same thing for the response...I must confing the wsdd
> > files with a symmetric config!?
> >
> >
> > ...
> >
> >
> > ...
>
> >
>
> If you want to send a secured message to the server then you have to
> configure the clien't requestFlow (with WSDoAllSender) and the
> service's requestFlow (with WSDoAllReceiver).
>
> And if you want to secure the response from the service to the client
> then you have to configure the service's responseFlow with
> WSDoAllSender and the client's responseFlow with WSDoAllReceiver.
>
> A sample client config is here:
> https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
>
> And the service config is here:
> https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
>
> Thanks,
> Ruchith
>
>
>
>
> ________________________________
> ____________________________________________________
> ________________________________
> Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
>
>
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: info about PWCallback
Posted by Luca Risello <re...@yahoo.it>.
OK : ) : ) : ) Won't belive it but I've done also the 2 way encriptyion and signature!!!! : ) in this way:
client wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<globalConfiguration >
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="UsernameToken"/>
<parameter name="user" value="wss4j"/>
<parameter name="passwordType" value="PasswordText"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
</handler>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt"/>
<!-- PRIVATE KEY ALIAS -->
<parameter name="user" value="wss4j"/>
<!--PUBLIC KEY ALIAS -->
<parameter name="encryptionUser" value="secureserver"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
<parameter name="signaturePropFile" value="client_crypto.properties" />
<parameter name="encryptionPropFile" value="client_crypto.properties" />
</handler>
</requestFlow >
<responseFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="action" value="Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
<parameter name="signaturePropFile" value="client_crypto.properties" />
</handler>
</responseFlow>
</globalConfiguration >
</deployment>
server wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="Saluto2" provider="java:RPC" style="rpc" use="literal">
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="action" value="UsernameToken Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="signaturePropFile" value="server_crypto.properties" />
</handler>
</requestFlow>
<responseFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt"/>
<!-- PRIVATE KEY ALIAS -->
<parameter name="user" value="secureserver"/>
<!--PUBLIC KEY ALIAS -->
<parameter name="encryptionUser" value="wss4j"/>
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="signaturePropFile" value="server_crypto.properties" />
<parameter name="encryptionPropFile" value="server_crypto.properties" />
</handler>
</responseFlow>
<parameter name="className" value="prova.Saluto" />
<parameter name="allowedMethods" value="saluto" />
<parameter name="scope" value="Request" />
</service>
</deployment>
Some rapid theoretical questions:
- But the class PWCallback contains the alias and the password alias, so if I install a client in a remote pc the users can see the pass to access to my keystore...It's a problem!
- Isn't There a user-guide or a tuttorial that full-explain how to use wss4j?
Bye!!!
Andrea
Ruchith Fernando <ru...@gmail.com> ha scritto:
On 9/12/06, Luca Risello wrote:
>
> Hi Fernando I've fixed the bug!!!! : )
> Yeahhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!! Thanks to You,
> Josè, Anastasia and to all the peolple helps me!!!
>
>
> Now I must do the same thing for the response...I must confing the wsdd
> files with a symmetric config!?
>
>
> ...
>
>
> ...
>
If you want to send a secured message to the server then you have to
configure the clien't requestFlow (with WSDoAllSender) and the
service's requestFlow (with WSDoAllReceiver).
And if you want to secure the response from the service to the client
then you have to configure the service's responseFlow with
WSDoAllSender and the client's responseFlow with WSDoAllReceiver.
A sample client config is here:
https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
And the service config is here:
https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
Thanks,
Ruchith
---------------------------------
____________________________________________________
---------------------------------
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
Re: info about PWCallback
Posted by Luca Risello <re...@yahoo.it>.
OK : ) : ) : ) Won't belive it but I've done also the 2 way encriptyion and signature!!!! : ) in this way:
client wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<globalConfiguration >
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="UsernameToken"/>
<parameter name="user" value="wss4j"/>
<parameter name="passwordType" value="PasswordText"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
</handler>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt"/>
<!-- PRIVATE KEY ALIAS -->
<parameter name="user" value="wss4j"/>
<!--PUBLIC KEY ALIAS -->
<parameter name="encryptionUser" value="secureserver"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
<parameter name="signaturePropFile" value="client_crypto.properties" />
<parameter name="encryptionPropFile" value="client_crypto.properties" />
</handler>
</requestFlow >
<responseFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="action" value="Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
<parameter name="signaturePropFile" value="client_crypto.properties" />
</handler>
</responseFlow>
</globalConfiguration >
</deployment>
server wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="Saluto2" provider="java:RPC" style="rpc" use="literal">
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="action" value="UsernameToken Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="signaturePropFile" value="server_crypto.properties" />
</handler>
</requestFlow>
<responseFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt"/>
<!-- PRIVATE KEY ALIAS -->
<parameter name="user" value="secureserver"/>
<!--PUBLIC KEY ALIAS -->
<parameter name="encryptionUser" value="wss4j"/>
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="signaturePropFile" value="server_crypto.properties" />
<parameter name="encryptionPropFile" value="server_crypto.properties" />
</handler>
</responseFlow>
<parameter name="className" value="prova.Saluto" />
<parameter name="allowedMethods" value="saluto" />
<parameter name="scope" value="Request" />
</service>
</deployment>
Some rapid theoretical questions:
- But the class PWCallback contains the alias and the password alias, so if I install a client in a remote pc the users can see the pass to access to my keystore...It's a problem!
- Isn't There a user-guide or a tuttorial that full-explain how to use wss4j?
Bye!!!
Andrea
Ruchith Fernando <ru...@gmail.com> ha scritto:
On 9/12/06, Luca Risello wrote:
>
> Hi Fernando I've fixed the bug!!!! : )
> Yeahhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!! Thanks to You,
> Josè, Anastasia and to all the peolple helps me!!!
>
>
> Now I must do the same thing for the response...I must confing the wsdd
> files with a symmetric config!?
>
>
> ...
>
>
> ...
>
If you want to send a secured message to the server then you have to
configure the clien't requestFlow (with WSDoAllSender) and the
service's requestFlow (with WSDoAllReceiver).
And if you want to secure the response from the service to the client
then you have to configure the service's responseFlow with
WSDoAllSender and the client's responseFlow with WSDoAllReceiver.
A sample client config is here:
https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
And the service config is here:
https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
Thanks,
Ruchith
---------------------------------
____________________________________________________
---------------------------------
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
Re: info about PWCallback
Posted by Ruchith Fernando <ru...@gmail.com>.
On 9/12/06, Luca Risello <re...@yahoo.it> wrote:
>
> Hi Fernando I've fixed the bug!!!! : )
> Yeahhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!! Thanks to You,
> Josè, Anastasia and to all the peolple helps me!!!
>
>
> Now I must do the same thing for the response...I must confing the wsdd
> files with a symmetric config!?
>
> <requestFlow>
> ...
> </requestFlow>
> <responseFlow>
> ...
> </responseFlow>
If you want to send a secured message to the server then you have to
configure the clien't requestFlow (with WSDoAllSender) and the
service's requestFlow (with WSDoAllReceiver).
And if you want to secure the response from the service to the client
then you have to configure the service's responseFlow with
WSDoAllSender and the client's responseFlow with WSDoAllReceiver.
A sample client config is here:
https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
And the service config is here:
https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
Thanks,
Ruchith
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: info about PWCallback
Posted by José Ferreiro <jo...@gmail.com>.
CIAO Luca
I think in client_deploy.wsdd
you have two handlers that have no assignement.
I mean within <requestFlow> you should only have one handler
Why do you have two handlers???
I think you are missing the responseFlow???
Hope this helps
José Ferreiro
On 9/12/06, Luca Risello <re...@yahoo.it> wrote:
>
> Ok fernando:
>
> [client side]
>
> C:\workspace\Saluto\prova2\client\PWCallback.java
> public class PWCallback implements CallbackHandler {
> /**
> * @see javax.security.auth.callback.CallbackHandler#handle(
> javax.security.auth.callback.Callback[])
> */
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("changeit");
> } else if ("secureserver".equals(pc.getIdentifer())) {
>
> pc.setPassword ("changeit");
> }
> } else {
> throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
> }
> }
> }
> }
>
> C:\workspace\Saluto\prova2\client\client_deploy.wsdd
>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="
> http://xml.apache.org/axis/wsdd/providers/java">
> <transport name="http" pivot="java:
> org.apache.axis.transport.http.HTTPSender"/>
> <globalConfiguration >
> <requestFlow>
> <handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
> <parameter name="action" value="UsernameToken"/>
> <parameter name="user" value="wss4j"/>
> <parameter name="passwordType" value="PasswordText"/>
> <parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
>
> </handler>
> <handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
> <parameter name="action" value="Signature Encrypt"/>
> <!-- PRIVATE KEY ALIAS -->
> <parameter name="user" value="wss4j"/>
> <!--PUBLIC KEY ALIAS -->
> <parameter name="encryptionUser" value="secureserver"/>
> <parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
> <parameter name="signaturePropFile" value="client_crypto.properties" />
> <parameter name="encryptionPropFile" value="client_crypto.properties" />
> </handler>
> </requestFlow >
> </globalConfiguration >
> </deployment>
>
> C:\workspace\Saluto\client_crypto.properties
>
> * org.apache.ws.security.crypto.provider
> *=org.apache.ws.security.components.crypto.Merlin
> org.apache.ws.security.crypto.merlin.keystore.type=
> jks org.apache.ws.security.crypto.merlin.keystore.password=
> changeit org.apache.ws.security.crypto.merlin.keystore.alias=
> wss4j org.apache.ws.security.crypto.merlin.alias.password=
> changeit org.apache.ws.security.crypto.merlin.file=
> client_keystore
> [server side]
>
>
> C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\prova2\deploy.wsdd
>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="
> http://xml.apache.org/axis/wsdd/providers/java">
> <service name="Saluto2" provider="java:RPC" style="rpc" use="literal">
> <requestFlow>
> <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
> <parameter name="action" value="UsernameToken Signature Encrypt"/>
>
> <parameter name="passwordCallbackClass" value="PWCallback"/>
> <parameter name="signaturePropFile"
> value="server_crypto.properties" />
> </handler>
> </requestFlow>
> <parameter name="className" value="prova.Saluto" />
> <parameter name="allowedMethods" value="saluto" />
> <parameter name="scope" value="Request" />
> </service>
> </deployment>
>
>
> C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\server_crypto.properties
>
>
> org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
> org.apache.ws.security.crypto.merlin.keystore.type=jks
> org.apache.ws.security.crypto.merlin.keystore.password=changeit
> org.apache.ws.security.crypto.merlin.keystore.alias=secureserver
> org.apache.ws.security.crypto.merlin.alias.password=changeit
> org.apache.ws.security.crypto.merlin.file=server_keystore
>
>
> C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\PWCallback.java
>
> public class PWCallback implements CallbackHandler {
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("changeit");
> } else if ("secureserver".equals(pc.getIdentifer())) {
>
> pc.setPassword("changeit");
> }
> } else {
> throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
> }
> }
> }
> }
>
> This is my configuration! Bye!!! Luca
>
> *Ruchith Fernando <ru...@gmail.com>* ha scritto:
>
> Hi,
>
>
> Seems like the "user" value was null.
>
> Can you please send both your service and client configuration and the
> callback handler impl classes.
>
> Thanks,
> Ruchith
>
> On 9/12/06, Luca Risello wrote:
> >
> > Hi Fernando, I've specify in server and client side PWCalback.class also
> the
> > other entity (I had made all the trusting processes in the keystores)
> but
> > now the excepition is:
> >
> > eneral security error (WSSecurityEngine: Callback supplied no password
> for:
> > null)
> >
> >
> > Thanks for helping. Bye!!!!!
> >
> >
> > Ruchith Fernando ha scritto:
>
> > Hi,
> >
> > Your callback handler implementation must provide passwords for those
> > user you specify in the configuration. Both classes that you have
> > implemented sets the passwords for the user called "wss4j" only.
> > Looking at the exception you will have to set the password for the
> > user "secureserver" in the callback handler.
> >
> > Thanks,
> > Ruchith
> >
> > On 9/11/06, Luca Risello wrote:
> > >
> > > Hi Anastasia,
> > >
> > > I think this is my last problem to fix to reach my goal!!!!!
> > >
> > > "Be sure to add the right passwords in your password callback class...
> > > Good luck"
> > >
> > > I've added the usernamen and the password of the client_keystore in
> the
> > > client side PWCallaback.class but this is the exception:
> > >
> > > General security error (WSSecurityEngine: Callback supplied no
> password
> > for:
> > > secureserver)
> > >
> > >
> > > secureserver is the alias of the srver_keystore but there are some
> > problems.
> > >
> > > PWCallback (client)
> > >
> > > package prova.client;
> > >
> > > import java.io.IOException;
> > > import javax.security.auth.callback.Callback;
> > > import javax.security.auth.callback.CallbackHandler;
> > > import
> > >
> > javax.security.auth.callback.UnsupportedCallbackException;
> > > import org.apache.ws.security.WSPasswordCallback;
> > > _/**
> > > * PWCallback for the Client
> > > */
> > > public class PWCallback implements CallbackHandler {
> > > _/**
> > > * @see
> > >
> > javax.security.auth.callback.CallbackHandler#handle(
> javax.security.auth.callback.Callback[])
> > > */
> > > public void handle(Callback[] callbacks) throws IOException,
> > > UnsupportedCallbackException {
> > > for (int i = 0; i < callbacks.length; i++) {
> > > if (callbacks[i] instanceof WSPasswordCallback) {
> > > WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> > > // set the password given a username
> > > if ("wss4j".equals(pc.getIdentifer())) {
> > > pc.setPassword("security");
> > > }
> > > } else {
> > > throw new UnsupportedCallbackException(callbacks[i],
> > > "Unrecognized Callback");
> > > }
> > > }
> > > }
> > > }
> > >
> > > PWCallback (server)
> > >
> > > import java.io.IOException;
> > > import javax.security.auth.callback.Callback;
> > > import javax.security.auth.callback.CallbackHandler;
> > > import
> > >
> > javax.security.auth.callback.UnsupportedCallbackException;
> > > import org.apache.ws.security.WSPasswordCallback;
> > > public class PWCallback implements CallbackHandler {
> > > public void handle(Callback[] callbacks) throws IOException,
> > > UnsupportedCallbackException {
> > > for (int i = 0; i < callbacks.length; i++) {
> > > if (callbacks[i] instanceof WSPasswordCallback) {
> > > WSPasswordCallback pc =
> > > (WSPasswordCallback)callbacks[i];
> > > // set the password given a username
> > > if ("wss4j".equals(pc.getIdentifer())) {
> > > pc.setPassword("changeit");
> > > }
> > > } else {
> > > throw new
> > > UnsupportedCallbackException(callbacks[i], "Unrecognized
> > > Callback");
> > > }
> > > }
> > > }
> > > }
> > >
> > >
> > > Thanks for the reply!
> > >
> > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da
> tanto
> > > spazio gratuito per i tuoi file e i messaggi
> > > http://mail.yahoo.it
> >
> >
> > --
> > www.ruchith.org
> >
> >
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da
> tanto
> > spazio gratuito per i tuoi file e i messaggi
> > http://mail.yahoo.it
>
>
> --
> www.ruchith.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
>
--
José Ferreiro
EPFL Communication Systems engineer
ing.sys.com.dipl.EPFL
Phone: +41 (0)79 644 98 25 [+41 (0)76 526 55 55]
Re: info about PWCallback
Posted by Ruchith Fernando <ru...@gmail.com>.
On 9/12/06, Luca Risello <re...@yahoo.it> wrote:
>
> Hi Fernando I've fixed the bug!!!! : )
> Yeahhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!! Thanks to You,
> Josè, Anastasia and to all the peolple helps me!!!
>
>
> Now I must do the same thing for the response...I must confing the wsdd
> files with a symmetric config!?
>
> <requestFlow>
> ...
> </requestFlow>
> <responseFlow>
> ...
> </responseFlow>
If you want to send a secured message to the server then you have to
configure the clien't requestFlow (with WSDoAllSender) and the
service's requestFlow (with WSDoAllReceiver).
And if you want to secure the response from the service to the client
then you have to configure the service's responseFlow with
WSDoAllSender and the client's responseFlow with WSDoAllReceiver.
A sample client config is here:
https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
And the service config is here:
https://svn.apache.org/repos/asf/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
Thanks,
Ruchith
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: info about PWCallback
Posted by José Ferreiro <jo...@gmail.com>.
CIAO Luca
I think in client_deploy.wsdd
you have two handlers that have no assignement.
I mean within <requestFlow> you should only have one handler
Why do you have two handlers???
I think you are missing the responseFlow???
Hope this helps
José Ferreiro
On 9/12/06, Luca Risello <re...@yahoo.it> wrote:
>
> Ok fernando:
>
> [client side]
>
> C:\workspace\Saluto\prova2\client\PWCallback.java
> public class PWCallback implements CallbackHandler {
> /**
> * @see javax.security.auth.callback.CallbackHandler#handle(
> javax.security.auth.callback.Callback[])
> */
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("changeit");
> } else if ("secureserver".equals(pc.getIdentifer())) {
>
> pc.setPassword ("changeit");
> }
> } else {
> throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
> }
> }
> }
> }
>
> C:\workspace\Saluto\prova2\client\client_deploy.wsdd
>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="
> http://xml.apache.org/axis/wsdd/providers/java">
> <transport name="http" pivot="java:
> org.apache.axis.transport.http.HTTPSender"/>
> <globalConfiguration >
> <requestFlow>
> <handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
> <parameter name="action" value="UsernameToken"/>
> <parameter name="user" value="wss4j"/>
> <parameter name="passwordType" value="PasswordText"/>
> <parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
>
> </handler>
> <handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
> <parameter name="action" value="Signature Encrypt"/>
> <!-- PRIVATE KEY ALIAS -->
> <parameter name="user" value="wss4j"/>
> <!--PUBLIC KEY ALIAS -->
> <parameter name="encryptionUser" value="secureserver"/>
> <parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
> <parameter name="signaturePropFile" value="client_crypto.properties" />
> <parameter name="encryptionPropFile" value="client_crypto.properties" />
> </handler>
> </requestFlow >
> </globalConfiguration >
> </deployment>
>
> C:\workspace\Saluto\client_crypto.properties
>
> * org.apache.ws.security.crypto.provider
> *=org.apache.ws.security.components.crypto.Merlin
> org.apache.ws.security.crypto.merlin.keystore.type=
> jks org.apache.ws.security.crypto.merlin.keystore.password=
> changeit org.apache.ws.security.crypto.merlin.keystore.alias=
> wss4j org.apache.ws.security.crypto.merlin.alias.password=
> changeit org.apache.ws.security.crypto.merlin.file=
> client_keystore
> [server side]
>
>
> C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\prova2\deploy.wsdd
>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="
> http://xml.apache.org/axis/wsdd/providers/java">
> <service name="Saluto2" provider="java:RPC" style="rpc" use="literal">
> <requestFlow>
> <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
> <parameter name="action" value="UsernameToken Signature Encrypt"/>
>
> <parameter name="passwordCallbackClass" value="PWCallback"/>
> <parameter name="signaturePropFile"
> value="server_crypto.properties" />
> </handler>
> </requestFlow>
> <parameter name="className" value="prova.Saluto" />
> <parameter name="allowedMethods" value="saluto" />
> <parameter name="scope" value="Request" />
> </service>
> </deployment>
>
>
> C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\server_crypto.properties
>
>
> org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
> org.apache.ws.security.crypto.merlin.keystore.type=jks
> org.apache.ws.security.crypto.merlin.keystore.password=changeit
> org.apache.ws.security.crypto.merlin.keystore.alias=secureserver
> org.apache.ws.security.crypto.merlin.alias.password=changeit
> org.apache.ws.security.crypto.merlin.file=server_keystore
>
>
> C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\PWCallback.java
>
> public class PWCallback implements CallbackHandler {
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("changeit");
> } else if ("secureserver".equals(pc.getIdentifer())) {
>
> pc.setPassword("changeit");
> }
> } else {
> throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
> }
> }
> }
> }
>
> This is my configuration! Bye!!! Luca
>
> *Ruchith Fernando <ru...@gmail.com>* ha scritto:
>
> Hi,
>
>
> Seems like the "user" value was null.
>
> Can you please send both your service and client configuration and the
> callback handler impl classes.
>
> Thanks,
> Ruchith
>
> On 9/12/06, Luca Risello wrote:
> >
> > Hi Fernando, I've specify in server and client side PWCalback.class also
> the
> > other entity (I had made all the trusting processes in the keystores)
> but
> > now the excepition is:
> >
> > eneral security error (WSSecurityEngine: Callback supplied no password
> for:
> > null)
> >
> >
> > Thanks for helping. Bye!!!!!
> >
> >
> > Ruchith Fernando ha scritto:
>
> > Hi,
> >
> > Your callback handler implementation must provide passwords for those
> > user you specify in the configuration. Both classes that you have
> > implemented sets the passwords for the user called "wss4j" only.
> > Looking at the exception you will have to set the password for the
> > user "secureserver" in the callback handler.
> >
> > Thanks,
> > Ruchith
> >
> > On 9/11/06, Luca Risello wrote:
> > >
> > > Hi Anastasia,
> > >
> > > I think this is my last problem to fix to reach my goal!!!!!
> > >
> > > "Be sure to add the right passwords in your password callback class...
> > > Good luck"
> > >
> > > I've added the usernamen and the password of the client_keystore in
> the
> > > client side PWCallaback.class but this is the exception:
> > >
> > > General security error (WSSecurityEngine: Callback supplied no
> password
> > for:
> > > secureserver)
> > >
> > >
> > > secureserver is the alias of the srver_keystore but there are some
> > problems.
> > >
> > > PWCallback (client)
> > >
> > > package prova.client;
> > >
> > > import java.io.IOException;
> > > import javax.security.auth.callback.Callback;
> > > import javax.security.auth.callback.CallbackHandler;
> > > import
> > >
> > javax.security.auth.callback.UnsupportedCallbackException;
> > > import org.apache.ws.security.WSPasswordCallback;
> > > _/**
> > > * PWCallback for the Client
> > > */
> > > public class PWCallback implements CallbackHandler {
> > > _/**
> > > * @see
> > >
> > javax.security.auth.callback.CallbackHandler#handle(
> javax.security.auth.callback.Callback[])
> > > */
> > > public void handle(Callback[] callbacks) throws IOException,
> > > UnsupportedCallbackException {
> > > for (int i = 0; i < callbacks.length; i++) {
> > > if (callbacks[i] instanceof WSPasswordCallback) {
> > > WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> > > // set the password given a username
> > > if ("wss4j".equals(pc.getIdentifer())) {
> > > pc.setPassword("security");
> > > }
> > > } else {
> > > throw new UnsupportedCallbackException(callbacks[i],
> > > "Unrecognized Callback");
> > > }
> > > }
> > > }
> > > }
> > >
> > > PWCallback (server)
> > >
> > > import java.io.IOException;
> > > import javax.security.auth.callback.Callback;
> > > import javax.security.auth.callback.CallbackHandler;
> > > import
> > >
> > javax.security.auth.callback.UnsupportedCallbackException;
> > > import org.apache.ws.security.WSPasswordCallback;
> > > public class PWCallback implements CallbackHandler {
> > > public void handle(Callback[] callbacks) throws IOException,
> > > UnsupportedCallbackException {
> > > for (int i = 0; i < callbacks.length; i++) {
> > > if (callbacks[i] instanceof WSPasswordCallback) {
> > > WSPasswordCallback pc =
> > > (WSPasswordCallback)callbacks[i];
> > > // set the password given a username
> > > if ("wss4j".equals(pc.getIdentifer())) {
> > > pc.setPassword("changeit");
> > > }
> > > } else {
> > > throw new
> > > UnsupportedCallbackException(callbacks[i], "Unrecognized
> > > Callback");
> > > }
> > > }
> > > }
> > > }
> > >
> > >
> > > Thanks for the reply!
> > >
> > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da
> tanto
> > > spazio gratuito per i tuoi file e i messaggi
> > > http://mail.yahoo.it
> >
> >
> > --
> > www.ruchith.org
> >
> >
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da
> tanto
> > spazio gratuito per i tuoi file e i messaggi
> > http://mail.yahoo.it
>
>
> --
> www.ruchith.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
>
--
José Ferreiro
EPFL Communication Systems engineer
ing.sys.com.dipl.EPFL
Phone: +41 (0)79 644 98 25 [+41 (0)76 526 55 55]
Re: info about PWCallback
Posted by Luca Risello <re...@yahoo.it>.
Ok fernando:
[client side]
C:\workspace\Saluto\prova2\client\PWCallback.java
public class PWCallback implements CallbackHandler {
/**
* @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
*/
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
// set the password given a username
if ("wss4j".equals(pc.getIdentifer())) {
pc.setPassword("changeit");
} else if ("secureserver".equals(pc.getIdentifer())) {
pc.setPassword ("changeit");
}
} else {
throw new UnsupportedCallbackException(callbacks[i],
"Unrecognized Callback");
}
}
}
}
C:\workspace\Saluto\prova2\client\client_deploy.wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<globalConfiguration >
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="UsernameToken"/>
<parameter name="user" value="wss4j"/>
<parameter name="passwordType" value="PasswordText"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
</handler>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt"/>
<!-- PRIVATE KEY ALIAS -->
<parameter name="user" value="wss4j"/>
<!--PUBLIC KEY ALIAS -->
<parameter name="encryptionUser" value="secureserver"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
<parameter name="signaturePropFile" value="client_crypto.properties" />
<parameter name="encryptionPropFile" value="client_crypto.properties" />
</handler>
</requestFlow >
</globalConfiguration >
</deployment>
C:\workspace\Saluto\client_crypto.properties
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=changeit
org.apache.ws.security.crypto.merlin.keystore.alias=wss4j
org.apache.ws.security.crypto.merlin.alias.password=changeit
org.apache.ws.security.crypto.merlin.file=client_keystore
[server side]
C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\prova2\deploy.wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="Saluto2" provider="java:RPC" style="rpc" use="literal">
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="action" value="UsernameToken Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="signaturePropFile" value="server_crypto.properties" />
</handler>
</requestFlow>
<parameter name="className" value="prova.Saluto" />
<parameter name="allowedMethods" value="saluto" />
<parameter name="scope" value="Request" />
</service>
</deployment>
C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\server_crypto.properties
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=changeit
org.apache.ws.security.crypto.merlin.keystore.alias=secureserver
org.apache.ws.security.crypto.merlin.alias.password=changeit
org.apache.ws.security.crypto.merlin.file=server_keystore
C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\PWCallback.java
public class PWCallback implements CallbackHandler {
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
// set the password given a username
if ("wss4j".equals(pc.getIdentifer())) {
pc.setPassword("changeit");
} else if ("secureserver".equals(pc.getIdentifer())) {
pc.setPassword("changeit");
}
} else {
throw new UnsupportedCallbackException(callbacks[i],
"Unrecognized Callback");
}
}
}
}
This is my configuration! Bye!!! Luca
Ruchith Fernando <ru...@gmail.com> ha scritto:
Hi,
Seems like the "user" value was null.
Can you please send both your service and client configuration and the
callback handler impl classes.
Thanks,
Ruchith
On 9/12/06, Luca Risello wrote:
>
> Hi Fernando, I've specify in server and client side PWCalback.class also the
> other entity (I had made all the trusting processes in the keystores) but
> now the excepition is:
>
> eneral security error (WSSecurityEngine: Callback supplied no password for:
> null)
>
>
> Thanks for helping. Bye!!!!!
>
>
> Ruchith Fernando ha scritto:
> Hi,
>
> Your callback handler implementation must provide passwords for those
> user you specify in the configuration. Both classes that you have
> implemented sets the passwords for the user called "wss4j" only.
> Looking at the exception you will have to set the password for the
> user "secureserver" in the callback handler.
>
> Thanks,
> Ruchith
>
> On 9/11/06, Luca Risello wrote:
> >
> > Hi Anastasia,
> >
> > I think this is my last problem to fix to reach my goal!!!!!
> >
> > "Be sure to add the right passwords in your password callback class...
> > Good luck"
> >
> > I've added the usernamen and the password of the client_keystore in the
> > client side PWCallaback.class but this is the exception:
> >
> > General security error (WSSecurityEngine: Callback supplied no password
> for:
> > secureserver)
> >
> >
> > secureserver is the alias of the srver_keystore but there are some
> problems.
> >
> > PWCallback (client)
> >
> > package prova.client;
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > _/**
> > * PWCallback for the Client
> > */
> > public class PWCallback implements CallbackHandler {
> > _/**
> > * @see
> >
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> > */
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("security");
> > }
> > } else {
> > throw new UnsupportedCallbackException(callbacks[i],
> > "Unrecognized Callback");
> > }
> > }
> > }
> > }
> >
> > PWCallback (server)
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > public class PWCallback implements CallbackHandler {
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc =
> > (WSPasswordCallback)callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("changeit");
> > }
> > } else {
> > throw new
> > UnsupportedCallbackException(callbacks[i], "Unrecognized
> > Callback");
> > }
> > }
> > }
> > }
> >
> >
> > Thanks for the reply!
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> > spazio gratuito per i tuoi file e i messaggi
> > http://mail.yahoo.it
>
>
> --
> www.ruchith.org
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
Re: info about PWCallback
Posted by Luca Risello <re...@yahoo.it>.
Hi Fernando I've fixed the bug!!!! : ) Yeahhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!! Thanks to You, Josè, Anastasia and to all the peolple helps me!!!
Now I must do the same thing for the response...I must confing the wsdd files with a symmetric config!?
<requestFlow>
...
</requestFlow>
<responseFlow>
...
</responseFlow>
Bye
PS
Now I can finally Say "Happy Axis" : ) : ) : )
Ruchith Fernando <ru...@gmail.com> ha scritto:
Hi,
Seems like the "user" value was null.
Can you please send both your service and client configuration and the
callback handler impl classes.
Thanks,
Ruchith
On 9/12/06, Luca Risello wrote:
>
> Hi Fernando, I've specify in server and client side PWCalback.class also the
> other entity (I had made all the trusting processes in the keystores) but
> now the excepition is:
>
> eneral security error (WSSecurityEngine: Callback supplied no password for:
> null)
>
>
> Thanks for helping. Bye!!!!!
>
>
> Ruchith Fernando ha scritto:
> Hi,
>
> Your callback handler implementation must provide passwords for those
> user you specify in the configuration. Both classes that you have
> implemented sets the passwords for the user called "wss4j" only.
> Looking at the exception you will have to set the password for the
> user "secureserver" in the callback handler.
>
> Thanks,
> Ruchith
>
> On 9/11/06, Luca Risello wrote:
> >
> > Hi Anastasia,
> >
> > I think this is my last problem to fix to reach my goal!!!!!
> >
> > "Be sure to add the right passwords in your password callback class...
> > Good luck"
> >
> > I've added the usernamen and the password of the client_keystore in the
> > client side PWCallaback.class but this is the exception:
> >
> > General security error (WSSecurityEngine: Callback supplied no password
> for:
> > secureserver)
> >
> >
> > secureserver is the alias of the srver_keystore but there are some
> problems.
> >
> > PWCallback (client)
> >
> > package prova.client;
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > _/**
> > * PWCallback for the Client
> > */
> > public class PWCallback implements CallbackHandler {
> > _/**
> > * @see
> >
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> > */
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("security");
> > }
> > } else {
> > throw new UnsupportedCallbackException(callbacks[i],
> > "Unrecognized Callback");
> > }
> > }
> > }
> > }
> >
> > PWCallback (server)
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > public class PWCallback implements CallbackHandler {
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc =
> > (WSPasswordCallback)callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("changeit");
> > }
> > } else {
> > throw new
> > UnsupportedCallbackException(callbacks[i], "Unrecognized
> > Callback");
> > }
> > }
> > }
> > }
> >
> >
> > Thanks for the reply!
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> > spazio gratuito per i tuoi file e i messaggi
> > http://mail.yahoo.it
>
>
> --
> www.ruchith.org
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
---------------------------------
____________________________________________________
---------------------------------
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
Re: info about PWCallback
Posted by Luca Risello <re...@yahoo.it>.
Hi Fernando I've fixed the bug!!!! : ) Yeahhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!! Thanks to You, Josè, Anastasia and to all the peolple helps me!!!
Now I must do the same thing for the response...I must confing the wsdd files with a symmetric config!?
<requestFlow>
...
</requestFlow>
<responseFlow>
...
</responseFlow>
Bye
PS
Now I can finally Say "Happy Axis" : ) : ) : )
Ruchith Fernando <ru...@gmail.com> ha scritto:
Hi,
Seems like the "user" value was null.
Can you please send both your service and client configuration and the
callback handler impl classes.
Thanks,
Ruchith
On 9/12/06, Luca Risello wrote:
>
> Hi Fernando, I've specify in server and client side PWCalback.class also the
> other entity (I had made all the trusting processes in the keystores) but
> now the excepition is:
>
> eneral security error (WSSecurityEngine: Callback supplied no password for:
> null)
>
>
> Thanks for helping. Bye!!!!!
>
>
> Ruchith Fernando ha scritto:
> Hi,
>
> Your callback handler implementation must provide passwords for those
> user you specify in the configuration. Both classes that you have
> implemented sets the passwords for the user called "wss4j" only.
> Looking at the exception you will have to set the password for the
> user "secureserver" in the callback handler.
>
> Thanks,
> Ruchith
>
> On 9/11/06, Luca Risello wrote:
> >
> > Hi Anastasia,
> >
> > I think this is my last problem to fix to reach my goal!!!!!
> >
> > "Be sure to add the right passwords in your password callback class...
> > Good luck"
> >
> > I've added the usernamen and the password of the client_keystore in the
> > client side PWCallaback.class but this is the exception:
> >
> > General security error (WSSecurityEngine: Callback supplied no password
> for:
> > secureserver)
> >
> >
> > secureserver is the alias of the srver_keystore but there are some
> problems.
> >
> > PWCallback (client)
> >
> > package prova.client;
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > _/**
> > * PWCallback for the Client
> > */
> > public class PWCallback implements CallbackHandler {
> > _/**
> > * @see
> >
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> > */
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("security");
> > }
> > } else {
> > throw new UnsupportedCallbackException(callbacks[i],
> > "Unrecognized Callback");
> > }
> > }
> > }
> > }
> >
> > PWCallback (server)
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > public class PWCallback implements CallbackHandler {
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc =
> > (WSPasswordCallback)callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("changeit");
> > }
> > } else {
> > throw new
> > UnsupportedCallbackException(callbacks[i], "Unrecognized
> > Callback");
> > }
> > }
> > }
> > }
> >
> >
> > Thanks for the reply!
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> > spazio gratuito per i tuoi file e i messaggi
> > http://mail.yahoo.it
>
>
> --
> www.ruchith.org
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
---------------------------------
____________________________________________________
---------------------------------
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
Re: info about PWCallback
Posted by Luca Risello <re...@yahoo.it>.
Ok fernando:
[client side]
C:\workspace\Saluto\prova2\client\PWCallback.java
public class PWCallback implements CallbackHandler {
/**
* @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
*/
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
// set the password given a username
if ("wss4j".equals(pc.getIdentifer())) {
pc.setPassword("changeit");
} else if ("secureserver".equals(pc.getIdentifer())) {
pc.setPassword ("changeit");
}
} else {
throw new UnsupportedCallbackException(callbacks[i],
"Unrecognized Callback");
}
}
}
}
C:\workspace\Saluto\prova2\client\client_deploy.wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<globalConfiguration >
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="UsernameToken"/>
<parameter name="user" value="wss4j"/>
<parameter name="passwordType" value="PasswordText"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
</handler>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt"/>
<!-- PRIVATE KEY ALIAS -->
<parameter name="user" value="wss4j"/>
<!--PUBLIC KEY ALIAS -->
<parameter name="encryptionUser" value="secureserver"/>
<parameter name="passwordCallbackClass" value="prova2.client.PWCallback"/>
<parameter name="signaturePropFile" value="client_crypto.properties" />
<parameter name="encryptionPropFile" value="client_crypto.properties" />
</handler>
</requestFlow >
</globalConfiguration >
</deployment>
C:\workspace\Saluto\client_crypto.properties
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=changeit
org.apache.ws.security.crypto.merlin.keystore.alias=wss4j
org.apache.ws.security.crypto.merlin.alias.password=changeit
org.apache.ws.security.crypto.merlin.file=client_keystore
[server side]
C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\prova2\deploy.wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="Saluto2" provider="java:RPC" style="rpc" use="literal">
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="action" value="UsernameToken Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="signaturePropFile" value="server_crypto.properties" />
</handler>
</requestFlow>
<parameter name="className" value="prova.Saluto" />
<parameter name="allowedMethods" value="saluto" />
<parameter name="scope" value="Request" />
</service>
</deployment>
C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\server_crypto.properties
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=changeit
org.apache.ws.security.crypto.merlin.keystore.alias=secureserver
org.apache.ws.security.crypto.merlin.alias.password=changeit
org.apache.ws.security.crypto.merlin.file=server_keystore
C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\PWCallback.java
public class PWCallback implements CallbackHandler {
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
// set the password given a username
if ("wss4j".equals(pc.getIdentifer())) {
pc.setPassword("changeit");
} else if ("secureserver".equals(pc.getIdentifer())) {
pc.setPassword("changeit");
}
} else {
throw new UnsupportedCallbackException(callbacks[i],
"Unrecognized Callback");
}
}
}
}
This is my configuration! Bye!!! Luca
Ruchith Fernando <ru...@gmail.com> ha scritto:
Hi,
Seems like the "user" value was null.
Can you please send both your service and client configuration and the
callback handler impl classes.
Thanks,
Ruchith
On 9/12/06, Luca Risello wrote:
>
> Hi Fernando, I've specify in server and client side PWCalback.class also the
> other entity (I had made all the trusting processes in the keystores) but
> now the excepition is:
>
> eneral security error (WSSecurityEngine: Callback supplied no password for:
> null)
>
>
> Thanks for helping. Bye!!!!!
>
>
> Ruchith Fernando ha scritto:
> Hi,
>
> Your callback handler implementation must provide passwords for those
> user you specify in the configuration. Both classes that you have
> implemented sets the passwords for the user called "wss4j" only.
> Looking at the exception you will have to set the password for the
> user "secureserver" in the callback handler.
>
> Thanks,
> Ruchith
>
> On 9/11/06, Luca Risello wrote:
> >
> > Hi Anastasia,
> >
> > I think this is my last problem to fix to reach my goal!!!!!
> >
> > "Be sure to add the right passwords in your password callback class...
> > Good luck"
> >
> > I've added the usernamen and the password of the client_keystore in the
> > client side PWCallaback.class but this is the exception:
> >
> > General security error (WSSecurityEngine: Callback supplied no password
> for:
> > secureserver)
> >
> >
> > secureserver is the alias of the srver_keystore but there are some
> problems.
> >
> > PWCallback (client)
> >
> > package prova.client;
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > _/**
> > * PWCallback for the Client
> > */
> > public class PWCallback implements CallbackHandler {
> > _/**
> > * @see
> >
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> > */
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("security");
> > }
> > } else {
> > throw new UnsupportedCallbackException(callbacks[i],
> > "Unrecognized Callback");
> > }
> > }
> > }
> > }
> >
> > PWCallback (server)
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > public class PWCallback implements CallbackHandler {
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc =
> > (WSPasswordCallback)callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("changeit");
> > }
> > } else {
> > throw new
> > UnsupportedCallbackException(callbacks[i], "Unrecognized
> > Callback");
> > }
> > }
> > }
> > }
> >
> >
> > Thanks for the reply!
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> > spazio gratuito per i tuoi file e i messaggi
> > http://mail.yahoo.it
>
>
> --
> www.ruchith.org
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
Re: info about PWCallback
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
Seems like the "user" value was null.
Can you please send both your service and client configuration and the
callback handler impl classes.
Thanks,
Ruchith
On 9/12/06, Luca Risello <re...@yahoo.it> wrote:
>
> Hi Fernando, I've specify in server and client side PWCalback.class also the
> other entity (I had made all the trusting processes in the keystores) but
> now the excepition is:
>
> eneral security error (WSSecurityEngine: Callback supplied no password for:
> null)
>
>
> Thanks for helping. Bye!!!!!
>
>
> Ruchith Fernando <ru...@gmail.com> ha scritto:
> Hi,
>
> Your callback handler implementation must provide passwords for those
> user you specify in the configuration. Both classes that you have
> implemented sets the passwords for the user called "wss4j" only.
> Looking at the exception you will have to set the password for the
> user "secureserver" in the callback handler.
>
> Thanks,
> Ruchith
>
> On 9/11/06, Luca Risello wrote:
> >
> > Hi Anastasia,
> >
> > I think this is my last problem to fix to reach my goal!!!!!
> >
> > "Be sure to add the right passwords in your password callback class...
> > Good luck"
> >
> > I've added the usernamen and the password of the client_keystore in the
> > client side PWCallaback.class but this is the exception:
> >
> > General security error (WSSecurityEngine: Callback supplied no password
> for:
> > secureserver)
> >
> >
> > secureserver is the alias of the srver_keystore but there are some
> problems.
> >
> > PWCallback (client)
> >
> > package prova.client;
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > _/**
> > * PWCallback for the Client
> > */
> > public class PWCallback implements CallbackHandler {
> > _/**
> > * @see
> >
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> > */
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("security");
> > }
> > } else {
> > throw new UnsupportedCallbackException(callbacks[i],
> > "Unrecognized Callback");
> > }
> > }
> > }
> > }
> >
> > PWCallback (server)
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > public class PWCallback implements CallbackHandler {
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc =
> > (WSPasswordCallback)callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("changeit");
> > }
> > } else {
> > throw new
> > UnsupportedCallbackException(callbacks[i], "Unrecognized
> > Callback");
> > }
> > }
> > }
> > }
> >
> >
> > Thanks for the reply!
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> > spazio gratuito per i tuoi file e i messaggi
> > http://mail.yahoo.it
>
>
> --
> www.ruchith.org
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: info about PWCallback
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
Seems like the "user" value was null.
Can you please send both your service and client configuration and the
callback handler impl classes.
Thanks,
Ruchith
On 9/12/06, Luca Risello <re...@yahoo.it> wrote:
>
> Hi Fernando, I've specify in server and client side PWCalback.class also the
> other entity (I had made all the trusting processes in the keystores) but
> now the excepition is:
>
> eneral security error (WSSecurityEngine: Callback supplied no password for:
> null)
>
>
> Thanks for helping. Bye!!!!!
>
>
> Ruchith Fernando <ru...@gmail.com> ha scritto:
> Hi,
>
> Your callback handler implementation must provide passwords for those
> user you specify in the configuration. Both classes that you have
> implemented sets the passwords for the user called "wss4j" only.
> Looking at the exception you will have to set the password for the
> user "secureserver" in the callback handler.
>
> Thanks,
> Ruchith
>
> On 9/11/06, Luca Risello wrote:
> >
> > Hi Anastasia,
> >
> > I think this is my last problem to fix to reach my goal!!!!!
> >
> > "Be sure to add the right passwords in your password callback class...
> > Good luck"
> >
> > I've added the usernamen and the password of the client_keystore in the
> > client side PWCallaback.class but this is the exception:
> >
> > General security error (WSSecurityEngine: Callback supplied no password
> for:
> > secureserver)
> >
> >
> > secureserver is the alias of the srver_keystore but there are some
> problems.
> >
> > PWCallback (client)
> >
> > package prova.client;
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > _/**
> > * PWCallback for the Client
> > */
> > public class PWCallback implements CallbackHandler {
> > _/**
> > * @see
> >
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> > */
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("security");
> > }
> > } else {
> > throw new UnsupportedCallbackException(callbacks[i],
> > "Unrecognized Callback");
> > }
> > }
> > }
> > }
> >
> > PWCallback (server)
> >
> > import java.io.IOException;
> > import javax.security.auth.callback.Callback;
> > import javax.security.auth.callback.CallbackHandler;
> > import
> >
> javax.security.auth.callback.UnsupportedCallbackException;
> > import org.apache.ws.security.WSPasswordCallback;
> > public class PWCallback implements CallbackHandler {
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > for (int i = 0; i < callbacks.length; i++) {
> > if (callbacks[i] instanceof WSPasswordCallback) {
> > WSPasswordCallback pc =
> > (WSPasswordCallback)callbacks[i];
> > // set the password given a username
> > if ("wss4j".equals(pc.getIdentifer())) {
> > pc.setPassword("changeit");
> > }
> > } else {
> > throw new
> > UnsupportedCallbackException(callbacks[i], "Unrecognized
> > Callback");
> > }
> > }
> > }
> > }
> >
> >
> > Thanks for the reply!
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> > spazio gratuito per i tuoi file e i messaggi
> > http://mail.yahoo.it
>
>
> --
> www.ruchith.org
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: info about PWCallback
Posted by Luca Risello <re...@yahoo.it>.
Hi Fernando, I've specify in server and client side PWCalback.class also the other entity (I had made all the trusting processes in the keystores) but now the excepition is:
eneral security error (WSSecurityEngine: Callback supplied no password for: null)
Thanks for helping. Bye!!!!!
Ruchith Fernando <ru...@gmail.com> ha scritto:
Hi,
Your callback handler implementation must provide passwords for those
user you specify in the configuration. Both classes that you have
implemented sets the passwords for the user called "wss4j" only.
Looking at the exception you will have to set the password for the
user "secureserver" in the callback handler.
Thanks,
Ruchith
On 9/11/06, Luca Risello wrote:
>
> Hi Anastasia,
>
> I think this is my last problem to fix to reach my goal!!!!!
>
> "Be sure to add the right passwords in your password callback class...
> Good luck"
>
> I've added the usernamen and the password of the client_keystore in the
> client side PWCallaback.class but this is the exception:
>
> General security error (WSSecurityEngine: Callback supplied no password for:
> secureserver)
>
>
> secureserver is the alias of the srver_keystore but there are some problems.
>
> PWCallback (client)
>
> package prova.client;
>
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import
> javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> _/**
> * PWCallback for the Client
> */
> public class PWCallback implements CallbackHandler {
> _/**
> * @see
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> */
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("security");
> }
> } else {
> throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
> }
> }
> }
> }
>
> PWCallback (server)
>
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import
> javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> public class PWCallback implements CallbackHandler {
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc =
> (WSPasswordCallback)callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("changeit");
> }
> } else {
> throw new
> UnsupportedCallbackException(callbacks[i], "Unrecognized
> Callback");
> }
> }
> }
> }
>
>
> Thanks for the reply!
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
Re: info about PWCallback
Posted by Luca Risello <re...@yahoo.it>.
Hi Fernando, I've specify in server and client side PWCalback.class also the other entity (I had made all the trusting processes in the keystores) but now the excepition is:
eneral security error (WSSecurityEngine: Callback supplied no password for: null)
Thanks for helping. Bye!!!!!
Ruchith Fernando <ru...@gmail.com> ha scritto:
Hi,
Your callback handler implementation must provide passwords for those
user you specify in the configuration. Both classes that you have
implemented sets the passwords for the user called "wss4j" only.
Looking at the exception you will have to set the password for the
user "secureserver" in the callback handler.
Thanks,
Ruchith
On 9/11/06, Luca Risello wrote:
>
> Hi Anastasia,
>
> I think this is my last problem to fix to reach my goal!!!!!
>
> "Be sure to add the right passwords in your password callback class...
> Good luck"
>
> I've added the usernamen and the password of the client_keystore in the
> client side PWCallaback.class but this is the exception:
>
> General security error (WSSecurityEngine: Callback supplied no password for:
> secureserver)
>
>
> secureserver is the alias of the srver_keystore but there are some problems.
>
> PWCallback (client)
>
> package prova.client;
>
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import
> javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> _/**
> * PWCallback for the Client
> */
> public class PWCallback implements CallbackHandler {
> _/**
> * @see
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> */
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("security");
> }
> } else {
> throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
> }
> }
> }
> }
>
> PWCallback (server)
>
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import
> javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> public class PWCallback implements CallbackHandler {
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc =
> (WSPasswordCallback)callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("changeit");
> }
> } else {
> throw new
> UnsupportedCallbackException(callbacks[i], "Unrecognized
> Callback");
> }
> }
> }
> }
>
>
> Thanks for the reply!
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
Re: info about PWCallback
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
Your callback handler implementation must provide passwords for those
user you specify in the configuration. Both classes that you have
implemented sets the passwords for the user called "wss4j" only.
Looking at the exception you will have to set the password for the
user "secureserver" in the callback handler.
Thanks,
Ruchith
On 9/11/06, Luca Risello <re...@yahoo.it> wrote:
>
> Hi Anastasia,
>
> I think this is my last problem to fix to reach my goal!!!!!
>
> "Be sure to add the right passwords in your password callback class...
> Good luck"
>
> I've added the usernamen and the password of the client_keystore in the
> client side PWCallaback.class but this is the exception:
>
> General security error (WSSecurityEngine: Callback supplied no password for:
> secureserver)
>
>
> secureserver is the alias of the srver_keystore but there are some problems.
>
> PWCallback (client)
>
> package prova.client;
>
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import
> javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> _/**
> * PWCallback for the Client
> */
> public class PWCallback implements CallbackHandler {
> _/**
> * @see
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> */
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("security");
> }
> } else {
> throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
> }
> }
> }
> }
>
> PWCallback (server)
>
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import
> javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> public class PWCallback implements CallbackHandler {
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc =
> (WSPasswordCallback)callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("changeit");
> }
> } else {
> throw new
> UnsupportedCallbackException(callbacks[i], "Unrecognized
> Callback");
> }
> }
> }
> }
>
>
> Thanks for the reply!
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: info about PWCallback
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
Your callback handler implementation must provide passwords for those
user you specify in the configuration. Both classes that you have
implemented sets the passwords for the user called "wss4j" only.
Looking at the exception you will have to set the password for the
user "secureserver" in the callback handler.
Thanks,
Ruchith
On 9/11/06, Luca Risello <re...@yahoo.it> wrote:
>
> Hi Anastasia,
>
> I think this is my last problem to fix to reach my goal!!!!!
>
> "Be sure to add the right passwords in your password callback class...
> Good luck"
>
> I've added the usernamen and the password of the client_keystore in the
> client side PWCallaback.class but this is the exception:
>
> General security error (WSSecurityEngine: Callback supplied no password for:
> secureserver)
>
>
> secureserver is the alias of the srver_keystore but there are some problems.
>
> PWCallback (client)
>
> package prova.client;
>
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import
> javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> _/**
> * PWCallback for the Client
> */
> public class PWCallback implements CallbackHandler {
> _/**
> * @see
> javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
> */
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("security");
> }
> } else {
> throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
> }
> }
> }
> }
>
> PWCallback (server)
>
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import
> javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> public class PWCallback implements CallbackHandler {
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> for (int i = 0; i < callbacks.length; i++) {
> if (callbacks[i] instanceof WSPasswordCallback) {
> WSPasswordCallback pc =
> (WSPasswordCallback)callbacks[i];
> // set the password given a username
> if ("wss4j".equals(pc.getIdentifer())) {
> pc.setPassword("changeit");
> }
> } else {
> throw new
> UnsupportedCallbackException(callbacks[i], "Unrecognized
> Callback");
> }
> }
> }
> }
>
>
> Thanks for the reply!
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
> spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
--
www.ruchith.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org