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?

More than 1 year has passed since last update.

FreeRadius で使用する証明書についてのメモ

Posted at

FreeRadius には、EAP などで使用する SSL/TLS 証明書の簡単に作成できるように、専用の証明書作成テンプレが用意されています。例えば debian の freeradius の場合、/etc/freeradius/3.0/certs がそうです。

このディレクトリにある *.cnf ファイルを編集し、make を実行すると自己証明書一式と、pkcs12 形式のファイルなどが生成されます。

ca.cnf ・・・CA 証明書用の設定ファイル
server.cnf ・・・サーバ証明書用の設定ファイル
client.cnf ・・・クライアント証明書の設定ファイル

ここでうっかり見落としがちなのが、xpextensions というファイルです。Makefile を見ると分かりますが、サーバ証明書やクライアント証明書を作成する際に、拡張ファイルとして指定されていて、設定が必要なファイルであることが分かります。

このファイルでは、xpclient_ext、xpserver_ext セクションの項目が定義されています。

xpclient_ext セクション

クライアント証明書用のセクションです。

extendedKeyUsage = 1.3.6.1.5.5.7.3.2

この 「1.3.6.1.5.5.7.3.2」という OID は「clientAuth」として定義されており、この証明書がクライアント証明書であることを拡張設定に組み込みます。

crlDistributionPoints = URI:http://172.30.228.127/ca.crl

crlDistributionPoints は、リボークリストの URI を証明書に埋め込むことができます。

xpserver_ext セクション

サーバ証明書のセクションです。

extendedKeyUsage = 1.3.6.1.5.5.7.3.1

この 「1.3.6.1.5.5.7.3.1」という OID は「serverAuth」として定義されており、この証明書がサーバ証明書であることを拡張設定に組み込みます。

crlDistributionPoints = URI:http://172.30.228.127/ca.crl

crlDistributionPoints は、リボークリストの URI を証明書に埋め込むことができます。

certificatePolicies = 1.3.6.1.4.1.40808.1.3.2

certificatePolicies で証明書のポリシーを設定出来ます。

引数は2種類あり、「Trust Override Disabled - STRICT」、「Trust Override Disabled - TOFU」が指定できます。

「Trust Override Disabled --STRICT」を指定すると、クライアントデバイスで、システムが用意する証明書以外は受け付けなくなります。

「Trust Override Disabled - TOFU」を指定すると、クライアントデバイスが接続しようとしたときに、初回、ユーザ側に FreeRadius で作成した証明書をインストールするかどうかの確認をしてくれるようになります。こちらがデフォルトになっています。

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?