Giter VIP home page Giter VIP logo

Comments (5)

mylxsw avatar mylxsw commented on June 2, 2024

这两个一般不需要配置哈,留空就行。

下面的是用微软 ActiveDirectory 的配置方式,仅供参考

WIZARD_USE_LDAP=true
LDAP_LOGGING=true
LDAP_ACCOUNT_PREFIX=
LDAP_ACCOUNT_SUFFIX=
LDAP_HOSTS=192.168.1.199
LDAP_PORT=389
LDAP_BASE_DN=dc=example,dc=com
LDAP_USERNAME=[email protected]
LDAP_PASSWORD=xxxxxxxx
LDAP_USE_SSL=false
LDAP_USE_TLS=false
LDAP_PASSWORD_SYNC=true
LDAP_LOGIN_FALLBACK=false
LDAP_SYNC_NAME_ATTR=displayname

如果是 OpenLDAP 的话,参考下 这里。另外,可以分别试下加邮箱后缀和不加登录看看能否成功,如 [email protected] 和 xxx 。

另外也可以参考下这两个问题 #62 #105

from wizard.

muziyou-cn avatar muziyou-cn commented on June 2, 2024

这两个一般不需要配置哈,留空就行。

下面的是用微软 ActiveDirectory 的配置方式,仅供参考

WIZARD_USE_LDAP=true
LDAP_LOGGING=true
LDAP_ACCOUNT_PREFIX=
LDAP_ACCOUNT_SUFFIX=
LDAP_HOSTS=192.168.1.199
LDAP_PORT=389
LDAP_BASE_DN=dc=example,dc=com
[email protected]
LDAP_PASSWORD=xxxxxxxx
LDAP_USE_SSL=false
LDAP_USE_TLS=false
LDAP_PASSWORD_SYNC=true
LDAP_LOGIN_FALLBACK=false
LDAP_SYNC_NAME_ATTR=displayname

如果是 OpenLDAP 的话,参考下 这里。另外,可以分别试下加邮箱后缀和不加登录看看能否成功,如 [email protected] 和 xxx 。

另外也可以参考下这两个问题 #62 #105

您提到的issue,我都看过并参考了,也尝试留空了。
邮箱后缀账号,已存在的可以登录。
不带任何后缀登录,日志中没有报错,仅是页面提示“账号信息不合法”,确认ldap账号是可用的。

以下是配置:

ldap_auth.php :

'scopes' => [
//env('LDAP_SCOPES_CLASS', 'Adldap\Laravel\Scopes\UidScope'),
//\App\Components\Ldap\MemberOfScope::class,
Adldap\Laravel\Scopes\UidScope::class,
],

'ldap' => [
'locate_users_by' => 'sAMAccountName',
'bind_users_by' => 'sAMAccountName',
],

'sync_attributes' => [
'email' => 'mail',
'name' => env('LDAP_SYNC_NAME_ATTR', 'cn'),
],

ENV:
WIZARD_USE_LDAP: true
LDAP_SCHEMA: 'Adldap\Schemas\OpenLDAP'
LDAP_LOGGING: true
LDAP_ACCOUNT_PREFIX:
LDAP_ACCOUNT_SUFFIX:
LDAP_HOSTS: xxx.xxx.xxx.xxx
LDAP_PORT: 389
LDAP_BASE_DN: 'OU=bbb,DC=aaa,DC=com'
LDAP_USERNAME: 'CN=ad用户,OU=xxx,OU=xxx,OU=xxx,OU=xxx,DC=xxx,DC=xxx'
LDAP_PASSWORD: 'xxx'
LDAP_USE_SSL: false
LDAP_USE_TLS: false
LDAP_PASSWORD_SYNC: true
LDAP_LOGIN_FALLBACK: true
LDAP_SYNC_NAME_ATTR: sAMAccountName
WIZARD_LDAP_ONLY_MEMBER_OF:

具体登录用户:CN=XXX123456,OU=Users,OU=ccc,OU=bbb,DC=aaa,DC=com, 其中sAMAccountName=123456

wizard 版本: 1.3.1
docker方式,使用docker-compose启动。

请帮忙看看,谢谢!

from wizard.

mylxsw avatar mylxsw commented on June 2, 2024

下午花时间确认了下,目前只支持使用 邮箱后缀账号 登录哈,所以登录时必须使用完整的邮箱账号。

from wizard.

muziyou-cn avatar muziyou-cn commented on June 2, 2024

下午花时间确认了下,目前只支持使用 邮箱后缀账号 登录哈,所以登录时必须使用完整的邮箱账号。

感谢您的回复。openldap,我稍后继续尝试添加后缀接入。

另外,经过调试ActiveDirectory能正常接入,请问关于WIZARD_LDAP_ONLY_MEMBER_OF的格式是什么?

WIZARD_LDAP_ONLY_MEMBER_OF: '(company=研发部)'

从日志看是这样的,(memberof:1.2.840.113556.1.4.1941:=(company=研发部))。 我希望能使用属性company=xxx进行过滤,请问在哪里可以设置?

from wizard.

mylxsw avatar mylxsw commented on June 2, 2024

WIZARD_LDAP_ONLY_MEMBER_OF 是这样设置的,比如只允许 tp 组下的用户可以登录(我们这里的 tp 组是在 Users 目录下创建的)

WIZARD_LDAP_ONLY_MEMBER_OF=CN=tp,CN=Users,DC=example,DC=com

from wizard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.