By early 1942 the Allies, with both the Japanese and German secret codes in their possession, were aware of the plan for the Germans, Italians and Japanese to join forces and capture the Middle East. The war had been going badly at home, Rommel was at the gates of Cairo, the Japanese were at the frontiers of India, the Far East was in Japanese hands and we had lost the British and Dutch Far Eastern fleets.
The Japanese had occupied the Andaman's, and only undefended Southern India and barely defended Ceylon stood in between them and their proposed link up with the pro -Nazi Vichy French in Madagascar.