Reverting iPKI Migration to get a MID Server back Up on Basic Auth, for when iPKI goes wrongIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } There are potentially several scenarios where a MID Server ends up Down, because iPKI Authentication (Private-Key JWTs) becomes broken, and a quick temporary workaround might be to put it back to using Basic Auth with username plus password. The initial Migration fails after the probe has done the changes in config.xmlThe MID Server was Migrated, but the Certificate later expired due to issues rotating it automatically or on demandChanges in the instance or to the user meant the MID Server was unable to authenticate with the certificate it currently has.A clone causes a MID Server to Downgrade to a version that didn't have iPKI authentication code.(PRB2114093) Setting the MID Server back to Basic Auth would at least get it back up and usable, to buy time to investigate and solve the causes to prevent this happening again. Then Migrate back to iPKI one that's all fixed. A fresh new install would probably be even easier than this, and not have any historical baggage. You would then set your features to use the new MID Server instead. Important note: This is not and will never be the solution to a support case, because Basic Auth is now considered legacy and will be deprecated, due to known security vulnerabilities in this authentication method in general. Until the causes are resolved in the instances, and the MID Server is back on iPKI (or mTLS) auth, the case is not solved. Symptoms<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Restart the MID Server, and shortly after startup, the MID Server Agent logs will confirm that the MID Server is using iPKI, and can't authenticate with the instance. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Since Zurich Patch 11, and Australia Patch 4, when iPKI was introduced. However you might need this article earlier, if a clone has just downgraded the instance version to earlier versions. Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } This article isn't covering the various causes, although common ones might be listed in Related Links as we find them. Resolution Check your instance user has the agent_admin (or admin) role.Log into the MID Server host, and open the agent folder, which you can find from a list view of MID Servers after adding the Host name and Home folder column.Confirm the MID Server Service/Daemon is stoppedDelete the iPKI Migrations record:Note: This is necessary for the MID Server to become Eligible to be migraded again later. Open the iPKI Migrations list:https://<instance_name>.service-now.com/sn_mid_infra_ipki_migration_list.doOpen the record for this MID ServerDelete Delete the Certificate Mapping record for this MID Server. Note: The presence of this record informs the conditions of UI Actions on the MID Server record, and so is neccessary to delete for Basic Auth-related UI actions to be shown again. Open https://<instance_name>.service-now.com/sn_mid_infra_cert_map_list.doOpen the record for this MID ServerDelete Delete the certificate from the Unified keystore. Note: Don't delete the keystore file (ever), as there are likely to be other certificates in there, that you need to keep, even if you aren't using any for the MID Web Server extension. Don't delete eccsigningkeypairhandle. Open a shell or command prompt at the agent\bin\scripts folder.To list what's in the Keystore, run ./manage-certificates.sh -lor manage-certificates.bat -lExample output:### Number of aliases in the Keystore are : 2### Aliases in the Keystore are : defaultsecuritykeypairhandle, eccsigningkeypairhandleDepending on what you have in that list, run one of more of these commands (or .sh instead of .bat for linux), to delete these 3 aliases only, leaving any the others as they are: manage-certificates.bat -d defaultsecuritykeypairhandlemanage-certificates.bat -d tempipkikeypairhandlemanage-certificates.bat -d tempipkimigrationhandle If you had removed or changed the password in the sys_user record in the instance since MID Servers were using it, then re-enter it.Edit the agent\config.xml file Set mid.ipki.enabled to false: <parameter name="mid.ipki.enabled" value="false"/>Add the mid.instance.username and mid.instance.password" back: <parameter name="mid.instance.username" value="your_instance_user_for_this_mid_server"/> <parameter secure="true" name="mid.instance.password" value="the_fiendishly_complicated_plaintext_password"/>Save Start the MID Server ServiceOnce the MID Server is Up and settled down, you will expect to see a MID Server issues record created for "MID Server encryption keys do not match and are no longer valid. To restore proper functionality, invalidate and re-validate the MID Server."In the Server Actions, select RekeyNote: That causes an automatic restart, and the final basic auth-type defaultsecuritykeypairhandle certificate is created.Once the MID Server restarts, the Issues record should automaticlly get set as Resolved within a few minutes.