您可以添加工作区安全到现有的工作区木兰?

问题描述 投票:1回答:1

我们有一个木兰CMS 5.5安装与PostgreSQLPersistence经理。我正在调查,其中按照预期的安全配置没有工作的情况下。我发现,我们的工作区/库的配置在这些三线丢失:

<WorkspaceSecurity>
  <AccessControlProvider class="info.magnolia.cms.core.MagnoliaAccessProvider" />
</WorkspaceSecurity>

有没有一种方法来重建现有的工作区,包括这个配置还是有只导出并重新导入数据到一个新的安装(这是在我们的情况下,将需要很长的)可能性大吗?

编辑:它的工作对我的本地系统,当我用下面的回购conf.xml中:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.5//EN"
 "http://jackrabbit.apache.org/dtd/repository-1.5.dtd">
<Repository>
  <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
    <param name="path" value="${rep.home}/repository" />
  </FileSystem>
  <Security appName="magnolia">
    <SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager"/>
    <AccessManager class="org.apache.jackrabbit.core.security.DefaultAccessManager">
    </AccessManager>
    <!-- login module defined here is used by the repo to authenticate every request. not by the webapp to authenticate user against the webapp context (this one has to be passed before thing here gets invoked -->
    <LoginModule class="info.magnolia.jaas.sp.jcr.JackrabbitAuthenticationModule">
    </LoginModule>
  </Security>
  <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
    <param name="path" value="${rep.home}/repository/datastore"/>
    <param name="minRecordLength" value="1024"/>
  </DataStore>
  <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" />
  <Workspace name="default">
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
      <param name="path" value="${wsp.home}/default" />
    </FileSystem>
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
      <param name="driver" value="org.postgresql.Driver"/>
      <param name="url" value="jdbc:postgresql://xxxxx" />
      <param name="databaseType" value="postgresql" /><!-- warning, this is not the schema name, it's the db type -->
      <param name="user" value="xxxxx" />
      <param name="password" value="xxxxxx" />
      <param name="schemaObjectPrefix" value="${wsp.name}_" />
      <param name="externalBLOBs" value="false" />
    </PersistenceManager>
    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
      <param name="path" value="${wsp.home}/index" />
      <param name="useCompoundFile" value="true" />
      <param name="minMergeDocs" value="100" />
      <param name="volatileIdleTime" value="3" />
      <param name="maxMergeDocs" value="100000" />
      <param name="mergeFactor" value="10" />
      <param name="maxFieldLength" value="10000" />
      <param name="bufferSize" value="10" />
      <param name="cacheSize" value="1000" />
      <param name="forceConsistencyCheck" value="false" />
      <param name="autoRepair" value="true" />
      <param name="analyzer" value="org.apache.lucene.analysis.standard.StandardAnalyzer" />
      <param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl" />
      <param name="respectDocumentOrder" value="true" />
      <param name="resultFetchSize" value="2147483647" />
      <param name="extractorPoolSize" value="3" />
      <param name="extractorTimeout" value="100" />
      <param name="extractorBackLogSize" value="100" />
      <!-- needed to highlight the searched term -->
      <param name="supportHighlighting" value="true"/>
      <!-- custom provider for getting an HTML excerpt in a query result with rep:excerpt() -->
      <param name="excerptProviderClass" value="info.magnolia.jackrabbit.lucene.SearchHTMLExcerpt"/>
    </SearchIndex>
    <WorkspaceSecurity>
      <AccessControlProvider class="info.magnolia.cms.core.MagnoliaAccessProvider" />
    </WorkspaceSecurity>
  </Workspace>
  <Versioning rootPath="${rep.home}/version">
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
      <param name="path" value="${rep.home}/workspaces/version" />
    </FileSystem>
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
      <param name="driver" value="org.postgresql.Driver"/>
      <param name="url" value="jdbc:postgresql://xxxxxx" />
      <param name="schema" value="postgresql" /><!-- warning, this is not the schema name, it's the db type -->
      <param name="user" value="xxxxxxxx" />
      <param name="password" value="xxxxxxxx" />
      <param name="schemaObjectPrefix" value="version_" />
      <param name="externalBLOBs" value="false" />
    </PersistenceManager>
  </Versioning>
</Repository>

这里删除/添加WorkspaceSecurity作品。但是,在相关系统上,我们有另一个config其中加入WorkspaceSecurity不工作:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.5//EN"
 "http://jackrabbit.apache.org/dtd/repository-1.5.dtd">
<Repository>
  <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
    <param name="path" value="${rep.home}/repository" />
  </FileSystem>
  <Security appName="Jackrabbit">
    <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"></AccessManager>
    <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
      <param name="yyyyyyy" value="yyyyyyy" />
    </LoginModule>
  </Security>
  <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
    <param name="path" value="${rep.home}/repository/datastore"/>
    <param name="minRecordLength" value="1024"/>
  </DataStore>
  <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" />
  <Workspace name="default">
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
      <param name="path" value="${wsp.home}/default" />
    </FileSystem>
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
      <param name="driver" value="org.postgresql.Driver"/>
      <param name="url" value="jdbc:postgresql://xxxxxxx" />
      <param name="schema" value="postgresql" /><!-- warning, this is not the schema name, it's the db type -->
      <param name="user" value="xxxxxxxx" />
      <param name="password" value="xxxxxxxx" />
      <param name="schemaObjectPrefix" value="${wsp.name}_" />
      <param name="externalBLOBs" value="false" />
    </PersistenceManager>
    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
      <param name="path" value="${wsp.home}/index" />
      <param name="useCompoundFile" value="true" />
      <param name="minMergeDocs" value="100" />
      <param name="volatileIdleTime" value="3" />
      <param name="maxMergeDocs" value="100000" />
      <param name="mergeFactor" value="10" />
      <param name="maxFieldLength" value="10000" />
      <param name="autoRepair" value="true" />
      <param name="analyzer" value="org.apache.lucene.analysis.standard.StandardAnalyzer" />
      <param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl" />
      <param name="respectDocumentOrder" value="true" />
      <param name="resultFetchSize" value="2147483647" />
      <param name="extractorPoolSize" value="3" />
      <param name="extractorTimeout" value="100" />
      <param name="extractorBackLogSize" value="100" />
      <!-- needed to highlight the searched term -->
      <param name="supportHighlighting" value="true"/>
      <!-- custom provider for getting an HTML excerpt in a query result with rep:excerpt() -->
      <param name="excerptProviderClass" value="info.magnolia.jackrabbit.lucene.SearchHTMLExcerpt"/>
    </SearchIndex>
  </Workspace>
  <Versioning rootPath="${rep.home}/version">
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
      <param name="path" value="${rep.home}/workspaces/version" />
    </FileSystem>
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
      <param name="driver" value="org.postgresql.Driver"/>
      <param name="url" value="jdbc:postgresql://xxxxxxxxx" />
      <param name="schema" value="postgresql" /><!-- warning, this is not the schema name, it's the db type -->
      <param name="user" value="xxxxx" />
      <param name="password" value="xxxxxxx" />
      <param name="schemaObjectPrefix" value="version_" />
      <param name="externalBLOBs" value="false" />
    </PersistenceManager>
  </Versioning>
</Repository>

在相关系统上使用第一配置导致大量的日志中的错误。你有一个想法如何解决这个问题?谢谢,进行重新编码

postgresql magnolia
1个回答
1
投票

您可以使用工作区API复制现有的工作区,但是这并不能帮助你。您可以导出根节点,并导入到一个新的安装正如你提到会占用大量的时间,以及。不过,我有点不解带accessControlProvider类的配置,因为它应该只是工作正常,当一个人把它添加到配置,并重新启动实例。这是因为权限检查都在运行时完成的,不应该影响它在改变类没有任何作用的方式。我建议检查这个第一,如果还是出于某种原因事情不工作,那么我会检查RepositoryCopier API,也许有来设置类,而调用方式

 RepositoryCopier.copy();

干杯,

© www.soinside.com 2019 - 2024. All rights reserved.