12-14-2009 04:31 AM
01-04-2010 11:24 AM
01-04-2010 02:52 PM
<!– All search results are filtered to exclude nodes that the current user can not –>
<!– read. Other methods restrict queries to those nodes the user can read –>
<bean id="SearchService_security" class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.search.SearchService.query=ACL_ALLOW,AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.search.SearchService.selectNodes=ACL_ALLOW,AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.search.SearchService.selectProperties=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.search.SearchService.contains=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.search.SearchService.like=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.search.SearchService.*=ACL_DENY
</value>
</property>
</bean>
01-05-2010 03:28 AM
The way Alfresco is doing it is working as intended. Any CMS that lets you search for something when you cannot actually read it is violating security rules.
Here is the "bad" scenario: you have a group of medical records. You want to find someone with an embarrassing disease. You search for all documents with the name/alias of the disease and you get a list of such documents, with the names of who is attached to such documents. Congratulations! You now have a list of people with the embarrassing disease! This is a fundamental privacy issue that Alfresco deals with properly.
To deal with your scenario, you have to have a trusted intermediary do the searching for you. This will let you breach the security constraints in a controlled (and, presumably, monitored) fashion.
01-06-2010 05:16 AM
Actually the service service security context is configured to filter out content the current user can not read. This is specified in public-services-security-context.xml. You can re-configure it if you require.
01-30-2018 11:50 AM
I know this topic is pretty old, but it is still a valid one in some organizations, so maybe my update helps someone...
1) This thread is actually a duplicate of an older one: Change 'read' permission filter on search results?
2) Note that the described solution won't quite work out-of-the-box if you are running Alfresco with Solr (instead of plain Lucene). Because since the "Solr time", nodes are filtered by permissions by the Solr engine already, by default. Luckily, this filtering can be switched off by setting "alfresco.doPermissionChecks=false" in an appropriate "solrcore.properties" file as described at alfresco - Is post query permission checks possible with solr? - Stack Overflow. So possibly the only question left now is whether this kind of customization can be somehow managed directly in the Solr instead (in order to avoid potential performance degradation?).
And of course, as written by Petr sobotka _, there is a to-do on how to differentiate between properties vs. content search (if we wanted to secure the solution more). This is surely doable, somehow, but it's a big question for an Solr / Alfresco expert about how much time one would need to actually do it...
01-30-2018 12:14 PM
Plus another problem found:
3) If one is missing the ReadContent permission and tries to display details of a file in the Share UI (which always also tries to render preview of the file content, if available), then that operation fails together with Alfresco log being filled with a huge repeated error stacktraces starting with:
REPO_2018-01-30 15:58:43,060 DEBUG [jscript.RhinoScriptProcessor.calls] [http-bio-9080-exec-10] node.get.js Start
REPO_2018-01-30 15:58:43,072 DEBUG [jscript.RhinoScriptProcessor.calls] [http-bio-9080-exec-10] node.get.js Exception
org.mozilla.javascript.EcmaError: TypeError: Cannot read property "isContainer" from null (classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/node.get.js#10)
So apparently, even the Share's code is not quite prepared for this customization which turns out to be quite a challenging one now...
02-11-2018 08:20 PM
Thanks for posting this. I am doing a small proof of concept and we are also initially looking for the ability to have searchable meta data with at least enough information to request access to content. This is in addition to the normal modes of consumer access and secure content.
So, it seems that for now, there isn't a great solution for this capability.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.