I would like to detail this post about client certificates
based on the blog What Is Client Certificate Authentication?.
- we have a website which is accessible on the internet. but we only want our partners to access our website, so we generate a self-signed server certificate and certificates signed by our self-generated certificate for our partners. when accessing our websites, partner needs to provide the certificate.
This would prevent the unauthorised access, if you've properly configured your web-server to ask for the client certificate from the client's accessing-application (browser, etc).
As a feedback, I'd like you to visit the link: What are the risks of self signing a certificate for SSL. If it is possible for you to obtain the server-certificate from a root CA, that'd be advisable. But, that's your call.
Quoting from the blog listed above:
If a server's enabled with client certificate authentication, only
users who attempt to connect from clients loaded with the right client
certificates will succeed. Even if a legitimate user attempts to
connect with the right username and password, if that user isn't on a
client application loaded with the right client certificate, that user
will not be granted access. In fact, if that user's connecting from a
Web browser, the login page (where he's supposed to enter his username
and password) might not even load at all like the one shown below.
Additionally, I'd recommend you to incorporate more factors of authentication so that there is least chance of security breach. You've not mentioned the details about your website.
- Is this enough to prevent unwanted access to our website?
Yes, it should prevent unwanted access. But, you already know there is no silver bullet in security.
You should not only think in terms of your web-application here, but also from the infrastructure which you're managing. There are several other threats like DoS, etc. which needs to be taken care of. Anyway, that is altogether a different story and people have written books over the topic.
I hope this helps. Thanks to you for asking this question.