Summary of Discussion on Password Security in Discourse API
A discussion was initiated by mikeredick regarding the security concern of passing plain text passwords when creating a user through the Discourse API. mpalmer explained that using SSL is considered sufficient to protect secrets in-flight, but Siddhu_Dhangar suggested passing an encrypted or hashed password instead. However, mpalmer clarified that hashing is not a supported configuration due to its changing mechanism within Discourse. mpalmer also pointed out that if someone has access to the endpoint, they can still capture the password. RGJ mentioned that if SSO is enabled, the password is not used, and spirobel suggested certificate pinning to prevent man-in-the-middle attacks.
I’m creating a small windows application that will use Discourse as the SSO provider. The first step in that chain is allowing the app to create a user through the Discourse API.
I’ve got that working, however it seems that the password for the user is passed in plain text and I’m wondering why that is? It seems like that could be a security issue… is the thought just that people should use SSL and that’s good enough to protect the password?
Yes, SSL is considered sufficient to protect secrets in-flight. Until the world sees the light and switches to something like TLS-SRP, sharing secrets over a secured channel are pretty much all we’ve got to work with.
هل توجد طريقة لإرسال كلمة مرور مشفرة بدلاً من النص العادي؟ نحن نطور تطبيقًا نستخدم فيه واجهة برمجة التطبيقات /session للتحقق من مصادقة المستخدم، حيث يجب إرسال اسم المستخدم وكلمة المرور. لاحظت أنه إذا فتحت أدوات المطور في المتصفح، يمكنك رؤية كلمة المرور كنص عادي كما نمررها عند تسجيل الدخول. لذا، إذا حصل أي شخص على وصول إلى جهاز الكمبيوتر الخاص بي، فقد يتم اختراق كلمة المرور، أليس كذلك؟
طالما أنك تستخدم TLS، تُرسَل كلمات المرور بشكل مشفر. أما إذا لم تكن تستخدم TLS، فأنت في طريق سريع نحو الدمار بغض النظر.
إذا كنت تقصد “مُجزَّأة” بدلاً من “مشفرة”، فلا، فهذا ليس تكوينًا مدعومًا، لأن آلية التجزئة المستخدمة داخل Discourse ليست جزءًا من واجهة العقد العامة، وقد تتغير في أي وقت.
حسنًا، نعم، لكن إذا كان لدى شخص ما وصول إلى جهاز الكمبيوتر المحمول الخاص بك، فيمكنه ببساطة تثبيت برنامج تسجيل المفاتيح الذي يلتقط كلمة المرور قبل أن تمر عبر أي عملية تجزئة. تتضمن نموذج تهديد الأمان في Discourse (وكل تطبيق ويب) شرطًا مفاده أن نقطة النهاية غير معرضة للاختراق.