0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Session】IAAAとSession Managementの関係

0
Posted at

はじめに

〜Webアプリのセキュリティ基盤を支える4原則〜

Webアプリのセキュリティを設計する際に、避けて通れない概念が IAAA(Identification, Authentication, Authorization, Accounting)と Session Management(セッション管理) です。
この2つを理解していないと、たとえフレームワークが便利でも、セキュリティホールは必ず生まれます。

今回はこの2つの仕組みを「理論 × 実装 × 防御策」の視点からわかりやすく整理します。


IAAAとは?

IAAAは、アクセス制御の基礎を構成する4つの要素の頭文字です。

要素 日本語訳 説明
Identification(識別) 「あなたは誰?」を識別する ユーザーIDやメールアドレスなど
Authentication(認証) 「本当に本人?」を確認する パスワード、トークン、指紋など
Authorization(認可) 「何ができる?」を制御する ロールや権限による制御
Accounting(記録) 「何をした?」を記録する ログ・監査の保存

IAAAの流れ


Session Managementとは?

HTTPは「ステートレス」なプロトコル、つまりリクエストごとに状態を保持しないため、
「誰がログイン中なのか」を識別する仕組みが必要です。
その役割を担うのが Session Management(セッション管理) です。

一般的な仕組み

セッションの構成要素

要素 説明
Session ID ユーザー識別用のランダムなトークン。Cookieに保存される。
Cookie属性 Secure(HTTPS専用)・HttpOnly(JSアクセス禁止)で保護。
Session Store Redis・DBなどでセッション情報をサーバー側に保存。
Timeout アイドル状態が一定時間続くとセッションを自動失効。

IAAA × Session Management の関係

段階 目的 実装例
Identification ID入力 request.form['user']
Authentication 認証 DB照合やJWT検証
Authorization 権限確認 @role_required('admin')
Accounting 監査記録 操作ログやアクセスログ
Session Management 状態維持 Cookie+Session Store

つまり、IAAAが設計理念、Session Managementがその実装基盤です。


まとめ

  • IAAAは「セキュリティの四本柱」:識別・認証・認可・記録。
  • Session Managementは「ログイン状態を保つ技術的仕組み」。
  • 両者を組み合わせることで、安全で一貫性のあるアクセス制御を実現できる。
  • セッション攻撃対策(HttpOnly, Secure, Timeout設定)は必須。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?