Nawas bin Saman reported,

The Messenger of Allah ﷺ said, "Allah has set forth a parable. There is a straight path, and on both sides of the path are two walls in which there are open doors, and over the doors are hanging curtains. At the entrance of the path stands a caller who says, 'People, enter the path all together and do not deviate.' And there is another caller who calls from above the path. Whenever a person wishes to open one of those doors, this caller says, 'Woe to you, do not open it, for if you open it, you will pass through.'The path is Islam, the two walls are the limits set by Allah, the open doors are the things Allah has forbidden, the caller at the head of the path is the Book of Allah, and the caller from above the path is the admonisher of Allah in the heart of every Muslim."

Azami 15661

Sahih

عن النواس بن سمعان الأنصاري

عن رسول الله ﷺ قال: ضرب الله مثلا صراطا مستقيما، وعلى جنبتي الصراط سوران، فيهما أبواب مفتحة، وعلى الأبواب ستور مرخاة، وعلى باب الصراط داع يقول: يا أيها الناس ادخلوا الصراط جميعا، ولا تتعرجوا، وداع يدعو من فوق الصراط، فإذا أراد أن يفتح شيئا من تلك الأبواب قال: ويحك، لا تفتحه، فإنك إن تفتحه تلجه. والصراط الإسلام، والسوران حدود الله، والأبواب المفتحة محارم الله، وذلك الداعي على رأس الصراط كتاب الله، والداعي من فوق الصراط واعظ الله في قلب كل مسلم.

الأعظمي 15661صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Holding fast to the Quran and the Sunnah
Chapter
Images and image-makers
Section
Urging adherence to the straight path
Numbering
Jami al-Kamil 15661 (2nd edition)
Azami 15661