The random logouts
For a while, some people were signed out for no visible reason, again and again. The pattern was clear once I looked: the same device signing in from scratch several times a week, mostly on mobile networks.
The cause was token rotation. Each time the app renewed its session in the background, the server issued a new secret and immediately threw away the old one. On a flaky connection, the reply carrying the new secret sometimes never arrived. The app was left holding a secret the server had already thrown away, and the next renewal failed. You were logged out.
Rotation was not buying real protection here either: a stale secret just failed, it never set off any alarm. So the renewal secret is now stable, with an expiry that moves forward while you use the device. A lost reply is harmless, because the secret the app already has still works.
A second cause was location checks. Mobile networks change IP address and even apparent country all the time. That looked risky, so renewals were refused. Now only an extreme combination of signals forces you to sign in again.
Trusted devices
Each install of disdroc has its own device ID. Once you have fully signed in on a device, it becomes a trusted device. A trusted device is not logged out just because you travelled. It still follows every expiry rule below, and you can remove it at any time.
What still protects you
- Short-lived access. The token that proves who you are lasts a short time and renews quietly in the background.
- Expiry. A session that sits unused for a long time ends on its own, and every session has a maximum age no matter how active it is.
- Unusual sign-ins. A sign-in from a new place, device or network is scored for risk and may ask you to confirm it is really you.
- Cookies scripts cannot read. Since v1.5.13 your session lives only in httpOnly cookies. JavaScript on the page, including any injected script, cannot read it. This is the same on web, desktop and Android.
- Emails. You get an email when someone signs in on a new device and when your password changes.
- Your control. Settings → Sessions lists every active session. You can end any of them, or sign out everywhere at once. Two-factor authentication with backup codes is in Settings too.
The honest trade-off
Staying signed in cuts both ways.
If someone gets hold of your unlocked phone or computer, they are signed in too. If you lose a device, end its session from another device in Settings → Sessions and change your password.
To do this, disdroc keeps security records such as IP addresses, device details and approximate country. The privacy policy explains what is kept.
Rastgele oturum kapanmaları
Bir süre boyunca bazı insanların oturumu görünür bir sebep olmadan, tekrar tekrar kapandı. Baktığımda örüntü netti: aynı cihaz haftada birkaç kez sıfırdan giriş yapıyordu, çoğunlukla mobil ağlarda.
Sebep jeton yenilemeydi. Uygulama oturumunu arka planda her yenilediğinde sunucu yeni bir gizli anahtar veriyor ve eskisini hemen çöpe atıyordu. Bağlantı zayıfsa, yeni anahtarı taşıyan yanıt bazen hiç ulaşmıyordu. Uygulamanın elinde sunucunun çoktan attığı bir anahtar kalıyor, bir sonraki yenileme başarısız oluyordu. Oturumun kapanıyordu.
Bu yenileme burada gerçek bir koruma da sağlamıyordu: eski bir anahtar sadece başarısız oluyor, hiçbir alarmı tetiklemiyordu. Bu yüzden yenileme anahtarı artık sabit ve cihazı kullandıkça süresi ileri kayıyor. Kaybolan bir yanıt zarar vermiyor, çünkü uygulamanın elindeki anahtar hâlâ geçerli.
İkinci sebep konum kontrolleriydi. Mobil ağlar IP adresini, hatta görünen ülkeyi sürekli değiştirir. Bu riskli görünüyordu ve yenilemeler reddediliyordu. Artık yalnızca uç bir sinyal birleşimi seni yeniden giriş yapmaya zorluyor.
Güvenilir cihazlar
disdroc'un her kurulumunun kendi cihaz kimliği var. Bir cihazda tam olarak giriş yaptığında o cihaz güvenilir cihaz olur. Güvenilir bir cihazın oturumu sırf seyahat ettin diye kapanmaz. Yine de aşağıdaki bütün süre kurallarına uyar ve onu istediğin zaman kaldırabilirsin.
Seni hâlâ koruyanlar
- Kısa ömürlü erişim. Kim olduğunu kanıtlayan jeton kısa süre geçerli ve arka planda sessizce yenileniyor.
- Süre dolumu. Uzun süre kullanılmayan bir oturum kendiliğinden biter ve her oturumun, ne kadar etkin olursa olsun, bir azami ömrü var.
- Olağandışı girişler. Yeni bir yerden, cihazdan ya da ağdan yapılan giriş risk açısından puanlanır ve gerçekten sen olduğunu doğrulamanı isteyebilir.
- Betiklerin okuyamadığı çerezler. v1.5.13'ten beri oturumun yalnızca httpOnly çerezlerde duruyor. Sayfadaki JavaScript, araya sokulmuş bir betik dahil, onu okuyamaz. Web, masaüstü ve Android'de aynı.
- E-postalar. Biri yeni bir cihazda giriş yaptığında ve şifren değiştiğinde e-posta alırsın.
- Kontrol sende. Ayarlar → Oturumlar bütün etkin oturumları listeler. İstediğini sonlandırabilir ya da her yerden aynı anda çıkış yapabilirsin. Yedek kodlu iki adımlı doğrulama da Ayarlar'da.
Dürüst ödünleşim
Oturumun açık kalması iki yönlü bir şey.
Biri kilidi açık telefonunu ya da bilgisayarını ele geçirirse, o da giriş yapmış olur. Bir cihazını kaybedersen, başka bir cihazdan Ayarlar → Oturumlar'a girip o oturumu sonlandır ve şifreni değiştir.
Bunu yapabilmek için disdroc IP adresleri, cihaz bilgileri ve yaklaşık ülke gibi güvenlik kayıtları tutar. Nelerin tutulduğunu gizlilik politikası açıklıyor.