-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: client certificate support #275
Conversation
59e5a42
to
fe773ca
Compare
Apologies, I haven't gotten to this PR since last week. This will be a priority item on my list to get it merged this week. |
@phoval thank you for taking care. I do miss that feature in Bruno too. But looking at your implementation it looks like you only support one client certificate and one domain. I think it is very common that you need to configure multiple client certificate for multiple domains. Just thinking about a preview and a prod environment. Do you have time to extend your implementation? |
6faa6ba
to
0da1769
Compare
Just moved the config in the collections settings. Made possible multiple client certificate. |
1ba86c1
to
18e0239
Compare
@phoval 👍 for your work. Just a little error I found, I think you didnt notice, because you already have it in config. |
Thanks for all the work here! This is really the last blocker to switch away from the buggy, data hungry Insomnia |
@mjhcorporate Try to add into config this empty collection |
Ahh, that was the error you mentioned earlier. Thank you, now it works! But: Saving the key in the config has two downsides for us:
Proposal: Rename |
28d9206
to
e589184
Compare
@mjhcorporate Checkout two options for managing secrets without having to commit credentials to git - https://docs.usebruno.com/secrets-management/overview.html To interpolate env vars, you need to change httpsAgentRequestFields['passphrase'] = clientCert.passphrase; to httpsAgentRequestFields['passphrase'] = interpolateString(clientCert.passphrase, interpolationOptions) You can checkout how we do this in proxy @phoval Can you share how the json schema will look like in {
"clientCertificates": [{
"certFilePath": "assets/cert.pem",
"keyFilePath": "assets/cert.key",
"passphrase": "{{process.env.clientCertPassPhrase}}"
}]
}
You need to implement the save functionality. Checkout how it's done in Proxy Settings Tab Glad to see the progress !! @phoval @mjhcorporate Let me know as soon as you guys are in agreement. Then we can merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I retested, and it looks great! Thank you so much for your amazing work, @phoval !
Minor nitpicks:
- There is no user-facing error when the filepath becomes invalid (file is deleted or moved). Ideally, the user would see an error message, just like the one they see when the cert-file is corrupted.
- Absolute filepaths and relative filepaths work, but
~
does not. .env
-variables are not permitted for the paths. When entering"certPath": "{{process.env.clientCertPath}}"
, I getError reading cert/key file Error: ENOENT: no such file or directory, open '{{process.env.clientCertPath}}'
- If this would be possible, then the nitpick above is solved, as every user can expand their
~
themselves, manually
- If this would be possible, then the nitpick above is solved, as every user can expand their
- I happen to have my cert in a directory that starts with a
.
, and to show that directory in the MacOS filepicker, I have to pressCMD + Shift + .
, every time I open the picker. It would be amazing if the UI remembered myshow-dot-files
choice. - The UI does not have enough space to show the chosen filenames or the "nothing selected" strings (see "Kein...ählt" and "car-...key" in the screenshot below)
@helloanoop Everything good from my side! In my view, these points are minor and could be addressed by follow-up PRs some time in the future.
@mjhcorporate Exactly. Let's get this in so people can use it and then the nitpicks can be addressed later. |
7580992
to
8ee9c0e
Compare
8ee9c0e
to
d6628d9
Compare
@helloanoop changed the configuration name to the longer one and fixed the interpolation options.
It should be ready for merging now. |
Thanks @phoval for adding Client Certificates support in Bruno I added some polish 333564f "clientCertificates": {
"enabled": true,
"certs": [
{
"domain": "localhost",
"certFilePath": "/Users/anoop/bruno/bruno-testbench/certs/server.crt",
"keyFilePath": "/Users/anoop/bruno/bruno-testbench/certs/server.key",
"passphrase": ""
}
]
} |
Add initial mutual TLS support with client certificate in global preferences