「匿名認証」の版間の差分

提供:Tsubopedia
 
(2人の利用者による、間の9版が非表示)
4行目: 4行目:
[[Tsubopedia:Tsubopedia|Tsubopedia]]
[[Tsubopedia:Tsubopedia|Tsubopedia]]
*LocalSettings.php
*LocalSettings.php
::$wgLDAPSearchStrings = array( 'APAC' => "USER-NAME@apac" );
<syntaxhighlight lang="php">
::$wgLDAPEncriptionType = array( 'APAC' => 'Clear' );
$wgLDAPSearchStrings = array( 'APAC' => "USER-NAME@apac" );
 
$wgLDAPEncriptionType = array( 'APAC' => 'Clear' );
*LdapAuthentication.php
</syntaxhighlight>
::$bind->$this->bindAs( $this->getSerachString( $username ), $this->getPasswordHash( $password ));
*LdapAuthenticationPlugin.php
 
<syntaxhighlight lang="php">
// This is an anonymous bind
$this->printDebug( "Doing an anonymous bind", NONSENSITIVE );
// $bind = $this->bindAs();  下のように書き換える
$bind=$this->bindAs( $this->getSerachString( $username ), $this->getPasswordHash( $password ) );
</syntaxhighlight>
<BR>
<BR>
[[Tsubo'tcher]]
[[Tsubo'tcher]]
*ldap_auth/start.php
*ldap_auth/start.php
::$bind_dn = "$username@apac";
<syntaxhighlight lang="php">
::$bind_pw = $password;
$bind_dn = "$username@apac";
 
$bind_pw = $password;
<BR>
</syntaxhighlight>
[[IOS:Shop Floor Management]]
*classes/authenticator.class.php
::$ldap_bind_dn = "$username@apac";
::$ldap_bind_pw = $password;
 
<BR>
<BR>
[[Zabbix]]
[[Zabbix]]
*include/classes/ldap/CLdap.php (Version 2.4.1の場合)
*include/classes/ldap/CLdap.php (Version 2.4.1の場合)
::'bind_dn' => '%{user}@apac',
<syntaxhighlight lang="php">
::'bind_password' => ' ',
'host' => 'ldap://192.168.38.128', //実際のサーバーアドレスを入力する。
::'base_dn' => 'ou=a575,dc=apac,dc=corpdir,dc=net',
'bind_dn' => '%{user}@apac', //@以降に実際のドメイン名を入力する。
::'search_attribute' => 'sAMAccountName',
'bind_password' => ' ', //空白
'base_dn' => 'ou=xxx,dc=apac,dc=corpdir,dc=net', //実際のdnを入力する。
'search_attribute' => 'sAMAccountName', //ADの場合
 
46行目の以下のコードをコメントアウトする。設定画面で入力した値で上書きされるのを防ぐため。
// $this->cnf = zbx_array_merge($this->cnf, $arg);
</syntaxhighlight>
<br>
dotProject
*classes/authenticator.class.php
<syntaxhighlight lang="php">
$ldap_bind_dn = "$username@apac";
$ldap_bind_pw = $password;
</syntaxhighlight>

2018年7月6日 (金) 01:09時点における最新版

匿名認証とは、LDAPの認証(BIND)のうち特定のDNを指定せずに認証要求すること。ActiveDirectory(AD)は既定では匿名認証を許可していない。そのためADをLDAPの認証ディレクトリとして使用する場合、認証要求されたユーザー識別子が存在するかディレクトリを検索するためには、読取アクセスのみ許可された検索IDを使用するか、認証要求されたユーザー識別子とパスワードそのものを用いて検索を実施する必要がある。

実装例

Tsubopedia

  • LocalSettings.php
$wgLDAPSearchStrings = array( 'APAC' => "USER-NAME@apac" );
$wgLDAPEncriptionType = array( 'APAC' => 'Clear' );
  • LdapAuthenticationPlugin.php
// This is an anonymous bind
$this->printDebug( "Doing an anonymous bind", NONSENSITIVE );
// $bind = $this->bindAs();  下のように書き換える
$bind=$this->bindAs( $this->getSerachString( $username ), $this->getPasswordHash( $password ) );


Tsubo'tcher

  • ldap_auth/start.php
$bind_dn = "$username@apac";
$bind_pw = $password;


Zabbix

  • include/classes/ldap/CLdap.php (Version 2.4.1の場合)
'host' => 'ldap://192.168.38.128', //実際のサーバーアドレスを入力する。
'bind_dn' => '%{user}@apac', //@以降に実際のドメイン名を入力する。
'bind_password' => ' ', //空白
'base_dn' => 'ou=xxx,dc=apac,dc=corpdir,dc=net', //実際のdnを入力する。
'search_attribute' => 'sAMAccountName', //ADの場合

46行目の以下のコードをコメントアウトする。設定画面で入力した値で上書きされるのを防ぐため。
// $this->cnf = zbx_array_merge($this->cnf, $arg);


dotProject

  • classes/authenticator.class.php
$ldap_bind_dn = "$username@apac";
$ldap_bind_pw = $password;