The answer is of course it is legal, under international law (well at least our interpretation of it), US law and common sense to kill terrorists anywhere, any time, any place. Now there are those who would argue that the ban on assassinations prohibits us from targeting al Qaeda or other terrorists, but those people would simply be wrong. This right is based in the concept of self defense, nothing more nothing less, not the Authorization to Use Military Force (AUMF) passed by Congress after 9/11 that allowed us to kill anyone involved with those attacks, no UN resolutions, nope good old-fashioned self defense doctrine is accepted to justify whacking tangos of any flavor.
Read the analysis and the paper cited at the link to Volokh Conspiracy if you want more detail on the legalities, but they are pretty clear and pretty simple. Terrorism is the same as pointing a gun at an entire country, or world for that matter, and if you catch a bullet for doing so well tough shit. We don't need to ask permission or beg forgiveness and the President doesn't need to ask Congress. He still needs to inform the leadership of covert ops as required by US law, but he doesn't need their blessing.
After 9/11 most folks assumed we were doing everything in our power to kill or capture anyone associated with al Qaeda, but many also might have assumed some authority to do so was needed. If so it resides in Article II of the Constitution where the President gets his Commander in Chief authority. Hunting and killing terrorists is not war and so I will join the Obama administration in foregoing the moniker "War on Terror" instead we can re-brand it as the "Terrorist Hunting Worldwide Authorization Card for Killing or THWACK.
This license is good for all manners of helping tangos assume room temperature from banging them in the temple joint with a rock, Lopping their heads off with a scimitar, Ventilating their craniums with a 7.62x51 rd, or returning them to their component molecules with any manner of precision-strike weaponry Hellfire on up.
So lets get these licenses distributed to all agencies with knuckle-draggers on staff, and an appropriate bonus program for successful exterminations. SInce Congress has such an interest in hearing about such things we can even put the heads on pikes at the Capitol so they can keep count. Happy hunting.