Request Versions
The XML web services accept an optional RequestVersion element in every signed request. It lets a client tell SOLO Server which request version it implements, so that newer request and response behavior can be introduced without changing anything for clients already in the field.
A request version is a statement about your client, not a label on the request. The server takes the declared version at face value, both when it verifies the request and when it signs the response, so only declare a version after your client implements everything that version requires.
Where the element goes
The element sits at the top level of the request document, alongside EncryptionKeyID and outside PrivateData. Its value is not encrypted, but it does fall inside the region of the request your client signs, so it cannot be altered in transit.
The request version the client declares it implements. Omit this element unless your client implements a later request version, and do not copy the value shown in the sample without implementing it. Declaring a version commits the client in both directions: it tells the server how this request was signed, and it tells the server the client can handle the response format that version defines, including any license file the response delivers. A request signed differently from the version it declares is rejected with a verification failure, and a client that cannot read the response format it asked for receives a response it cannot verify. When supplied it must be a positive integer. The server is lenient with bad input: an omitted, empty, non-numeric or less than 1 value is read as version 1.
The Input.xsd schema file of every web method declares RequestVersion as xs:int. An empty element therefore fails schema validation even though the server tolerates it and reads it as version 1. Send a positive integer or leave the element out of the request entirely.
Version list
Each row states what a client has to implement before it may declare that version.
| Request version | What your client must implement |
|---|---|
| Omit the element, or 1 | Nothing. Requests keep whatever they send today, a SHA-1 SignatureValue or a SHA-256 SignatureValue2, and responses are signed exactly as they always have been. |
| 2 | The client must sign its requests with SHA-256, be able to verify a SHA-256 signed response, and be able to verify a SHA-256 signed license file. All three are required. It must also keep verifying SHA-1 signed license files, which it still receives. Do not declare this until every one of them is in place. |
Do not copy a request version out of a sample request. The samples show where the element belongs in the document, not which value your client should send. Declaring a version your client has not implemented fails in one of two ways: if the request is not signed the way the declared version requires, the server rejects it with a verification failure, and if the request is accepted but your client cannot verify the response it receives, the failure surfaces inside your client instead.
What version 2 changes
Version 2 changes both directions of the exchange, and the license files issued in response to it, which is why a client has to implement all of it before declaring the version.
The request your client sends
The SignatureValue element in the request must carry a SHA-256 signature. SOLO Server verifies an incoming request using the algorithm the declared version calls for, and it does not try the other algorithm if that fails. So the two halves have to agree:
- A request declaring version 2 that carries a SHA-1 signature is rejected with a verification failure.
- A request that omits the element, or sends 1, must carry a SHA-1 signature. A SHA-256 signature there is rejected the same way.
A SignatureValue2 element is the one exception. Where a client sends that element it is always read as SHA-256 whatever version is declared, so clients already using that form keep working with no change.
The response your client receives
The single SignatureValue element in the response carries a SHA-256 signature instead of a SHA-1 signature. Nothing else about the response changes:
- The shape of the response document and the names of its elements are the same.
- The length of the signature value is the same, because it is determined by the key, not by the hash algorithm.
- No second signature element is ever added. There is one signature in the response, and the declared request version decides how it was produced.
A client that omits the element, or sends 1, signs its requests with SHA-1 and receives a SHA-1 signed response, which is the behavior every existing client already relies on.
The license file your client receives
Where a request produces a license file, the license file carries its own signature, separate from the signature on the response that delivers it. That signature is produced the same way: a license file issued for a request that declares version 2 and whose signature verified carries a SHA-256 signature. Every other license file carries a SHA-1 signature, including one issued for an unsigned request from a client that declared version 2. The file keeps the same shape and the same single signature element either way.
Declaring version 2 does not let your client stop verifying SHA-1 signed license files. It must verify both. A saved license file carries no marker saying which algorithm produced it, so your client cannot inspect a file and decide; it has to be able to verify either one.
A client that declares version 2 still receives SHA-1 signed license files in all of these cases:
- A file your customer downloads from the customer portal, which carries no request and declares no version.
- A file issued by an installation where an administrator has set DisableSha256ResponseSigning.
- A file issued during an upgrade, while some web servers are still running the older version.
- A file issued for an unsigned request, where the author's encryption key does not require a signature. The declared version is not trusted until a signature has verified.
- Any file saved before the server was upgraded.
A license file differs from a response in one way that matters. A response is verified once and discarded, but a license file is saved and verified again every time your application reads it, which can be months or years later.
Once your client has declared version 2 and saved a SHA-256 signed license file, reverting that installation to an earlier build of your application that verifies SHA-1 only leaves the saved license file unreadable, because the earlier build cannot verify the signature it finds. Reactivating, or fetching a fresh license file where the earlier build can still read the installation ID, resolves it, since the earlier build does not declare version 2 and receives a SHA-1 signed file. Fetching a fresh license file requires the installation ID, which normally comes from the saved license file, so an earlier build that cannot read that file may have to reactivate instead. Depending on your settings, reactivating can count against the activation limit. Allow for this if you ship a downgrade path.
- License files already saved on disk are untouched. Nothing re-signs a file that has already been issued.
Choosing a version for your client
- If your client signs requests with SHA-1, or verifies response or license file signatures with SHA-1 only, omit the element. No work is required and nothing changes.
- If you have implemented SHA-256 request signing, SHA-256 response verification and SHA-256 license file verification, and tested them against live traffic, declare version 2.
- If you have implemented only some of the three, omit the element until the rest are done. Declaring version 2 with any part of it missing fails.
- Whichever version you declare, keep your SHA-1 verification path for license files. Version 2 adds the ability to verify SHA-256, it does not replace SHA-1, and a version 2 client still receives SHA-1 signed license files in the cases listed above.
- If you are unsure which your client implements, omit the element until you have checked.
- If your client may talk to a server older than 1.26.5.0, or to one whose version you do not know, omit the element or implement the retry described below.
Version 2 requires SOLO Server 1.26.5.0 or later. An earlier server does not recognize the element. It ignores the declared version and verifies the request with SHA-1, so a version 2 request carrying a SHA-256 signature fails with result code 5004, Verification Failure, on every call: activation, status checks, deactivation, license file retrieval and floating sessions alike. Nothing in the response reports the server version, so your client cannot detect this before it sends.
If your client may reach a server you do not control, such as a self-hosted installation that upgrades on its own schedule, choose one of these:
- Omit the element until you know every server your client talks to is 1.26.5.0 or later.
- Send version 2 first, and when a request comes back with result code 5004, send it once more without the element and signed with SHA-1. Remember that result so later calls in the same session do not pay the extra round trip.
The Protection PLUS 5 libraries handle this for you from the release that introduces version 2 onward, so this only needs your attention if you build requests yourself, or if you are using an earlier library.
On an installation you host yourself, an administrator can force every response and every license file back to SHA-1 regardless of the request version a client declares, using the DisableSha256ResponseSigning setting described in Web.config File Options. A client that declares version 2 against such an installation still receives a SHA-1 signed response and a SHA-1 signed license file, so plan for both when you control the server as well as the client.
The same setting also makes newly generated author encryption envelopes carry the SHA-1 signature only. That part of it has nothing to do with request versions, because an envelope is generated in the author portal and carries no request and no version of its own. Envelopes that have already been generated are unaffected either way.
That setting applies only to what the server signs. It does not relax how requests are verified, so a client declaring version 2 must still sign its requests with SHA-256 even where responses have been forced back to SHA-1. There is no equivalent setting for the request direction, because turning request verification back to the weaker algorithm would undo the protection rather than preserve compatibility.