It has already passed in the hadith of Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "The believers are Allah's witnesses on the earth."
And it has been narrated to us from Ata and al-Sha'bi (may Allah have mercy on them both) that they both said: "The testimony of a child born of zina (an illegitimate child) is permissible."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / Q21180