This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Using UsernameToken and Encrypt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using UsernameToken and Encrypt" Watch "Using UsernameToken and Encrypt" New topic
Author

Using UsernameToken and Encrypt

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
AFAIK, it's possible to encrypt your entire message using Axis2 and Rampart. However, when I specify UsernameToken and Encrypt actions, it only encrypts the body. I'd like for the entire message to be encrypted, including the user/pass header section.

How do I do this?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41029
    
  43
The encryption will just be for the SOAP body, not the header where the username info is. If you want to transmit the password securely you can send it hashed (a.k.a. digested). That's actually the default if I remember correctly; check the passwordType tag.

But sending the username in cleartext shouldn't be a security risk, or is it?


Ping & DNS - my free Android networking tools app
Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
Bah. I had a response all typed out and then FF crashed on me.

Anyways, yes, the digest mode is the default. I was just wondering if the digest setup is specific to Axis2/Rampart. From what I read here, it says that the digest is created by the following.



Doesn't the SHA part require both sides to have the key? Since it's sending over the nonce and created, it seems like the digest wouldn't be very secure.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using UsernameToken and Encrypt
 
Similar Threads
is there a standard way to make tomcat support security for web service message level?
security issue
java.security.InvalidKeyException: Invalid AES key length: 8 bytes
url encryption
Log4j: How to get entire message