คิดว่าเรื่อง security หรือ ความปลอดภัย ในการใช้ username และ password ก็เป็นความรู้ที่น่าจะได้มาเล่าสู่กันฟัง ในครั้งนี้ผมได้ลองตั้งค่าการใช้ TOTP Second-factor Auth ร่วมกับ password ของ ownCloud ในหน้า login ที่ web page
การใช้ TOTP Second-factor Auth ร่วมกับ password ก็คือ การที่แอดมินที่ดูแล ownCloud Server ได้เพิ่ม App ชื่อ 2-Factor Authentication ไว้เพื่อให้ user ได้เลือกเองว่าจะใช้งานหรือไม่ โดยแสดงเป็น option อยู่ในหน้า settings ของ user
ข้างล่างนี้เป็น captured รูปภาพที่แอดมินเพิ่ม App TOTP Second-factor Auth โดยติดตั้งจาก Market



ส่วนข้างล่างนี้เป็น captured รูปภาพเมื่อ user เลือกใช้ TOTP และ เข้าใช้งานผ่านเบราว์เซอร์ โดยใส่ TOTP ที่ได้จาก App บนมือถือ เช่น Google Authentication หรือ Microsoft Authentication เป็นต้น



นอกจากนี้เราสามารถตั้งค่า App passwords สำหรับ ownCloud Desktop Client ดังรูป

ส่วนข้างล่างนี้เป็น captured รูปภาพ ownCloud Desktop Client หากมีการตั้ง App passwords


แต่ถ้าแอดมินเลือกติดตั้ง OAuth2 ก็จะทำให้การใช้งานทั้ง desktop client และ app บน smart phone นั้นมีความปลอดภัยมากขึ้น สะดวกมากขึ้น เพราะว่าจะเป็นการส่ง token ไปเก็บไว้แทนการเก็บ username และ password ไว้ใน app
ข้างล่างนี้เป็น captured รูปภาพที่แอดมินเพิ่ม App OAuth2

ในครั้งแรกที่เข้าใช้ Desktop Client หรือ App จะมีหน้าเว็บเพจเด้งขึ้นมาให้ใส่ username กับ password เพียงครั้งเดียว และขอให้ผู้ใช้คลิก Authorize จากนั้นก็ใช้งานได้ตลอดแล้ว




รูปแสดงว่า เรามีการเข้าใช้อุปกรณ์อะไรบ้าง

ดังนั้น หากใช้ OAuth2 ก็ไม่จำเป็นต้องใช้ TOTP Second-factor Auth แล้วครับ
สภาพแวดล้อมการทำงาน
- ownCloud Server (ownCloud community) version 10.2.1 (stable) ติดตั้งบน Ubuntu 16.04 server และ
- ownCloud Desktop client version 2.5.4 (build 11415) รันบน Windows 10 version 1903