ApacheDS 中的自定义分区

发布于 2024-12-21 09:46:58 字数 1495 浏览 1 评论 0原文

我正在使用 ApacheDS 版本 2.0.0-M3 (我不太熟悉它是如何工作的)。我创建了一个新的分区类,扩展了 AbstractPartition。我能够创建此类的实例,并将其添加到 ApacheDsService 实例中。

    File instancePath = new File( param[0] );
    ApacheDsService service = new ApacheDsService();
    InstanceLayout layout = new InstanceLayout( instancePath );

    try
    {
        service.start(layout);
        //
        TestPartition partition = new TestPartition ( layout );
        partition.setSuffix( "ou=test" );
        partition.setSchemaManager( service.getDirectoryService().getSchemaManager() );
        partition.initialize();
        service.getDirectoryService().addPartition( partition );
    }
    catch (Exception x)
    {
        LOG.error("Failed to start the service.", x);
        System.exit(1);
    }

但是,当我使用 Apache Directory Studio 连接到我的服务器时,我看不到我的分区。

我发现这个问题: 如何使用 JNDI/LDAP 以编程方式在 ApacheDS 服务器的根目录中创建分区? 其中 kayyagari 表示有必要“在 ou=config 区域中配置分区...”。

我不确定这到底是什么意思,也没有在网上搜索详细信息。

我可以在 Apache Directory Studio 中看到 ou=config 分区。我可以在那里看到其他分区:ads-partitionId=system 和 ads-partitionId=example。查看 objectClass 属性,我可以看到它们都有一个值为 ads-jdbmPartition。我不确定我的分区是否应该有这样的条目(因为它不是 jdbm 分区,而是从 Web 服务获取其数据)。

(不幸的是,ApacheDS 站点上 2.0.0-M3 的文档链接给出了 404。)我的自定义分区的 LDIF 条目应该是什么样子?我无法正确输入,也不知道是否遗漏了某些内容,或者输入了错误的内容。

任何帮助将不胜感激。

谢谢。

I am using ApacheDS version 2.0.0-M3 (I not very familiar with how this works). I have created a new partition class, extending AbstractPartition. I am able to create an instance of this class, and add it to an ApacheDsService instance.

    File instancePath = new File( param[0] );
    ApacheDsService service = new ApacheDsService();
    InstanceLayout layout = new InstanceLayout( instancePath );

    try
    {
        service.start(layout);
        //
        TestPartition partition = new TestPartition ( layout );
        partition.setSuffix( "ou=test" );
        partition.setSchemaManager( service.getDirectoryService().getSchemaManager() );
        partition.initialize();
        service.getDirectoryService().addPartition( partition );
    }
    catch (Exception x)
    {
        LOG.error("Failed to start the service.", x);
        System.exit(1);
    }

However, when I connect to my server with Apache Directory Studio, I cannot see my partition.

I found this question:
How to create a partition in the root in ApacheDS server programmatically using JNDI/LDAP?
where kayyagari says that it is necessary to "configure the partition ... in the ou=config area".

I am unsure exactly what is meant by this, and have not had much luck searching the web for details.

I can see the ou=config partition in Apache Directory Studio. I can see other partitions there: ads-partitionId=system and ads-partitionId=example. Looking at the objectClass attributes, I can see that these both have one with the value ads-jdbmPartition. I am unsure whether my partition should have such an entry (as it is not a jdbm partition, but gets its data from a web service).

(Unfortunately, the documentation link for 2.0.0-M3 on the ApacheDS site gives a 404.) How should the LDIF entry for my custom partition look? I cannot get it right, and do not know if I am missing something, or if I have entered something incorrectly.

Any help would be appreciated.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回梦 2024-12-28 09:46:58

ApacheDS 版本 2.0.0-M3(和 2.0.0-M4)似乎正在开发中。根据ApacheDS存储库版本2.0.0-M3还没有看到任何自 2011 年 8 月以来的活动。2011 年 8 月,提出了缺少文档的问题(请参阅:网站中的链接已损坏(ApacheDS 2.0 页面上的“基本用户指南”))。

从存储库中您还可以看到版本 2.0.0-M4 目前正在开发中(最近有活动)。有一些关于 2.0.0-M3 的文档。 2.0.0M3 Maven 生成的文档 是可用的。还可以下载 2.0。 0-M3 源代码,其中包含许多单元测试,您可以使用它们来破译正确的方法 - 源代码可从 Emmanuel Lécharny 个人页面(但似乎不在 ApacheDS 网站本身上)。 Emmanuel Lécharny 似乎是 2.0.0-M3 版本的主要提交者(Kiran Ayyagari (kayyagari) 似乎也是ApacheDS 提交者)。

希望您现在拥有足够的信息,可以让您根据需要选择 2.0.0-M3/M4 路线。


由于缺乏 2.x 分支的文档,我认为使用 ApacheDS 1.5.7 版会容易得多(至少在 2.x 分支有文档记录之前)。 1.5.7 版本包括文档和工作示例,例如将 ApacheDS 嵌入到应用程序和 Web 应用程序中。

我已经尝试过 嵌入式服务器示例并能够使用 Apache Directory Studio 访问生成的目录服务器。有趣的是,对于嵌入示例示例,模块包含 shared-ldap-schema 文件被排除在类路径之外(我的猜测是,这是因为该示例是最小实现,而不是完全符合标准的 LDAP 服务器)。

ApacheDS version 2.0.0-M3 (and 2.0.0-M4) appear to be work in progress. According to the ApacheDS repository version 2.0.0-M3 has not seen any activity since August 2011. In August 2011 the issue with the missing documentation was raised (see: Broken link in web site ("Basic User's Guide" on ApacheDS 2.0 page)).

From the repository you can also see that version 2.0.0-M4 is being worked on currently (with very recent activity). There is some 2.0.0-M3 documentation about. The 2.0.0M3 Maven generated documentation is available. It is also possible to download the 2.0.0-M3 source code which contains numerous unit tests which you could use to decipher the correct approach - the source code is available from Emmanuel Lécharny personal page (but seemingly not on the ApacheDS site itself). Emmanuel Lécharny appears to be the main committer for version 2.0.0-M3 (and Kiran Ayyagari (kayyagari) also appears to be an ApacheDS committer).

Hopefully you now have enough information to allow you to pursue the 2.0.0-M3/M4 route if you so desire.


Owing to the lack of documentation for the 2.x branch, I think it would be MUCH easier for you to use ApacheDS version 1.5.7 (at least until the 2.x branch is documented). The 1.5.7 version includes documentation and working examples such as embedding ApacheDS into an application and into a web application.

I have tried the embedded server sample and was able to access the resulting directory server using the Apache Directory Studio. Interestingly with embedded-sample example the module containing the shared-ldap-schema files is excluded from the classpath (my guess is that this is because the example is minimal implementation and not a fully standards compliant LDAP server).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文