WOPI Proof Key Test And Debug Tool

Copyright McKenna Consultants Ltd - WOPI Specialists

The purpose of this tool is to help you get Proof Key verification working for CSPP WOPI. Most problems relating to this originate with incorrect construction of the byte array that is used to verify the inbound X-WOPI-Proof and X-WOPI-ProofOld headers. The "Debug Information" section at the bottom of this page shows the correct arrays to construct for your request. You can then compare your arrays to these correct arrays. This will help you work out where you are going wrong!

If you need professional assistance with your WOPI implementation, please contact nick.mckenna@mckennaconsultants.com.

Enter the Request Inputs and Discovery Proof Key Inputs below and click "Submit". The output should help you debug your WOPI proof key problems!

Note that the operating system running this proof key calculation is Little Endian.

Request Inputs

Extract this information from your application log.

URL
X-WOPI-Proof
X-WOPI-ProofOld
X-WOPI-TimeStamp
Authorization: Bearer (the Access Token)

Discovery Proof Key Inputs

You may use the buttons below to load the current proof key data from the Discover endpoints. Note that the current discovery data may not be the data that was used to calculate your proof key if you are using historic request data. If you are using historic requests then you will need to use the discovery information that was extant at the time of those requests (extract these from your application log). Note that prod and test proof key information is typically identical (i.e. the key in test is the same as the key in production).

Old Value
Old Modulus
Old Exponent
Value
Modulus
Exponent

Simple .Net Style Proof Key Validation Results

  • Twenty Minute Check - is the timestamp in the last 20 minutes UTC?
  • Current Proof / Current Value Result - Is the proof key valid when using the X-WOPI-Proof field and Value field?
  • Current Proof / Old Value Result - Is the proof key valid when using the X-WOPI-Proof field and Old Value field?
  • Old Proof / Current Value Result - Is the proof key valid when using the X-WOPI-ProofOld field and Value field?
  • Overall .Net Style Result - "Pass" if the Twenty Minute Check is Pass and one of the three Results is Pass.
Twenty Minute Check?
Current Proof / Current Value Result
Current Proof / Old Value Result
Old Proof / Current Value Result
Overall .Net Style Result

Modulus / Exponent Style Proof Key Validation Results (PHP / Java / Python etc)

  • Twenty Minute Check - is the timestamp in the last 20 minutes UTC?
  • Current Proof / Current Modulus And Exponent Result - Is the proof key valid when using the X-WOPI-Proof field and Modulus/Exponent fields?
  • Current Proof / Old Modulus And Exponent Result - Is the proof key valid when using the X-WOPI-Proof field and Old Modulus/Exponent fields?
  • Old Proof / Current Modulus And Exponent Result - Is the proof key valid when using the X-WOPI-ProofOld field and Modulus/Exponent fields?
  • Overall .Net Style Result - "Pass" if the Twenty Minute Check is Pass and one of the three Results is Pass.
Twenty Minute Check?
Current Proof / Current Modulus And Exponent Result
Current Proof / Old Modulus And Exponent Result
Current Proof / Old Modulus And Exponent Result
Overall Modulus And Exponent Result

Debug Information

  • Timestamp In UTC - the UTC timestamp displayed in UK format
  • Timestamp Bytes - the bytes that make up the timestamp
  • Timestamp Bytes (Hex) - the bytes that make up the timestamp (hexidecimal encoding)
  • Timestamp Bytes Length - the length of the Timestamp Bytes array
  • Timestamp Bytes Length Bytes - the bytes that make up the Timestamp Bytes Length (note the byte order)
  • Timestamp Bytes Length Bytes (Hex) - the bytes that make up the Timestamp Bytes Length (note the byte order - hexidecimal encoding)
  • Access Token Bytes - the bytes that make up the Access Token
  • Access Token Bytes (Hex) - the bytes that make up the Access Token (hexidecimal encoding)
  • Access Token Bytes Length - the length of the Access Token Bytes array
  • Access Token Bytes Length Bytes - the bytes that make up the Access Token Bytes Length (note the byte order)
  • Access Token Bytes Length Bytes (Hex) - the bytes that make up the Access Token Bytes Length (note the byte order - hexidecimal encoding)
  • Sanitized URL - the sanitised version of the URL that the proof key calculation uses
  • Sanitized URL Bytes - the bytes that make up the Sanitized URL
  • Sanitized URL Bytes (Hex) - the bytes that make up the Sanitized URL (hexidecimal encoding)
  • Sanitized URL Bytes Length - the length of the Sanitized URL Bytes array
  • Sanitized URL Bytes Length Bytes - the bytes that make up the Sanitized URL Bytes Length (note the byte order)
  • Sanitized URL Bytes Length Bytes (Hex) - the bytes that make up the Sanitized URL Bytes Length (note the byte order - hexidecimal encoding)
  • Complete Source Data Bytes - the concatenation of Access Token Bytes Length Bytes, Access Token Bytes Bytes, Sanitized URL Bytes Length Bytes, Sanitized URL Bytes, Timestamp Bytes Length Bytes and Timestamp Bytes.
  • Complete Source Data Bytes (Hex) - the concatenation of Access Token Bytes Length Bytes, Access Token Bytes Bytes, Sanitized URL Bytes Length Bytes, Sanitized URL Bytes, Timestamp Bytes Length Bytes and Timestamp Bytes. (hexidecimal encoding)
Timestamp In UTC
Timestamp Bytes
Timestamp Bytes (Hex)
Timestamp Bytes Length
Timestamp Bytes Length Bytes
Timestamp Bytes Length Bytes (Hex)
Access Token Bytes
Access Token Bytes (Hex)
Access Token Bytes Length
Access Token Bytes Length Bytes
Access Token Bytes Length Bytes (Hex)
Sanitized URL
Sanitized URL Bytes
Sanitized URL Bytes (Hex)
Sanitized URL Bytes Length
Sanitized URL Bytes Length Bytes
Sanitized URL Bytes Length Bytes (Hex)
Complete Source Data Bytes
Complete Source Data Bytes (Hex)