其实本质问题不是ldap难用,不是xiaq魔改schema,而是因为ldap没有一个好用的图形化/网页化界面。 使用数据库对外暴露LDAP协议,这个本质上就是简单粗暴,其他人接手时直接操作数据库,偷懒的话没有学习成本,不过这是个很不好的习惯。 层级关系还是很必须的,尤其涉及到一堆服务器权限。 本质上,后台数据不管是ldap还是数据库,对外提供ldap访问,需要开发的是一个专用的网页帐户维护系统。
> From: [email protected] > To: [email protected] > Subject: Re: [tuna-general] [讨论] 基础结构升级、Wiki 迁移 > Date: Mon, 27 Jun 2016 12:30:51 +0800 > > On Mon, Jun 27, 2016, at 12:22, Wang Kang wrote: > > > 于是问题转化为 key 分发。 > > > 而且,最基本的问题:一段时间之后,谁都忘了谁能登录哪台服务器了,难道我们要用 excel 管理? > > > > 用 LDAP 也一样会有这问题吧? > > 从权限分配上来说,每个学期初 revoke 一次应该就好了... > > > > 另外一方面,使用者如果连自己能登哪台服务器都不记得了的话.... > > 说明那台服务器也不需要登了... 学期初被 revoke 掉就好了 > > > > 此外,读写数据库和读写 excel 也没啥本质不同啊。 > > 写纸上想想看也不是不行>_< > > > > 毕竟这事不是每时每刻都需要自动化做的.. > > 总得有个权限的分配流程,得需要人的参与 > > > > 当然是 Web 上操作一下,把用户名加/减到一个节点里就好了呀… > 即使是现行的 LDAP 方案做这个也非常方便,而且xiaq魔改过的 LDAP 还能分发 key > > > > > LDAP 稳定性问题并不是问题,以前发生这个问题是因为当时的服务器登陆依赖了LDAP单点,当然容易挂了。 > > > > 新的方案怎样可以不依赖单点的 LDAP 呢? > > 这个刚才解释过了 > > > > > > 我想做的方案是,内容就放在数据库里,对外暴露一个 LDAP 协议接口。跟 OpenLDAP 已经没有任何关系了, > > > 运维=管理数据库。 > > > > 我理解。但是问题是,得想一个办法让这个新项目能被够持续维护。 > > 不然等你一毕业,新任管理员一想算了还是推倒再来一个 LDAP 吧 > > 不一样,OpenLDAP 的管理极其麻烦,说白了就是因为它的数据存储太不自然了。 > xiaqLDAP 难以维护的主要原因也就是 xiaq 魔改了 openLDAP 默认的存储结构,使得本身就难以维护的东西变得更加难以维护。 > > 换成数据库就简单多了,想存什么存什么,比如 key 分发,就直接加个 key 字段就好,因为数据库格式我们完全可控。 > openLDAP 就不一样了,数据的 schema 是有标准的,不能随便动…… 要动的话,就有一套极其麻烦的 schema 定义格式…… > > 我举个例子, > 数据库里可能存储的一行就是 username, uid, gid, home > 当 LDAP 访问的时候,返回结果按照 LDAP 格式 uid: bigeagle 这样的返回就可以了。 > 我们只需要暴露 LDAP 只读接口,我昨晚看了下,用 go 写 100 行代码就能搞定,js 能更少。 > > > > > > > > 因为你折腾的那个是 xiaqLDAP ,比一般的 LDAP 还要再复杂一些…… > > > > 不是这个,是 Alpine 里的 OpenLDAP 啦。 > > > > -- > > > > --- > > You received this message because you are subscribed to the Google Groups > > "TUNA 主邮件列表" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To post to this group, send email to [email protected]. > > For more options, visit https://groups.google.com/d/optout. > > -- > > --- > You received this message because you are subscribed to the Google Groups > "TUNA 主邮件列表" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- --- You received this message because you are subscribed to the Google Groups "TUNA 主邮件列表" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
