modaccesstoken


Secure downloading module for Apache2

mod_access_token provides access token based secure downloading.

Your web application generates a download URI with signed query_string parameters. mod_access_token will check signature, and limit the request by specifying an expiration time.


mod_access_token はアクセストークンに基づいたアクセス制御を行ない、 有効期限を指定した一時的なダウンロードを許可します。

アクセス制御を行なうためには以下のような URL を Web アプリケーションで生成します。

http://example.com/protected/example.jpg?AccessKey=<AccessKey>&Expires=<Expires>&Signature=<Signature>

  • AccessKey: httpd.conf 中であらかじめ設定しておいた AccessKey
  • Expires: 有効期限 UNIX エポックからの秒数
  • Signature: リクエストを認証する HMAC-SHA1 値を Base64 エンコードしたもの

Signature は以下の手順で生成します。

PlainText = <METHOD> + <URI> + <EXPIRES> + <ACCESS_KEY> Signature = Base64(HMAC_SHA1(PlainText, Secret))

Project Information

Labels:
apache apache2 module