How to install private key and root certificate on Linux server - linux

I have a linux server with apache tomacat running on that . In my application I am using a two way SSL authentication and the server is generating a certificate for each and every client for mutual authentication using a root certificate and signing it with a private key.
But I am not aware how to install the private key and root certificate on my server. Is it possible using putty as there is no user interface enabled on server.

Related

Python: TLS session with Yubikey

I am setting up a rest client that must be trusted by a remote server using client certificate. Client written in python, running on windows 10. How can I use YubiKey 5 to store private key to encrypt SSL connection?
It seems like there is no off-the-shelf solution / python package that supports using pkcs11 for ssl context.
We were able to use https://github.com/square/ghostunnel with yubikeys with client certificates, but it makes solution less secure and more complicated to deploy.

How to use current user certificate by IIS

I've handled a problem, that my IIS server uses Local Machine certificates, but I want it to use Current User certificates. I can't import certificate because it's protected by private key.
How can I switch type of certificates, using by IIS?

How to make BizTalk to trust self-signed certificate negotiated through Send Port?

I have Send Port with Dynamic Solicit-Response type.
Everything needed for the Send Port is dynamically configured inside the Orchestration and Security Mode is set to Transport.
Encryption Certificate for the Send Port is not configured. (I guess IIS already handling it?)
Decryption Certificates for Host and IsolatedHost instances are also not configured. (this is the part where i believe that BizTalk will trust certificates depending on current certificates in Trusted Root Certification Authorities)
Yes, the Send Port will make request on endpoint that uses self-signed certificate.
What I tried:
I tried importing the self-signed certificate in Trusted Root Certification Authorities, Other People under Local Machine and Current User (User that owns the BizTalk host)
I tried manually setting up the Encryption certificate to use the self-signed certificate
Nothing works...
If the security mode is Transport, then the certificate that is needs will be one which contains the public key and that matches the target server. If this is a self-signed certificate then it needs to be in the Trusted Root Certification Authorities, Certificates for the BizTalk Host User.

how to use client certificates to access website

I have website hosted on IIS. My main issue is that I want only users with a specific certificate installed to be able to access the site. I tried to follow some tutorials but I can't find anyone covering both server and client side, since I can't get it to work.
I have some questions to the main issue:
What kind of certificate should I use (domain/selfed signed in IIS 7.5)? I do have access to a Active Directory Certificate Services where I can create other types of certificates (CA), but the problem is when trying to import them to my IIS ("certificate cannot be used as an ssl server certificate")
I would like to use a CA certificate, but is that possible when using IIS? Or do I need to write all the code the check if the user has the right certificate?
When created a certificate for the website (e.g. though IIS)..How do I create user certificates that are trusted by the server certificate?
As you may noticed by now I'm not sure how to do all of this, and would really like some help..
Server should use SSL server certificate. This certificate has to have Server Authentication extension in Extended key usage. Server certificate should have SAN extension (Subject alternative name) with domain name of server as DNS name (i.e. somesite.com)
CA certificate has to be imported to Trusted root store (preferably Local Machine) on both server and client machines.
Client certificate should contain Client Authentication extension in Extended key usage.
All EndEntity (client and server) certificates should have CRL distribution point in them where there is URL to CRL that is issued by CA. CRL has to be accessible by both client and server and should be always valid.
You can use XCA for training purposes. It has a nice GUI and it has templates for CA, SSL server and SSL client certificates by default. Then you can mimic these certificates in your Active Directory Certificate Services. Documentation and some guides can be found here.

0x800b0110 ("The certificate is not valid for the requested usage".) Error in IIS 8 Windows server 2012

In the Server
I have configured a intermediate certificate .pfx file in the IIS and created a https (443) port using binding option. I use certificate for Authorisation also I am expecting a client certificate from the client , I enabled the Require SSL and clien certificate required option in the IIS.
I checked the Intermediate certificate authorities for the root certificate and they also presents, checked the .pfx file installed in the certificate store (Local Machine) also presents.
I created .cer file from the above .pfx file with include private key option and shared the .cer file with my client and he has to attach the .cer file for authorisation .
Above is the REST wcf service with POST.
In the Client Side
I tested this application after getting the .cer file, attach that to my request in my client.exe and calling the service - it returns .403 fobidden error.
In the IIS log it is logged as 403.16 , sc-win32-status code = 2148204816 error
Please help me my above approach is correct and how to avoid this error.
Is configuring CTL is the option , or I need to get a separate client certificate for use from my client side.
You need to make small steps to debug this.
First import SSL server certificate to LocalMachine\My store. Verify
that certificate is trusted (by double-clicking it and verifying
chain).
Setup SSL binding in IIS. Verify that you can access the https site (even WCF service gives some documentation page on http/s).
Import client certificate in client CurrentUser\My store. Verify that certificate is trusted (by double-clicking it and verifying
chain).
Set SSL require mode on your WCF service on IIS. Verify that when you access https site of the WCF service a certificate is prompted and no trust error is returned (again, the documentation page should be displayed)
Server certificate must have Server Authentication extension. Client certificate must have Client Authentication extension in it. Client has to trust server certificate. Server has to trust Client certificate. This means that CRLs from both chains must be reachable.

Resources