It is annoying , had the same problem , and they always became the worst enemy .
Quick fix for you , say yes to any and all war propostal of the federation ; you dont actualy have to fight , the enemy will not go actively to fight , and the empire that actualy declare war is very likely to be weaker than the target and will do nothing .
If your allyes.actualy win the war , more federation for you , less ebemies , if not , nothing realy change .
Edit.ps. you can actualy mod to remove the malus , but change the version of the game , no archivement .