Geri Dön

Comparative security and performance analysis of session-based and jwt-based web session mechanisms

Comparative security and performance analysis of session-based and jwt-based web session mechanisms

  1. Tez No: 1027589
  2. Yazar: ABDAAL KHAN KHATTAK
  3. Danışmanlar: PROF. DR. HASAN DAĞ
  4. Tez Türü: Yüksek Lisans
  5. Konular: Yönetim Bilişim Sistemleri, Management Information Systems
  6. Anahtar Kelimeler: Belirtilmemiş.
  7. Yıl: 2025
  8. Dil: İngilizce
  9. Üniversite: Kadir Has Üniversitesi
  10. Enstitü: Lisansüstü Eğitim Enstitüsü
  11. Ana Bilim Dalı: Bilgi Güvenliği Mühendisliği Ana Bilim Dalı
  12. Bilim Dalı: Belirtilmemiş.
  13. Sayfa Sayısı: Belirtilmemiş.

Özet

Modern web siteleri durumsuz düz HyperText Transfer Protocol (HTTP) üzerinde çalışır; bu nedenle, kullanıcının web sunucusuyla etkileşimi, web sunucusunda durumu korumak için verimli ve güvenli bir kullanıcı oturum durumu mekanizması gerektirir. Bir kullanıcının durumunu korumak için iki yaygın yaklaşım, sunucuda bulunan geleneksel oturum ve yalnızca tarayıcıda bulunan ve bir imzayla doğrulanan daha yeni JSON Web Token'dır (JWT). Buradaki büyük soru şudur: hangisi daha güvenlidir ve hangisinin kaynak kullanımı daha iyidir? Bu soruyu cevaplamak için yerel bir ortamda iki Node.js uygulaması oluşturuldu. Güvenliği test etmek için, OWASP ZAP'ın proxy'si aracılığıyla uygulamalara Postman kullanılarak bir kullanıcı isteği gönderildi. ZAP taramalarını çalıştırdığında, oturum tabanlı ve JWT tabanlı web kimlik doğrulama sistemleri için sırasıyla yaklaşık 42 ve 44 olmak üzere 6 farklı uyarı türü bildirdi. Kullanıcı isteklerini değiştirmek için Burp Suite ile manuel bir kontrol kullanıldı. connect.sid çerezini rastgele bir şeye dönüştürmek 401 hatası verdi. Aynı şey JWT belirteci için de geçerlidir; JWT tabanlı sunucu 401 hatasıyla yanıt verdi. Bu, sunucu tarafı depolamanın geçersiz bir çerez algılayabileceğini, ancak belirtecin onu çözmek isteyen herkes tarafından görüntülenebileceğini gösterir. Performans, her sunucuya istek gönderen 1000 kullanıcının simüle edildiği JMeter kullanılarak ölçüldü. JWT sürümü ortalama yaklaşık 279 milisaniyede (ms) yanıt verirken, oturum sürümü 7870 milisaniyede (ms) yanıt verdi. Verim, her sunucu uygulaması için saniyede yaklaşık 3,39 istekle farklı bir model izledi. Sistem istatistikleri, JWT'nin biraz daha az CPU (0,127% - 0,128%) ve biraz daha az bellek (59,3 MB - 76,1 MB) kullandığını gösterdi. Bu bilgiler, oturumların sunucu üzerinde sıkı bir kontrol sağladığını ve bazı saldırıları önlemeye yardımcı olabileceğini, ancak aynı zamanda hafif bir gecikmeye de neden olduğunu vurgular. JWT'ler hızlı çalışır, ancak sırrı korumak için güçlü bir gizli yönetim gerektirirler.

Özet (Çeviri)

