JacORB + NameService + SSL - jacorb

I tried JacORB with SSL and the NameService. I got this to work only if all three parties have the same SSL cert, and only if there is no mutual auth.
Step 2 and 3 are in the same client Orb instance and I found no way to use the NameService cert for the lookup and then the server cert for the actual server communication. Same for the NameService, but here there is no need for mutual trust.
Java can choose an individual cert in a trust store, but not JacORB, here all configuration is done at orb creation.
Anybody got an idea how to select different certs in JacORB? Using the same certs on both ends isn't exactly the idea of mutual auth, is it?

Related

SSL handshake issue for one server

i have an SSL handshake issue on one of my servers. the certificate is CA signed and the server is still showing "not secure"
i got another server using the same root chain and it is secured.
root/intermediate certs and the CA itself are all uploaded on the machine and the browser
chain is 100% valid as it was identified via the Subject Key Identifier/Authority Key Identfier.
from pcap i see this for non-working
CSR was verified to match the cert
the server side is never pushing the Hell Server,Certificate message
it does look like a server side issue for me. not a client one
again the same chain is used for another server and the browser is considering it secure.
anyone can assist?
certs were uploaded on Trust-root authority for the browser
installed on the machine itself (local machine and current user)
cert itself was verified
certificate was verified in the server's DB as well as its chain

Why the client and server certificate for TLS?

What's the purpose of the client and server certificate for setting up TLS on Mariadb/mysql? I would have thought that just a server certificate was enough in the same way a web server like Apache works with the client only needing to trust the certificate the server is presenting?
The purpose of client certificates is so the server can validate the client in the same way the client can validate the server.
CREATE USER with REQUIRE X509 and/or REQUIRE ISSUER enforce this as an authentication requirement.
If you want a non-TLS mechanism for authenticating clients, then no client certificate/key is required.
In TLS, you can setup mutual authentication which means that the Client will validate server's certificate, and vice-versa. This means that Server will also validate the client's certificate. However, mutual authentication is not mandatory, and in many cases, only the client validates the server certificate which is one-way authentication. It is entirely up to your purview and design how you want your application/setup to behave, and whether mutual or one-way TLS authentication is enough in your case.
Here is a good reference link:- http://www.ossmentor.com/2015/03/one-way-and-two-way-ssl-and-tls.html

Certificate Validation on Cloud SQL

I've found that if you connect to a Cloud SQL instance over SSL the CommonName provided in the server's certificate is my-project-123456:myinstance which renders the certificate un-validatable, as the client expects that the CN to be either the hostname or IP.
Every solution to this problem seems to amount to "just disable validation", which is not acceptable to me because:
Why has GCP decided to do everything else correctly, providing a CA cert and client certificates, only to drop the ball on identity validation? By disabling validation you're basically saying "I'm OK with being MITMed at some point".
What about projects where we can't play fast and loose with validation because of PIPA/HIPAA?
What about mySQL clients that don't support turning validation off? eg: All PHP 5.6 mysql libs using mysqlnd prior to the upcoming 5.6.16 release.
Is there any way to make SSL work correctly on Cloud SQL?
One of the reasons for not having the IP address of the instance in the common name of the server certificate is because these IPs can change. What is the IP address of instance A today can be the IP address of instance B tomorrow, because A was deleted, or A decided that it doesn't want the IP address anymore. So, the instance name was decided as being a more unique identification of the instance.
Also, the mysql client libraries by default have hostname verification disabled. http://dev.mysql.com/doc/refman/5.7/en/ssl-options.html
With regards to MITM attacks, it is not possible to MITM attack a Cloud SQL instance because the server certificate and the each of the client certificates are signed by unique self-signed CAs which are never used to sign more than one cert. The server only ever trusts certificates signed by one of these CAs. The reason for using unique CAs per client cert was because MySQL 5.5 did not support certificate revocation lists, and we also did not want to deal CRLs, but wanted to support deletion of client certs.
We will look into ways of supporting SSL for clients which cannot turn off hostname validation. But I cannot promise an ETA on this.
Cloud SQL Team.

