European Union and NATO members are deepening security cooperation with Japan and South Korea as defence alliances become more regional.