Defense Secretary Gen. James Mattis and Joint Chiefs of Staff Chairman Gen. Joseph Dunford found something constructive to tell senators on an appropriations subcommittee this week, even if it had nothing to do with the Pentagon budget. They challenged lawmakers to finally provide a legal basis for the U.S. war against terrorist groups.

It’s something that President Obama was never able to get from Congress. So instead, for his entire presidency, Obama based U.S. counterterrorism efforts abroad mostly on the authorization for the use of force that Congress passed shortly after the Sept. 11 attacks. The logical problem here is obvious: Today’s biggest terrorist enemies – groups such as the Islamic State and al-Shabaab in Somalia – didn’t exist in 2001. Thus, it’s absurd to say they count among the terrorists who “planned, authorized, committed or aided” the Sept. 11 atrocities. Nor are they covered by the follow-on 2002 authorization to invade Iraq.

This is more than legal semantics. Congress has for too long abdicated its role in American war-making, another example of it ceding ever-more ground to the executive branch on matters of highest national importance.

And now that President Trump is reportedly looking at counterterrorism actions going well beyond the Obama approach – including bringing new terrorists to Guantanamo Bay, and loosening the rules on and broadening the air war in Yemen and Somalia – the legal precariousness poses a tangible threat. Any new detainees brought to Gitmo would have a strong claim to U.S. courts that their imprisonment is illegal, while international authorities could more easily make the case that drone strikes in Somalia or Yemen are war crimes.

Of course, there are many issues to be hashed out on the language of a new measure. Would it have geographic constraints, or allow the U.S. to fight the jihadists wherever they go? Would it be indefinite or have a sunset date? Would it replace the 2001 measure or just augment it? In any case, a new authorization should require the administration to report regularly to lawmakers and the public on where actions have taken place and what groups have been added to the target list.

But before Congress can even start grappling with these questions, it needs to get serious about its constitutional requirement to get involved. Let’s hope Mattis and Dunford gave lawmakers the boost of courage they needed.