The War Powers Act of 1973. Of course we are allowed to retaliate
lawfully. The President may not cause significant conflict escalation without consulting Congress
unless there is danger so imminent that it must be stopped immediately.
The White House is claiming imminent danger, but there are lots of problems with that.
They have not released any convincing details of any such attack. Even those who have seen the classified after-the-fact report to Congress are not convinced.
Soleimani was a top leader and planner. He wouldn't participate in an attack. If there were an imminent attack coming it was planned months ago and taking out Soleimani wouldn't stop it.
We've known about Soleimani for decades. Previous administrations refrained from targeting him because they felt it would be too provocative. He hadn't done anything new recently. Why now? Well, it's a fact that it took away a lot of talk about impeachment. Make of that what you will.
Several government officials have said he was assassinated in retaliation for Iran's recent actions. Personally, I believe them. If that's true the assassination was not targeting an imminent threat.
Assassination is against US law. But the law doesn't define assassination precisely and leaves several loopholes. We've assassinated many people since that law was passed with no consequences (for various reasons). So it would be hypocritical to punish Trump for breaking that particular law.