The rulings could affect Indigenous land rights, soya farming and environmental safeguards across the Amazon rainforest.