mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #392] [feature]: Configuration client certificates for SSL #147
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HobaiRiku on GitHub (Dec 3, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/392
Is your feature request related to a problem? Please describe.
Can PW set a
Client Certificatesfor SSL requests? in some case, we want to test request for some PaaS service which need special client certificates.Describe the solution you'd like
I'm not sure this can be done relying on the browser only.
Describe alternatives you've considered
Additional context
@liyasthomas commented on GitHub (Dec 3, 2019):
That's possible. I think axios do have support for importing
.pemcerts.@liyasthomas commented on GitHub (Mar 29, 2020):
@HobaiRiku can you test the client certificate feature?
steps:
post.pemcertificate by clicking "Certs" icon right next to "Raw input" toggle4. send request
and see if it works.
@HobaiRiku commented on GitHub (Mar 29, 2020):
I have tested using the chinanet IoT platform's key and cert, but the chrome show

ERR_CERT_COMMON_NAME_INVALIDerror.In postman, the key and cert can be set like this :

so, I convert them to a *.pem file and upload it to postwomen's cert file.
By the way, It needs to skip the verification of this certificate on my postman and I don't have other valid servers to test right now, maybe it is the problem?
@parthg-wysa commented on GitHub (Dec 24, 2021):
Hi. Is this supported on the latest version of Hoppscotch @liyasthomas?
@liyasthomas commented on GitHub (Dec 24, 2021):
No it's not. Supported at this moment.
@parthg-wysa commented on GitHub (Dec 24, 2021):
Oh, Thanks. Are there any plans of supporting this in the near future?
@nbraun-wolf commented on GitHub (Mar 4, 2022):
One of the most basic features is not supported. I am surprised.
@elad-eyal commented on GitHub (Apr 12, 2022):
support will be appreciated
@ns-sjli commented on GitHub (May 15, 2022):
I agree this is basic feature for API testing, can we make this a high priority?
@rimonhanna commented on GitHub (Dec 11, 2023):
+1
@Lynnes001 commented on GitHub (Jan 3, 2024):
Welcome to 2024 and how are the updates?
@scheibling commented on GitHub (Mar 21, 2024):
@liyasthomas Do you still have your trial implementation from https://github.com/hoppscotch/hoppscotch/issues/392#issuecomment-605554712? I'd be happy to take a look at this
@rimonhanna commented on GitHub (Apr 9, 2024):
the old version implementation: https://github.com/hoppscotch/hoppscotch/pull/720/files
@ispy1 commented on GitHub (Apr 26, 2024):
Does this feature support community self deployment versions?
@mkohns commented on GitHub (Apr 28, 2024):
Would be great to get this feature sorted out. mTLS (aka client credentials) per URL/Host is an important feature and increases value of hoppscotch.
@Breee commented on GitHub (Jun 14, 2024):
@liyasthomas this issue is open for almost 5 years now.
Is there any plan to tackle this issue? For us this is a basic feature and mandatory to replace postman
@liudonghua123 commented on GitHub (Jun 14, 2024):
For client certificates, it may be impossible to implement them in a pure browser environment. The Fetch API in web browsers does not support the agent option, which is necessary in a Node.js environment to implement client certificates.
However, for desktop applications, it is possible because the underlying fetch implementation does not have these limitations. For example, I have successfully skipped server certificate verification in my self-maintained hoppscotch-app, which is packaged via Tauri. This has been maintained for almost three years, long before the official Hoppscotch Desktop. For more details, see the discussion.
For additional information, you can also refer to this blog post about client-side SSL in Node.js with fetch.
@liudonghua123 commented on GitHub (Jun 14, 2024):
Because the underlying network lib used in tauri is
reqwestlibrary, So I asked ChatGPTHow to implement client certificate in reqwest in a rust app. Give the example code.The followings are the answers it gives me. Maybe it's a hint or clue on how to implement this feature.To implement client certificate authentication in a Rust application using the
reqwestlibrary, you'll need to create aClientwith the client certificate and its private key. Below is an example code demonstrating how to achieve this:Add dependencies in
Cargo.toml:Implement client certificate authentication in your Rust application:
Explanation:
Add Dependencies: Ensure that
reqwestandtokioare included in yourCargo.toml. Thetlsfeature forreqwestis necessary for HTTPS support.Load the Client Certificate: Read the client certificate from a file. In this example, it's assumed that the certificate is in PEM format.
Load the Client Private Key: Similarly, read the private key from a file.
Create the Reqwest Client:
Certificate::from_pemto load the server's certificate.Identity::from_pemto load the client's identity (certificate and private key).reqwest::Clientwith the loaded certificate and identity.Make a Request: Use the client to make a request to a secure server.
Ensure that the paths to the certificate and key files are correct and that they are in PEM format. You can use OpenSSL to convert certificates and keys to PEM format if necessary.
This example uses async/await syntax with
tokiofor asynchronous execution, which is common in Rust applications that perform network I/O.@scheibling commented on GitHub (Jun 16, 2024):
I think I discussed this with someone else in a different thread, but if we're talking basic mTLS authentication in combination with direct request and/or requests via the plugin we actually don't even really need to to a lot - because it works natively with most browsers.
If you're visiting a site/API that requires a client certificate in a separate tab and select that certificate for use with the domain, you can then use Hoppscotch directly or via the browser plugin to make mtls-authenticated requests to that API. The downside is that the configuration is a bit messy, but on the other hand, not a lot more messy than the postman implementation of 1-cert-per-hostname.
What doesn't work though is the requests that are sent via the proxy server, that would require some additional development and changes to work properly. Same for Yaade and a lot of other browser-based implementations, since they're using communication interfaces supplied by the browser you can then use the browser cert store to authenticate as well.
Edit: Looks like someone is working hard on the Desktop version already :-)
https://github.com/hoppscotch/hoppscotch/pull/4111
@liyasthomas commented on GitHub (Sep 17, 2024):
Disabling SSL verification is now possible in Hoppscotch Desktop App > Settings > Interceptor section > Turn off "Verify SSL Certificates". Now, users can also add self-signed certificates for verification.
@liyasthomas commented on GitHub (Sep 17, 2024):
Thanks for your patience and valuable feedback. This feature has been implemented in the latest release.
Closing this ticket as this feature is now available in the recent version. Please feel free to reach out if you have any other concerns.