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

    提供:Tsubopedia
     
    (2人の利用者による、間の6版が非表示)
    8行目: 8行目:
    $wgLDAPEncriptionType = array( 'APAC' => 'Clear' );
    $wgLDAPEncriptionType = array( 'APAC' => 'Clear' );
    </syntaxhighlight>
    </syntaxhighlight>
    *LdapAuthentication.php
    *LdapAuthenticationPlugin.php
    <syntaxhighlight lang="php">
    <syntaxhighlight lang="php">
    $bind->$this->bindAs( $this->getSerachString( $username ), $this->getPasswordHash( $password ));
    // 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>
    </syntaxhighlight>
    <BR>
    <BR>
    20行目: 23行目:
    </syntaxhighlight>
    </syntaxhighlight>
    <BR>
    <BR>
    [[IOS:Shop Floor Management]]
    [[Zabbix]]
    *include/classes/ldap/CLdap.php (Version 2.4.1の場合)
    <syntaxhighlight lang="php">
    '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);
    </syntaxhighlight>
    <br>
    dotProject
    *classes/authenticator.class.php
    *classes/authenticator.class.php
    <syntaxhighlight lang="php">
    <syntaxhighlight lang="php">
    $ldap_bind_dn = "$username@apac";
    $ldap_bind_dn = "$username@apac";
    $ldap_bind_pw = $password;
    $ldap_bind_pw = $password;
    </syntaxhighlight>
    <BR>
    [[Zabbix]]
    *include/classes/ldap/CLdap.php (Version 2.4.1の場合)
    <syntaxhighlight lang="php">
    'bind_dn' => '%{user}@apac',
    'bind_password' => ' ',
    'base_dn' => 'ou=a575,dc=apac,dc=corpdir,dc=net',
    'search_attribute' => 'sAMAccountName',
    </syntaxhighlight>
    </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;