From The New York Times:

It is hardly an Axis redux. This time, Japan and Germany are banding together from a defensive posture, with Berlin supporting Ukraine’s defense against Russia, and Tokyo wary of threats posed by China and North Korea. They are joining other like-minded “middle powers,” like fellow Group of 7 members Britain, Canada and France — their enemies in World War II. And they are casting themselves as champions of international law and institutions that serve as bulwarks against the bullying behaviors of the world’s most powerful countries.
As Boris Pistorius, the German defense minister, said in March at a Japanese naval base, nations like Germany and Japan, “who still stand by the rules-based international order, must move even closer together and make clear what we stand for.”