Barack Obama may not realize it, but I may have just helped save his presidency. How? By winning a drawn-out fight to protect his powers as commander in chief to wage war and keep Americans safe.

He sure didn't make it easy. When Mr. Obama took office a year ago, receiving help from one of the lawyers involved in the development of George W. Bush's counterterrorism policies was the furthest thing from his mind. Having won a great electoral victory, the new president promised...