We have integrated SAML onto our AEM publish instances, for this we had to separately install certificate in both our publish instances trust store. On uploading the certificate in trust store an alias is getting autogenerated.
We are looking for options to maintain this SAML configuration in our code base. But since we have a different alias in both the publish instances its not possible to keep this in code. is there some way we can upload this cert into truststore in author and replicate it to the publish instances
The alias is only generated/needed when setting up SAML and it should be a one-time activity. So, if the underlying certificate is not changing, you can use "config.author" for author SAML config and "config.publish" for publish SAML configuration and the alias will be applied as per the runmode.
If the certificates are regularly changing, then you can look into replicating the truststore from author to publish. In theory, it should work but I would recommend testing it before trying it on prod.