Modern web sites, they run on plain HyperText Transfer Protocol (HTTP). That meanseach click is its own thing, no memory of who you are, hence the user interaction with the webserver needs an efficient and secure user session state mechanism to maintain state on the webserver. Two common approaches are to achieve maintained user-state: the traditional session that lives on the server and the newer JSON Web Token, or JWT, that lives only in the browser and gets checked by a signature. The big question here is: which one is more secure, and which one has better resource utilization? To answer this, two Node.js apps were built on a laptop in a local environment running macOS. One app listened on http://localhost:3000 and used expresssession web framework along with Redis, an in-memory database. The other sat on http://localhost:3001 and used jsonwebtoken library with an HS256 signing algorithm that uses the secret thesissecret123. Both apps had the same four pages: register, login, protected, and logout. To test security, user request was sent using Postman to the apps through OWASP ZAPs proxy (127.0.0.1:8080). The proxy recorded everything. When ZAP ran its scans it reported 6 different alert types, about 42 and 44 for session-based and JWTbased web authentication systems respectively.A manual check with Burp Suitewas used to manipulate the user requests. Tempering the connect.sid cookie to something random gave a 401 error. Same with JWT token (base64 encoding), the JWT-based server responded with a 401 error. That tells the serverside storage can spot an invalid cookie, but the token can be peeked at by anyone who cares to decode it. Performance was measured with JMeter, simulating 1000 users sending requests to each server in total duration of 20 seconds. The JWT version answered in about 4279 milliseconds(ms) on average, while the session version took roughly 7870 milliseconds(ms). Throughput followed a different pattern: about 3.39 requests per second for each server app. Grafana graphs made the gap look clear. The system stats showed JWT using a little less CPU (0.127% vs 0.128%) and a bit less memory (59.3MB vs 76.1MB). These insights underscores that the sessions give you tight control on the server, which can stop some attacks, but they add a little lag. JWTs run fast, but it requires a robust secret management to guard the secret. The experiment was done on a single laptop, so realworld cloud servers might behave differently

Benzer Tezler

  1. Kurumsal yerel ağlarda açık kaynak tabanlı merkezi VoIP santral mimarisi ve performans değerlendirmesi

    Open source-based centralized VoIP switch architecture and performance evaluation in corporate local area networks

    EMRE KARAKUŞ

    Yüksek Lisans

    Türkçe

    Türkçe

    2026

    Sakarya Üniversitesi

    Bilişim Sistemleri Mühendisliği Ana Bilim Dalı

    Yükleniyor...

  2. Elektroensefalogram tabanlı biyometrik kimliklendirme sistemlerinde veri tipinin, frekanslarin ve kanal bölgelerinin etkilerinin incelenmesi

    Evaluation of the effects of data types, frequencies and channel regions on electroencephalogram based biometric identification systems

    TUBA SALTÜRK

    Doktora

    Türkçe

    Türkçe

    2025

    Yıldız Teknik Üniversitesi

    Elektronik ve Haberleşme Mühendisliği Ana Bilim Dalı

    Yükleniyor...

  3. Yüksek başarımlı ve merkeziyetsiz hesaplama sistemlerinde politika tabanlı yönetim

    Policy based management in high performance and decentralized computing systems

    TANER DURSUN

    Doktora

    Türkçe

    Türkçe

    2023

    İstanbul Teknik Üniversitesi

    Bilgisayar Mühendisliği Ana Bilim Dalı

    Yükleniyor...

  4. Effects of data duration, model size and session variability on speaker verification performance

    Veri süresi, model büyüklüğü ve oturum değişkenliğinin konuşmacı doğrulama başarımına etkisi

    ERİNÇ DİKİCİ

    Yüksek Lisans

    İngilizce

    İngilizce

    2009

    Boğaziçi Üniversitesi

    Elektrik ve Elektronik Mühendisliği Bölümü

    Yükleniyor...

  5. The success behind renewable energy: A comparative analysis of Germany, The United Kingdom, Brazil and Turkey

    Yenilenebilir enerjinin arkasındaki başarı nedenleri: Almanya, Büyük Britanya, Brezilya ve Türkiye'nin karşılaştırmalı bir analizi

    CANTAY ÇALIŞKAN

    Yüksek Lisans

    İngilizce

    İngilizce

    2013

    Koç Üniversitesi

    Uluslararası İlişkiler Ana Bilim Dalı

    Yükleniyor...