Dreaming of being a witness signifies victory over enemies and standing up for the truth. If you see yourself as a genuine witness to a contract in your dream, it indicates that you will be able to prove the truth of an important matter. This symbolizes your morality and integrity, which will aid you in making the right decisions in various aspects of your life.
From Imam Muhammad Ibn Seerin's Dictionary of Dreams According to Islamic Inner Traditions â entry "Witness" (page 478).
An eyewitness in a dream means triumphing over one's enemy, testifying to the truth and refuting falsehood. If one sees himself as a true signing witness to an agreement in a dream, it means that he will triumph over his enemies. If one sees himself witnessing a contract or putting his seal on a testimony in a dream, it means that he will loan money to the second party in the contract. If one sees himself bearing a true testimony before someone and against the other in a dream, it means that he will attend the pilgrimage in Mecca.
Note: Islamic dream interpretation depends on the dreamer's circumstances and state. This is a general guide drawn directly from the source book.