Notes/Domino 8.5.1 英文版将于10月12日发布。从版本号上看,本版应该是一个以 bug 修正为主的维护更新,但其实它带来的新特性完全可以看作是 8.6 之类的新版本。主要新特性如下:

Lotus Notes:

  • 与 Quick、 Protector 集成能力的增强

Lotus Notes Traveler

  • 增加对 Apple iPhone 的支持

Domino Designer

  • XPages 支持 Notes 客户端
  • XPage 性能和可伸缩性增强
  • XPage active content filtering(不知道干啥的)
  • Dojo 更新到 1.3.2 版(目前的最新版)
  • 改进了 XPages 中 Dojo 的应用
  • Designer 性能增强
  • 新的基于 LotusScript® and Java™ 编辑器(迟到的特性,本来是要在 8.5 推出的,现在终于来了)
  • Domino Designer 扩展 API
  • 用于构建 iWidgets 的新的设计元素
  • 复合应用支持 XPages
  • 提供 Notes User Interface 类的 Java API

除了以上新的特性,产品授权方式也发生了变化(好像价格也有变动),而开发工具变成了免费下载使用(听起来不错)。

请参考:IBM 8.5.1 Announcement Letter

代码如下:

_forward := "ANY_TEXT/" + @Implode(myorderedlist; "/");
REM {将list连接为字符串,并在最前面添加一级(由于第一级会被去掉)};
_reverse := @Name([ToKeyword]; _forward);
REM {反序然后在将字符串切割为list};
_reverselist := @Explode(_reverse; "");

关于@Name([ToKeyword]; name)的帮助文档:

[TOKEYWORD]
Reverses the order in which the naming components are displayed, and replaces slashes with backslashes: CountryOrganizationOrganization Unit… This is useful when you want to categorize a view by the components of a user’s hierarchical name (backslashes represent subcategories in views). The [TOKEYWORD] option does not return the Common Name portion of the user name.

参考链接:Reversing the order of a list in formula language

在注册完附加服务器后,进行服务器配置的时候,在最后一步出现”You are not authorized to use the server”错误。实际上就是附加服务器没有访问主服务器的权限,同时在主服务器控制台上也出现拒绝访问的消息。

最后查明原因为在服务器文档的安全标签下,”Access Server” 域勾选了”Users listed in all trusted directories”。此选项会只允许信任目录中的用户访问服务器,从而禁止了服务器间的访问。

IBM 的支持网站说可以先取消此复选框,服务器配置完成后,再重新勾上。不过按照我的理解和测试,这样还是会禁止服务器间的访问,应该还是不行的。不知道是不是我理解有误,欢迎大家指教。

相关链接:Server error: “You are not authorized to use the server” setting up a new server

在与 Domino 做 SSO 的时候,经常会使用 LTPA  的方式,本文描述了它的生成原理,通过它我们可以自己编码生成身份认证的 cookie,实现 SSO。

首先,这个 cookie 由以下部分组成:

  • LTPA token 版本(4字节)
  • 创建时间(8字节)
  • 过期时间(8字节)
  • 用户名(可变长度)
  • Domino LTPA 密钥(20字节)

接下来分别说明各部分的具体内容:

  • LTPA token 版本目前 Domino 只有一种值:0x0001 0x0123
  • 创建时间和过期时间为以十六进制方式表示的 Unix time,例如 2009-04-09 13:52:42 (GMT +8) = 1239256362 = 49DD8D2A。过期时间为 创建时间 + SSO 配置文档的过期时间(LTPA_TokenExpiration域)
  • 用户名为 Names 中用户文档的 FullName 域值
  • Domino LTPA 密钥通过 Base64编码后,保存在 SSO 配置文档的 LTPA_DominoSecret 域中

ltpa-01

在这里当然不能将密钥直接发送给浏览器,所以将上述部分合并起来(如上图),计算 SHA-1 校验和。

ltpa-02

然后用 SHA-1 校验和替换掉 Domino LTPA 密钥,最后再将内容通过 Base64 编码,形成最终的 cookie 发送给浏览器(如上图)。这样如果 cookie 中的任何内容被修改,校验和就不对了,达到了防篡改的效果。

参考资料:Creating a session for a userThe Domino cookie authenticationLTPAUtils

有时候我们需要获得一个群组中的成员列表,一般都是直接去 Names 查找,如果遇到嵌套群组则更加麻烦。其实有个简单的方法,通过如下的函数:

Syntax

@ExpandNameList(servername : notesdatabase ; groupname)

Parameters

    * servername

Text. Specify the target Domino Server for your query.

    * notesdatabase

Text. Specifiy the target NotesDatabase for your query.

    * groupname

Text. Specify the target Group, by name, for your query.

Return value

   * valuelist

Text list. A multi-value text list containing members of the queried Domino Directory Group. No value is returned for unmatched Groups. To display the return values in a dialog box using @Prompt, enclose this function in an @Text function.

Usage

@ExpandNameList cannot be used in form selection and view column formulas.

举例说明,以下公式就可以获取在 Domino/Server 服务器上 names.nsf 库中定义的 LocalDomainAdmins 群组的成员列表:

@ExpandNameList(“Domino/Server”:”names.nsf”; “LocalDomainAdmins”)

最后有一点需要说明的是,这个函数在文档中并没有注明,所以有可能会有不稳定、或者未来版本会不可用等可能性,大家请自行评估其中的风险。

参考链接:Undocument Command Documented: ExpandNameListUndocumented @functions in Notes/Domino