dポイントプレゼントキャンペーン実施中!

お世話になります。

現在COMODO社から提供されましたクライアント証明書


証明書の有無によるアクセス制限は問題なく行えていうます。
(クライアント側が証明書を提示しなければ接続できない)

ただ、この証明書のサブジェクト欄にある[CN],[O]などの
項目をもとに、更なる制限をかけたいのですが、やり方がわからなく困っています。
もしお分かりになる方がいらっしゃったらご教授願えませんでしょうか?
※例えば クライアント証明書のサブジェクト欄に
 [O] = [tama] という設定があったら接続許可、そうでない場合は拒否

設定方法はssl.conf内のSSLRequire箇所の設定だと推測されるのですが、、、
どのように設定すればいいかわからず困っています。

現在のssl.confのClient認証に関する箇所は以下のようになっています。


--------------------------------------------------

# Client Authentication (Type):
# Client certificate verification type and depth. Types are
# none, optional, require and optional_no_ca. Depth is a
# number which specifies how deeply to verify the certificate
# issuer chain before deciding the certificate is not valid.
SSLVerifyClient require      ←クライアント証明書の所持を求める設定
SSLVerifyDepth 3
#SSLVerifyDepth 1

SSLCACertificateFile /etc/httpd/conf/ssl.crt/AAACertificateServices.crt ←クライアントrootCA
#SSLCACertificateFile /etc/httpd/conf/ssl.crt/root.pem
#SSLCARevocationFile /etc/httpd/conf/ssl.crl/crl.pem

#<Location /secure/area>
#SSLVerifyClient require
#SSLVerifyDepth 1

#</Location>

# Access Control:
# With SSLRequire you can do per-directory access control based
# on arbitrary complex boolean expressions containing server
# variable checks and other lookup directives. The syntax is a
# mixture between C and Perl. See the mod_ssl documentation
# for more details.
#<Location />
#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ ←ここの設定をするのでしょうか?
# <Directory "/var/www/cgi-bin">
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#</Location>

# SSL Engine Options:
# Set various options for the SSL engine.
# o FakeBasicAuth:
# Translate the client X.509 into a Basic Authorisation. This means that
# the standard Auth/DBMAuth methods can be used for access control. The
# user name is the `one line' version of the client's X.509 certificate.
# Note that no password is obtained from the user. Every entry in the user
# file needs this password: `xxj31ZMTZzkVA'.
# o ExportCertData:
# This exports two additional environment variables: SSL_CLIENT_CERT and
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
# server (always existing) and the client (only existing when client
# authentication is used). This can be used to import the certificates
# into CGI scripts.
# o StdEnvVars:
# This exports the standard SSL/TLS related `SSL_*' environment variables.
# Per default this exportation is switched off for performance reasons,
# because the extraction step is an expensive operation and is usually
# useless for serving static content. So one usually enables the
# exportation for CGI and SSI requests only.
# o StrictRequire:
# This denies access when "SSLRequireSSL" or "SSLRequire" applied even
# under a "Satisfy any" situation, i.e. when it applies access is denied
# and no other module can change it.
# o OptRenegotiate:
# This enables optimized SSL connection renegotiation handling when SSL
# directives are used in per-directory context.
#SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>

A 回答 (1件)

http://detail.chiebukuro.yahoo.co.jp/qa/question …

インターネットの世界は広いようで狭い…
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!