Skip to content

[docs] Add client certificates activation and rejection behavior documentation#36793

Merged
mxschmitt merged 5 commits intomainfrom
copilot/fix-36791
Jul 28, 2025
Merged

[docs] Add client certificates activation and rejection behavior documentation#36793
mxschmitt merged 5 commits intomainfrom
copilot/fix-36791

Conversation

Copy link
Contributor

Copilot AI commented Jul 25, 2025

This PR updates the client certificates documentation to clarify two important behaviors that were missing from the current docs:

  1. Activation behavior: Client certificate authentication is only active when at least one client certificate is provided in the clientCertificates array
  2. Rejection behavior: To reject all client certificates sent by the server, you need to provide a client certificate with an origin that does not match any of the domains you plan to visit

Background

The current documentation explains the parameter structure but doesn't mention these crucial behavioral details. Users need to understand:

  • That simply omitting clientCertificates means the client won't respond to certificate requests at all
  • How to actively reject certificates by using a "dummy" certificate with a non-matching origin (e.g., https://not-matching.com)

Changes

Added a single paragraph to the client certificates documentation in docs/src/api/params.md:

Client certificate authentication is only active when at least one client certificate is provided. If you want to reject all client certificates sent by the server, you need to provide a client certificate with an origin that does not match any of the domains you plan to visit.

The TypeScript definitions are automatically updated by the documentation build system to reflect these changes.

Validation

  • ✅ Documentation builds successfully with npm run doc
  • ✅ Behavior confirmed by existing test cases in tests/library/client-certificates.spec.ts
  • ✅ No breaking changes - purely additive documentation

Fixes #36791.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@mxschmitt
Copy link
Contributor

Make sure to mention this behaviour in docs/src/test-api/class-testoptions.md as well.

…entation

Co-authored-by: mxschmitt <17984549+mxschmitt@users.noreply.github.com>
Copilot AI changed the title [WIP] [docs] Client certificates add note about rejecting all the certificates [docs] Add client certificates activation and rejection behavior documentation Jul 25, 2025
Copilot AI requested a review from mxschmitt July 25, 2025 13:59
…lass

Co-authored-by: mxschmitt <17984549+mxschmitt@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jul 25, 2025

Make sure to mention this behaviour in docs/src/test-api/class-testoptions.md as well.

Done! Added the client certificates behavior documentation to docs/src/test-api/class-testoptions.md as requested. The same activation and rejection behavior is now documented in both locations. (92ce476)

@mxschmitt mxschmitt marked this pull request as ready for review July 25, 2025 15:10
});
```

Client certificate authentication is only active when at least one client certificate is provided. If you want to reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that does not match any of the domains you plan to visit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need this one, it should inherit the text from params.md.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right! Removed the duplicate text from TestOptions since it inherits from params.md through the template system. (99f705d)

…ions

Co-authored-by: dgozman <9881434+dgozman@users.noreply.github.com>
Copilot AI requested a review from dgozman July 25, 2025 15:40
@github-actions
Copy link
Contributor

Test results for "tests 1"

3 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › library/video.spec.ts:411:5 › screencast › should capture css transformation @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18

46501 passed, 804 skipped
✔️✔️✔️

Merge workflow run.

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.

[docs] Client certificates add note about rejecting all the certificates

3 participants