Add dummy proof keys and discovery XML (rebase of #86) - #145
Open
Petr Švihlík (petrsvihlik) wants to merge 1 commit into
Open
Petr Švihlík (petrsvihlik) wants to merge 1 commit into
Petr Švihlík (petrsvihlik) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
This was referenced May 1, 2026
Author
Merged
4 tasks
Petr Švihlík (petrsvihlik)
added a commit
to petrsvihlik/WopiHost
that referenced
this pull request
May 1, 2026
…ns (#312) The 3 ProofKeys tests that expect HTTP 500 cannot pass with the upstream Microsoft validator CLI because it never sends signed proof headers (no --rsa-key option). Add a KNOWN_FAILURES baseline in CI and the local run-validator script, and have the job fail when: - a non-pinned test fails (real regression), or - a pinned test stops failing (signal to retire the pin). Update NoOpProofValidator docstring to point at the upstream tracker (microsoft/wopi-validator-core#145, rebase of #86). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
|
The online test doesn't work https://learn.microsoft.com/en-us/answers/questions/5891949/wopi-test-doesnt-works-anymore. This offline test also doesn't works. How should we test our applications? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebases #86 on current
main. Single trivial conflict resolution inProgram.cs(mainhas since addedTestGroupHasDelayto theGroupBykey); the proof-key / discovery XML payloads are unchanged. All design credit to Thomas Levesque (@thomaslevesque).Why now
#86 has been waiting on review since Dec 2019, and #22 was closed in Jan 2023 with a "moving to ADO backlog" note — but recent merged PRs (#134, #135, #137, #138) suggest the repo is being maintained again, so it seemed worth another swing.
Why it matters
Today the validator CLI never sends
X-WOPI-Proof/X-WOPI-ProofOld/X-WOPI-TimeStampheaders becauseProgram.ExecuteconstructsTestCaseExecutorwithoutRSACryptoServiceProviderinstances, andWopiRequest.Executegates proof-header generation on those being non-null. All seven tests in theProofKeysgroup therefore send identical unsigned requests — 4 pass (expecting200), 3 fail on every conformant host (expecting500). #82 and #84 (both deduped to #22) and #111 describe the same gap. Recent downstream example: petrsvihlik/WopiHost#291.What this changes
proof-keys.xmlcontaining private CSP blobs for<new>and<old>keys.discovery.xmlexposing the matching public keys (in the formatWopiProofValidatorconsumes).Program.Executeloadsproof-keys.xmlat startup if present, builds twoRSACryptoServiceProviderinstances, and threads them through toTestCaseExecutor.Behavior is opt-in via file presence: setups without
proof-keys.xmlcontinue to behave exactly as before.Verification
dotnet build WopiValidator.sln -c Release→ 0 errors acrossnet45,net6.0,net8.0.proof-keys.xml/discovery.xmlare byte-identical to Add dummy proof keys and discovery XML #86 — they're a matching keypair generated by Thomas Levesque (@thomaslevesque) usingRSACryptoServiceProvider.Export[Csp]Blob(see his comments on the original PR).Either PR works for me — happy for #86 to land directly if that's easier, in which case I'll close this.