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

    提供:Tsubopedia
    編集の要約なし
    4行目: 4行目:
    [[Tsubopedia:Tsubopedia|Tsubopedia]]
    [[Tsubopedia:Tsubopedia|Tsubopedia]]
    *LocalSettings.php
    *LocalSettings.php
    <code lang="php">
    <syntaxhighlight lang="php">
    ::$wgLDAPSearchStrings = array( 'APAC' => "USER-NAME@apac" );
    $wgLDAPSearchStrings = array( 'APAC' => "USER-NAME@apac" );
    ::$wgLDAPEncriptionType = array( 'APAC' => 'Clear' );
    $wgLDAPEncriptionType = array( 'APAC' => 'Clear' );
    </code>
    </syntaxhighlight>
    *LdapAuthentication.php
    *LdapAuthentication.php
    <code lang="php">
    <code lang="php">
    ::$bind->$this->bindAs( $this->getSerachString( $username ), $this->getPasswordHash( $password ));
    $bind->$this->bindAs( $this->getSerachString( $username ), $this->getPasswordHash( $password ));
    </code>
    </code>
    <BR>
    <BR>
    [[Tsubo'tcher]]
    [[Tsubo'tcher]]
    *ldap_auth/start.php
    *ldap_auth/start.php
    <code lang="php">
    <syntaxhighlight lang="php">
    ::$bind_dn = "$username@apac";
    $bind_dn = "$username@apac";
    ::$bind_pw = $password;
    $bind_pw = $password;
    </code>
    </syntaxhighlight>
    <BR>
    <BR>
    [[IOS:Shop Floor Management]]
    [[IOS:Shop Floor Management]]
    *classes/authenticator.class.php
    *classes/authenticator.class.php
    <code lang="php">
    <syntaxhighlight lang="php">
    ::$ldap_bind_dn = "$username@apac";
    $ldap_bind_dn = "$username@apac";
    ::$ldap_bind_pw = $password;
    $ldap_bind_pw = $password;
    </code>
    </syntaxhighlight>
    <BR>
    <BR>
    [[Zabbix]]
    [[Zabbix]]
    *include/classes/ldap/CLdap.php (Version 2.4.1の場合)
    *include/classes/ldap/CLdap.php (Version 2.4.1の場合)
    <code lang="php">
    <syntaxhighlight lang="php">
    ::'bind_dn' => '%{user}@apac',
    'bind_dn' => '%{user}@apac',
    ::'bind_password' => ' ',
    'bind_password' => ' ',
    ::'base_dn' => 'ou=a575,dc=apac,dc=corpdir,dc=net',
    'base_dn' => 'ou=a575,dc=apac,dc=corpdir,dc=net',
    ::'search_attribute' => 'sAMAccountName',
    'search_attribute' => 'sAMAccountName',
    </code>
    </syntaxhighlight>

    2015年10月2日 (金) 09:04時点における版

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

    実装例

    Tsubopedia

    • LocalSettings.php
    $wgLDAPSearchStrings = array( 'APAC' => "USER-NAME@apac" );
    $wgLDAPEncriptionType = array( 'APAC' => 'Clear' );
    
    • LdapAuthentication.php

    $bind->$this->bindAs( $this->getSerachString( $username ), $this->getPasswordHash( $password ));
    Tsubo'tcher

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


    IOS:Shop Floor Management

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


    Zabbix

    • include/classes/ldap/CLdap.php (Version 2.4.1の場合)
    'bind_dn' => '%{user}@apac',
    'bind_password' => ' ',
    'base_dn' => 'ou=a575,dc=apac,dc=corpdir,dc=net',
    'search_attribute' => 'sAMAccountName',