Symptoms
We can't Cache our SAP Credentials on our K2 production System. With the identical configuration on an other Server we can Cache the credentials without a Problem
Diagnoses
We extensively discussed the issue via email, gathered logs, we could see the error in the K2HostServer logs, however when monitoring the SAP server, it seemed like they can successfully authenticate using the credentials provided, however K2 still returned an error in Workspace -> User -> SSO (Single Sign-On).
The client also admitted that they changed their working, QA server (that connected to SAP QA environment) to a Production server (that connected to the SAP Prod environment). We're not entirely sure how they did this however, but do know that they added a new environment library called "Production" and set is as default, amongst other things.
We are under the impression that something goes wrong when writing the encrypted credentials to the database, we did a SQL profiler trace but didn't extensively analyse it.
Resolution
We created a new Production server (new VM) and installed K2 fresh on that server and made sure the connection is working now.