Symptoms
Realm does not exist
Diagnoses
recently ran the K2 setup manager to configure and remove SSL binding from K2. Once that had completed successfully anyone that tried to access the Runtime web services would receive the realm does not exist error. I went through the Identity tables in the database and changed the entries to reflect what they should be and restarted K2 but still had the error.
I found in the K2 blackpearlK2 smartforms RuntimeWeb.config file it was still referencing the old URL under the tag. After I changed it to the correct URL everything worked. I also noticed that the other Web.config files also had the wrong URL.
I'm not sure if this is a bug or if the Web.config files are meant to update from the database entries when K2 starts. But it should be noted that the entries aren't consistent.
Resolution
When making these changes , be sure to run the BP SF Setup manager afterwards to ensure that the configurations changes are applied to all required configs