TOKYO - Japanese parliament on Friday enacted a law to allow preemptive acts of cyberdefense, giving the government the ability to legally monitor communications data during peacetime and to neutralize hostile servers in the event of an attack.