He who disbelieves in Allah after his belief in Him, (is the liar) except he who is compelled while his heart remains steadfast with the faith (has nothing worry). But who opens his breast for infidelity; on these is wrath of Allah, and for them is a great torment.
--Quran, Surah 16 (an‑Nahl), verse 100
This verse of the Quran refers to the incident when 'Ammar bin Yasir (May Allah be pleased with both) had to utter some words against Islam to save himself from the Quraishite infidels.
The Qur'an clearly allows hiding one 's true faith when one is in danger of one's life. This rule is called taqiyah.
Question 1: What is the meaning of "Taqiyah"?
Answer: Its literal meaning is to safeguard; to defend; to fear; piety (because it saves one from the displeasure of Allah).
Question 2: What is its significance in Islamic terminology?
Answer: In Islamic terminology it means "to save life, honour. or property (either one's own or of other believers) by hiding one's belief or religion".
I imagine the rule would apply in a lesser way to a Muslim who hides his jihad sympathies.