openshift and let's encrypt certificates

Is there any integration for Let's Encrypt in OpenShift (or, is this planned)? Let's encrypt are going to issue certs that expire in 90 days[1] -- and a big part of their plan is to have automation setups via people who use their certs so that they're always updated with new certs. Given this, some integration from OpenShift would be necessary.
Thanks,
[1] https://letsencrypt.org/2015/11/09/why-90-days.html
Currently, the ability to automate ssl certificate renewals and installation on OpenShift Online is not possible because the ssl certificates are stored at the node level, and ssl connections are terminated by the node level proxy (Reference this). If you would like to see it included in future versions, you should vote here and get people to vote on it. It's possible that you could automate it locally somewhat (or build a module to do it) by using the OpenShift Online API. Another suggestion would be to get a free ssl certificate from StartSSL that lasts for a year and install it either using the command line, or the web console.

Getting Mysql2::Error (SSL connection error: ASN: bad other signature confirmation) on Heroku App with AWS RDS

Mysql2::Error (SSL connection error: ASN: bad other signature confirmation):
I am making an administration site. The environment is Rails 4.2 and Ruby 2.2, connecting AWS RDS with Heroku server.
I don't know why getting this error. It suddenly appeared. I can't find any errors other than this. Although I passed my codes two days ago, I got this error this time.(I haven't touched this code while the two days.)
How can I solve this problem?
For me, this had to do with the RDS SSL Certificate Rotation that happened on April 3rd, 2015.
However, in my case, just using the root certificate did not work, and I had to use a intermediate certificate for my region as well. Details:
Go into the AWS rds console and reboot your RDS instance.
Download the new root certificate https://s3.amazonaws.com/rds-downloads/rds-ca-2015-root.pem. Put it into the config directory of your app.
Download the intermediate certificate for your database region
here. I had to use the US east one, but you will have to pick the one for your region.
This is the key step. You need to combine the intermediate certificate and the root certificate into one file so that the intermediate certificate is above the root certificate, forming a certificate chain. Open the intermediate certificate using a text editor, copy its contents, and paste them into config/rds-ca-2015-root.pem, on top, above the root certificate. So, after you are done, config/rds-ca-2015-root.pem should be the intermediate certificate followed by the root certificate, all in this file.
Get your current database url
heroku config
and then look for the DATABASE_URL property
Update your database URL to use the new certificate file. All you should have to change is the name of the certificate (since its now called
rds-ca-2015-root.pem)
heroku
config:add DATABASE_URL="mysql2://DB_NAME:DB_PASSWORD#DB_URL/DB_NAME?sslca=config/rds-ca-2015-root.pem"
Commit the changes and redeploy to Heroku.
Four years later (2019) and AWS are rotating CA certs again, as expected.
RDS users are recommended to switch from the 2015 cert to the 2019 cert by 2019-11-01, and "no later than" 2020-02-05. The 2015 certificates expire on 2020-03-05.
I used the following procedure, based on RDS' Rotating Your SSL/TLS Certificate guide.
Schedule downtime
Download new certificates, save in config
Only the root cert is needed: rds-ca-2019-root.pem
The instructions mention a 2015+2019 bundle, but I couldn't find it. This file is 2019 only.
Region-specific intermediate certs are not needed
Commit, but don't deploy yet
heroku maintenance:on
In RDS web console, modify server
In the Network & Security section, choose rds-ca-2019
Apply changes immediately
Scale dynos down to 0
heorku config:set DATABASE_URL=mysql2://myuser:mypassword#myhost.rds.amazonaws.com/mydb?sslca=config/rds-ca-2019-root.pem
Deploy
Scale dynos up, watch logs
heroku maintenance:off
There are many reasonable variations on this procedure, this is just what worked for me.