Attempt to create ADFS connection returns "Error! ... Either adfs_server or fedMetadataXml must be set but not both."

Problem statement

We’re facing one strange issue while creating an enterprise connection for an existing ADFS metadata URL. There is already a connection existing using this URL. But when we tried to create a new connection it’s always throwing an error:

"Error! Something happened while trying to save your connection: Either adfs_server or fedMetadataXml must be set but not both."

I’m not uploading the metadata file, but instead, I’m just proving the metadata URL in the Dashboard.

Cause

This is caused by the metadata URL using an unsafe renegotiation configuration for TLS/SSL. Unsafe renegotiation is not supported after API2 was upgraded to node 18.

Solution

As a quick workaround, you can load the federation metadata in a browser and then upload it as a file, though the OpenSSL/TLS versions running on this host should be updated to support safe renegotiation ASAP.