SSL error for HSTS enabled site with Self Signed certificate - google-chrome

I created a self signed wild card certificate (*.website.local) on our internal environment which can be accessed using an internal DNS URL (ex: https://site1.website.local).
I have HSTS enabled for the purpose of testing I want to enforce it.
When browsing to the site using Edge I would see the following error.
Error:
Your connection is not private.
Attackers might be trying to steal your information from website.local (for example, passwords, messages, or credit cards). NET::ERR_CERT_INVALID. website.local normally uses encryption to protect your information. When Chrome tried to connect to website.local this time, the website sent back unusual and incorrect credentials. This may happen when an attacker is trying to pretend to be website.local, or a Wi-Fi sign-in screen has interrupted the connection. Your information is still secure because Chrome stopped the connection before any data was exchanged.
You cannot visit website.local right now because the website sent scrambled credentials that Chrome cannot process. Network errors and attacks are usually temporary, so this page will probably work later.
I know the work around is to type in thisisunsafe or badidea and it would work after that.
It would be nice to not having to type this in and instead do something to make the browser recognized that I trust my own self sign certificate. I attempted to put the certificate into my Trusted Root CA but it does not help. Do you know of any other steps I can try?

Related

Are there Browser and Client Certificate/Key interactions besides mTLS handshake?

I know that if presented with an mTLS request an modern browser will request the user select a certificate from a store (OS-based or in Firefox's case NSS-based). I was wondering if there is any other way for the Webpage that is returned after the mTLS handshake to requests actions be performed with the users certificate or private key, such as:
Can the webpage be aware of the selected certificate and read some of the field with a Javascript API? (IE: <h1> Hello {x509CommonName}</h1>)
Can the webpage request that the user sign something with their private key? (little risky but potentially useful)
I am not asking how easy it is to just use the web server to reflect the certificate back to the client.
From the client side, it is not possible to obtain the certificate used in the SSL connection, nor to perform a digital signature. The browser keystore is not accessible via JavaScript. Although there has been some attempt to develop a standard API, it seems that it is not succeeding. See https://www.w3.org/TR/webcrypto-key-discovery/
On the server side you can easily obtain the certificate used. Any web server will provide it to the application layer. The web page could navigate to a zone with ssl two ways authentication, the server would retrieve the certificate and return it in the response

How to change the "Secure" text from chrome ssl certificate next to url?

I see some website have changed the label on chromes ssl certificate, next to the url, from "Secure" to something else. Example: https://sunday.dk/ (Where the label is "Danske Bank A/S [DK]):
This is a particular type of SSL certificate called Extended Verification (EV)
An Extended Validation Certificate (EV) is a certificate used for HTTPS websites and software that proves the legal entity controlling the website or software package. Obtaining an EV certificate requires verification of the requesting entity's identity by a certificate authority (CA).
Have a look on Google for "extended verification ssl certificates" and you'll find lots of providers who will sell you one.
As a word of warning, there is quite a bit of admin in order to get the certificate issued. If you're familiar with buying normal SSL certs then this is a quick process and is mostly automated and takes a few minutes. I have spent a couple of weeks going back and forth to get an EV.

How to stop Security Warnings in Google Chrome for Self-Signed Certificates

I need to bypass/prevent privacy error message of "Your connection is not private" or automatically proceed to (unsafe) .
I can accept unsafe connection by clicking on advance but, it's not permanent.It will again shows after system restart.
Chrome version is "51.0.2704.63 m"
I have tried various links but still I don't found any fix for this.
I have tried this but not getting setting "Remember decisions to proceed through SSL errors for a specified length of time. "
: https://kb.paessler.com/en/topic/63157-how-can-i-stop-google-chrome-showing-me-a-connection-not-private-message
Adding site as trusted site also not worked for me : http://kb.mcgill.ca/?portalid=2&articleid=1925#tab:homeTab:crumb:8:artId:1925:src:article
By adding your self signed certificate as trusted root you won't get the warning page anymore but the red lock will remain. You will need to do this for each certificate you want Chrome to trust.
View the certificate by clicking the red lock next to the URL and clicking "Certificate"
Go to the "Details" tab and "Copy to file..." and run through the wizard
Go to chrome://settings/?search=manage+certificates and click "Manage Certificates"
Add the certificate you just saved
Note: Chrome uses the Windows certificate store but you can access it as described above.
I know this post is old and you might have already got answer to the question. However, i would like to provide more insight into removing the security warning from browsers. Basically, any browser confirms below list items before marking a website/url secure:
Match the base DNS with that of the certificate CN (Note that the port number doesn't come into picture in this case). For example, if you are accessing https://example.com:8445/something, the certificate CN should be "example.com"
The self-signed certificate has to be imported into the respective trust store (Root Certification Authorities) of the system.
The certificate must have a SAN (Subject Alternative Name), that matches the DNS. With respect to previous example, the certificate must have at least one SAN equivalent to "example.com". This is a must, and most of the folks miss out on this point, and could not understand why the browser doesn't trust the certificate.
Now, all the above 3 criteria cannot be met unless the certificate is signed by a CA. However, there is an easy way. Go to https://freesslcert.org/ to receive a completely free 1 year certificate with all the above criteria incorporated. Follow the steps mentioned in https://freesslcert.org/trust-freesslcert-in-browser and you are all set.

https calls to local server with a self signed certificate are blocked on chrome (works on FF)

I've created a certificate and a key using openssl, and using node.js to server a simple (hello world) file.
Chrome acts like the request never gets to the server (server logs too confirms).
Firefox warns about the certificate, but lets you access the file.
See attached image.
Any ideas?
OS: mac 10.9.5
Chrome: Version 41.0.2272.118 (64-bit)
The whole purpose of certificates is to be signed by a third entity, called a Certificate Authority (CA). A client will generally not accept a certificate given by a server unless the server produces a certificate signed by a CA specifically known to the client.
The 'identity' of a CA and the process of 'signature' are cryptographic concepts that are very precise and strict in order to avoid bad guys impersonating other people (your bank, Google, etc.).
Browsers usually allow you to accept untrusted certificates on a per-session basis, because bad certificates are everywhere and are not necessarily always a sign of malicious activity going on. However automatic code (Node.js included) will almost universally reject bad cetrtificates, because there's no way to ask a user for an override.
What you need to do is to generate a CA certificate and instruct you node.js client to trust it. I think the following links to a valid sample:
https://github.com/coolaj86/nodejs-ssl-trusted-peer-example. Look specifically at request.js - the relevant line is
fs.readFileSync(path.join(__dirname, 'certs', 'client', 'my-root-ca.crt.pem'))
Try to troubleshoot this further. Try other clients or an http(s) proxy.
Specifically I would try other browsers, https://github.com/iSECPartners/sslyze, Fiddler, curl, and other similar tools.

Chrome uncaught error 'Protocols must match' on G+ signin

I've added a G+ login button on my website, but I keep seeing this issue. In most cases this comes first time and if you try to connect after refreshing the page, it works.
Here's the error:
Uncaught SecurityError: Blocked a frame with origin .com" from accessing a frame with origin "https://accounts.google.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match.
I saw this post Google + SignIn Button Blocked Frame but the solution isn't relevant to me.
First, I want to emphasize that you really should be using https when handling user credentials. If you can, get an SSL certificate and serve your content over https. By using HTTPS, you can prevent MiTM attacks and user information leaks.
That aside, there are a number of potential sources triggering the warning:
If you are using the Sign-in button from a page serving HTTP instead of the more secure HTTPS, sometimes communication with the sign-in servers gets blocked. If sign-in sometimes works and sometimes doesn't, this may be the cause.
If your authorized JavaScript origin protocol (http / https) doesn't match, the Google authorization server will reject your client (http://yoursite.com when you meant https://yoursite.com)
If your authorized JavaScript origin does not match (e.g. you put .com in the authorized origin, when you meant yoursite.com) then the OAuth server will reject your frame.
Listing your authorized origins (obfuscated for security) from the Google Developer Console and the site might help to determine what's going on in your case.
A few things you can change to see if it helps:
Try changing your cookie policy to either 'single_host_origin' or to 'http://yoursite.com'.
Try cleaning the authorized origins in the developer console to only include your http:// domain.
Try accessing your site from an incognito tab, if this works, your browser cookies may be in a bad state for the site.
Try using Chrome network diagnostics to see if specific requests are failing.
Try replacing any includes that use an explicit protocol with includes referencing a relative protocol (e.g. replace <script src="https://foo.bar/include.js" /> with <script src="//foo.bar/include.js" />)