You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 30, 2019. It is now read-only.
For generating UsernameToken Authentication with Password Derived Key, don't Base64 encode the Salt value #1663
Hi, this is related to issue #1662 not hardcoding use of UTF-8"). The CXF team is having difficulty accomplishing interoperability with Metro for UsernameToken auth w/password derived keys (http://www.jroller.com/gmazza/entry/usernametoken_messagelayer_encryption). Specifically, we're noticing for key generation, the salt value is being base64 encoded in Metro PasswordDerivedKey's generate160BitKey(), while the spec doesn't given any indication that should be done:
public byte[] generate160BitKey(String password, int iteration, byte[] reqsalt)
throws UnsupportedEncodingException {
According to line 386-387 of the spec (http://docs.oasis-open.org/wss/v1.1/wss-v1.1-spec-os-UsernameTokenProfile.pdf)::) "The key is derived as follows. The password (which is UTF-8 encoded) and Salt are concatenated in that order", i.e., the 128 salt bits should be used as-is without Base64 encoding them. (Even though lines 365-366 say it should be base64 encoded within the SOAP header, this is related to key generation, a separate matter.)
symonchang said:
UsernameToken auth w/password derived keys is not a prefer scenario in the real world. Use Encrypted UsernameToken is recommanded instead.
gmazza said:
While perhaps lower priority compared your other tasks right now, this functionality is supported by Metro--it's a clear choice given in NetBeans and documented here: http://metro.java.net/guide/ch12.html#ahicv1. We (CXF team) would eventually like to get this process working interoperably with your project (indeed, we may have to make changes on our own end for this as well.) At any rate, the source code given at my blog can be used to test Metro here as well as Metro - CXF interoperability, and feel free to contact me (gmazza at talend dot com) should you have any questions on it. Thanks!
snajper said:
Symon, this appears well digested and simple to fix - could we address this? The scenario is one of the metro-default-defined ones, also exposed within NetBeans.
Activity
glassfishrobot commentedon Jan 10, 2013
Reported by gmazza
glassfishrobot commentedon Jan 10, 2013
Was assigned to symonchang
glassfishrobot commentedon Jan 16, 2013
symonchang said:
UsernameToken auth w/password derived keys is not a prefer scenario in the real world. Use Encrypted UsernameToken is recommanded instead.
glassfishrobot commentedon Jan 16, 2013
gmazza said:
While perhaps lower priority compared your other tasks right now, this functionality is supported by Metro--it's a clear choice given in NetBeans and documented here: http://metro.java.net/guide/ch12.html#ahicv1. We (CXF team) would eventually like to get this process working interoperably with your project (indeed, we may have to make changes on our own end for this as well.) At any rate, the source code given at my blog can be used to test Metro here as well as Metro - CXF interoperability, and feel free to contact me (gmazza at talend dot com) should you have any questions on it. Thanks!
glassfishrobot commentedon Jan 17, 2013
snajper said:
Symon, this appears well digested and simple to fix - could we address this? The scenario is one of the metro-default-defined ones, also exposed within NetBeans.
glassfishrobot commentedon Apr 24, 2017
This issue was imported from java.net JIRA WSIT-1663