Same way it does on earth. Whoever actually controls the resource becomes its owner. Once someone establishes an independent presence is space they will claim independence from earth and such treaties and lay claim to anything they can reasonably defend.
shows that if you mine it, you own the ore but not the site. Although you are right that as long as there's no 'space police' there isn't really a way to effectively enforce policy.
It'll get extremely interesting when a company of country A returns an extremely rare very useful element. Country A will of course lay claim to it, but according to the Outer Space Treaty all space exploration is done 'for the benefit of mankind', so other countries would be able to claim this extremely rare element (or its benefits) must be shared. That'd be hell of an interesting international law case.
It somewhat amounts to "whoever got there first wins".
It seems that the current US position (who will probably be the first to start large scale mining) is that the resource site itself will never be owned but that labor attaches ownership to the ore. As said on the site, this still doesn't deal with when a singular deposit of an element exists and how access would be shared.
Another interesting point that's raised is that if an asteroid is entirely consumed by mining, does that count as 'appropriation'?
Man the next 100 years are gonna be a reaaaallly interesting time for lawyers..
The treaty explicitly forbids any government from claiming a celestial resource such as the Moon or a planet.[3] Art. II of the Treaty states that "outer space, including the Moon and other celestial bodies, is not subject to national appropriation by claim of sovereignty, by means of use or occupation, or by any other means"."
This basically means that no one can lay claim to stuff in space. But say there is an extremely valuable metal floating around, and company A wants to mine it. They arrive and start to mine it. Now, company B arrives a year later and also wants to mine it but company A is in the way. According to the treaty, company A can't claim the resource so they can't tell company B to go away, and company B can't tell company A to get out of the way. How does this get resolved?