This document is intended for anyone that needs to develop a client to access Clearspace 2.5.x web services.
It's for those who are:
Also see:
Clearspace uses the Username Token Profile authentication specification with the PasswordText option to authenticate web service client requests into the server, as mentioned in the web services dev guide.
For the uninitiated WS-Security can be a complex maze of vague specifications and protocols. The following provide introductions to WS-Security:
The purpose of the Username Token Profile specification is to authenticate requests for HTTP resources by verifying that the client making the request is who they say they are and is authorized to make a particular request. It was initially designed for SOAP, but can be extended for any type of HTTP service.
For example, it is used by many Atom and RESTful services where simpler authentication schemes aren't enough. Examples of these simpler authentication schemes include: HTTP basic authentication, HTTP basic authentication over SSL, HTTP Digest authentication, and hash-based authentication schemes.
How it works
A security header is sent with every client SOAP request to the service (or HTTP request to services that aren't SOAP). The header contains the username and some representation of a password. The header that is sent is an extension of the HTTP Authentication specification (IETF RFC 2617 is extensible beyond basic and digest authentication).
Username Token Profile Specification - PasswordText Option
How the PasswordText option works:
To be secure all HTTP requests and responses should be SSL encrypted.
Username Token Profile Specification - PasswordDigest Option (Unsupported)
PasswordDigest is a more secure authentication option provided by the Username Token Profile specification.
PasswordDigest isn't supported by Clearspace by default, but with some code it's possible to customize Clearspace to support it. Since Clearspace web services are developed using the Spring framework and Apache CXF integration, and since Apache CXF uses the WSS4J implementation of WS-Security, it is possible to customize Clearspace to support PasswordDigest. This would involve overriding or replacing the WSS4J interceptor in the Apache CXF Spring configuration used by Clearspace. See the Apache CXF project's WS-Security documentation for more information: http://cwiki.apache.org/CXF20DOC/ws-security.html.
How PasswordDigest works:
For maximum security, all HTTP requests and responses should be SSL encrypted.
In addition to the Username Token Profile Specification, WS-Security currently includes three other specifications that Clearspace doesn't support:
The underlying use of the WSS4J library by Apache CXF does make it possible to implement support for the two additional specifications that WSS4J supports:
WSS4J supports the X.509 Token Profile specification and has partial support for the SAML Token Profile specification.
The Apache CXF WS-Security documentation discusses implementing X.509 Token Profile using the Apache CXF library