How to clean up orphaned brands from the IDP database
Original Publishing Date:
2020-03-20
Symptom: Some brands deleted from the OSS database are not cleared from the IDP database. They slow down IDP startup and migration.
Diagnostic: Compare brands from the OSS and IDP databases:
# select substring(name,
3
) as idp_brand_id from realm where name like
'sr%'
;
# select brand_id from brands;
Resolution: Delete each orphaned brand from the IDP database:
# curl -X GET -k -E /usr/local/pem/APS/certificates/poa.pem
"https://127.0.0.1:6308/aps/2/resources?implementing(http://com.odin.idp/idp/realm-management/1)"
| python -m json.tool
# curl -X DELETE -k -E /usr/local/pem/APS/certificates/poa.pem
"https://127.0.0.1:6308/aps/2/resources/<idp_uid>/realm/<brand_id>"
Note: Brands to be deleted must not have linked accounts.