Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for in-memory client certificates #952

Merged
merged 9 commits into from
Sep 13, 2024

Conversation

emilioalvap
Copy link
Contributor

@emilioalvap emilioalvap commented Sep 9, 2024

Summary

Add support for clientCertificates from Playwright v1.47.0 by updating.

To note, code generation has been moved in microsoft/playwright#32330. Some changes here adjust for that.

@emilioalvap emilioalvap added the enhancement New feature or request label Sep 9, 2024
shahzad31
shahzad31 previously approved these changes Sep 10, 2024
Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

LGTM !!

Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

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

Code LGTM. One thing that can be improved is

  • Add a validation during the push command for public locations and error out since cert paths, key paths wont work on the Service.

revived.cert = parseAsBuffer(item.cert);
}
if (item.key && !Buffer.isBuffer(item.key)) {
revived.key = parseAsBuffer(item.key);
Copy link
Member

Choose a reason for hiding this comment

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

we need to do the same for pfx option.

const test = {
clientCertificates: [
{
key: Buffer.from('This should be revived'),
Copy link
Member

Choose a reason for hiding this comment

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

Add a test for non-buffer values as we discussed.

@vigneshshanmugam
Copy link
Member

Add a validation during the push command for public locations and error out since cert paths, key paths wont work on the Service.

@emilioalvap Are you planning to do this?

@emilioalvap
Copy link
Contributor Author

@vigneshshanmugam Sure, I can add that to the PR

src/push/index.ts Outdated Show resolved Hide resolved
src/push/index.ts Outdated Show resolved Hide resolved
@emilioalvap emilioalvap merged commit cce2844 into main Sep 13, 2024
9 checks passed
@emilioalvap emilioalvap deleted the clientcert-in-memory-update branch September 13, 2024 18:18
@obltmachine
Copy link

🎉 This PR is included in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants