John Kelly can't make that legal by signing a memo. This is just another example of Trump's white house trying to overstep their authority. The courts won't allow that order to stand.
From the OP's link......................................
The White House has sent a memo to the Pentagon granting troops stationed at the border authority to engage in some law enforcement and to use lethal force if they are in danger.
The Defense Department said it’s received the memo and is “reviewing it,” suggesting the new policy is not yet operational.
Interestingly enough, the OP left out the second paragraph in their post. The DoD is reviewing it, and it isn't operational yet. But, I don't really think that this is gonna fly, because of the Posse Comitatus Act. There are only 3 reasons that the active duty military can be deployed inside the borders.........
1) When requested by the state governor or legislature for help in putting down an insurrection that has gotten out of hand and they need the military to stop it.
2) Whenever nuclear weapons are lost. The military is the best equipped to search for, find, and recover those items.
3) Whenever chemical and bio weapons are lost. Same reason as nuclear weapons.