The Wild-West days are here again
> the UN decided ...
Once habitats in space become self-sufficient, the decisions of a planetary based talking shop will be completely irrelevant. Note the proviso: self-sufficient.
Laws, rules and regulations only work when they can be backed up (ultimately) by force. If a mining operation, in orbit or beyond , decided to cede, there's not a lot - short of sending up a "police" action to point out the error of their ways - that a ground based legal system can do. As readers of Lucifer's Hammer will recall: being at the top of the gravity well trumps being at the top of the food chain. And throwing rocks can be terribly effective.
So, just like settlement in other colonies, there will be a period of lawlessness, probably a revolutionary war (or war of independence, depending on who's history you subscribe to) and almost certainly a civil war or two. After that the occupants take it upon themselves to formulate their own laws, for their own domains over which they have the ability to enforce them. Given the size of spaaaaaace, it's more than likely that several empires (striking back, or not) and hegemonies will arise - whether the UN or any earthly government approves or disapproves.