Skip to content

Add dummy proof keys and discovery XML (rebase of #86) - #145

Open
Petr Švihlík (petrsvihlik) wants to merge 1 commit into
microsoft:mainfrom
petrsvihlik:proof-keys-rebase
Open

Petr Švihlík (petrsvihlik) wants to merge 1 commit into
microsoft:mainfrom
petrsvihlik:proof-keys-rebase

Conversation

@petrsvihlik

Copy link
Copy Markdown

Rebases #86 on current main. Single trivial conflict resolution in Program.cs (main has since added TestGroupHasDelay to the GroupBy key); 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-TimeStamp headers because Program.Execute constructs TestCaseExecutor without RSACryptoServiceProvider instances, and WopiRequest.Execute gates proof-header generation on those being non-null. All seven tests in the ProofKeys group therefore send identical unsigned requests — 4 pass (expecting 200), 3 fail on every conformant host (expecting 500). #82 and #84 (both deduped to #22) and #111 describe the same gap. Recent downstream example: petrsvihlik/WopiHost#291.

What this changes

  1. Adds checked-in proof-keys.xml containing private CSP blobs for <new> and <old> keys.
  2. Adds discovery.xml exposing the matching public keys (in the format WopiProofValidator consumes).
  3. Program.Execute loads proof-keys.xml at startup if present, builds two RSACryptoServiceProvider instances, and threads them through to TestCaseExecutor.

Behavior is opt-in via file presence: setups without proof-keys.xml continue to behave exactly as before.

Verification

Either PR works for me — happy for #86 to land directly if that's easier, in which case I'll close this.

@petrsvihlik

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@petrsvihlik

Copy link
Copy Markdown
Author

cc Longjia Niu (@niulongjia)

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>
@cesco69

francesco (cesco69) commented Jul 1, 2026

Copy link
Copy Markdown

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants