A significant factor in the Great War, World War I, was the existence of many secret treaties between the combatants. These treaties promised help in the event of war, and guaranteed that one country would allow another influence over a third, and so on.
Are such secret treaties still enacted in modern times?
Note that to the question "how would we know about them if they are secret?", the answer is that not all secret treaties stay secret. For example, even though most of the secret treaties known were only revealed after the end of the war, a few were revealed accidentally or were leaked. For example, the secret naval treaty between Austria and Serbia was leaked to the public in 1909.