[jira] [Commented] (SLING-6285) Implement LoginAdminWhitelist in JCR Base

2016-11-23 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15692545#comment-15692545
 ] 

Bertrand Delacretaz commented on SLING-6285:


What's your use case for 
{{AbstractSlingRepositoryManager.isAllowLoginAdministrativeForBundleOverridden}}
 ?

IIUC it optionally makes AbstractSlingRepositoryManager independent from the 
presence of a LoginAdminWhitelist - but IMO we want to force the use of that 
component. Also, using reflection in 
{{isAllowLoginAdministrativeForBundleOverridden}} is unusual - if we want to 
make the whitelist optional we might as well have a method or annotation that 
expresses this in a cleaner way.

> Implement LoginAdminWhitelist in JCR Base
> -
>
> Key: SLING-6285
> URL: https://issues.apache.org/jira/browse/SLING-6285
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Affects Versions: JCR Base 2.4.2
>Reporter: Julian Sedding
>Assignee: Julian Sedding
> Fix For: JCR Oak Server 1.1.4, JCR Base 3.0.0
>
> Attachments: SLING-6285-jsedding.patch
>
>
> JCR Base should provide a default implementation 
> {{AbstractSlingRepositoryManager#allowLoginAdministrativeForBundle(Bundle)}} 
> with a configurable {{LoginAdminWhitelist}}. Implementation that want a 
> different logic can then still choose to overwrite the method.
> cc [~cziegeler], [~bdelacretaz]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-6285) Implement LoginAdminWhitelist in JCR Base

2016-11-23 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15674292#comment-15674292
 ] 

Bertrand Delacretaz edited comment on SLING-6285 at 11/24/16 7:43 AM:
--

Reopening, as there is an issue when the {{LoginAdminWhitelist}} is registered 
late (SLING-6305)


was (Author: jsedding):
Reopening, as there is an issue when the {{LoginAdminWhitelist}} is registered 
late.

> Implement LoginAdminWhitelist in JCR Base
> -
>
> Key: SLING-6285
> URL: https://issues.apache.org/jira/browse/SLING-6285
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Affects Versions: JCR Base 2.4.2
>Reporter: Julian Sedding
>Assignee: Julian Sedding
> Fix For: JCR Oak Server 1.1.4, JCR Base 3.0.0
>
> Attachments: SLING-6285-jsedding.patch
>
>
> JCR Base should provide a default implementation 
> {{AbstractSlingRepositoryManager#allowLoginAdministrativeForBundle(Bundle)}} 
> with a configurable {{LoginAdminWhitelist}}. Implementation that want a 
> different logic can then still choose to overwrite the method.
> cc [~cziegeler], [~bdelacretaz]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (SLING-6321) Sling Mock throwing java.lang.NoClassDefFoundError

2016-11-23 Thread Gustavo (JIRA)
Gustavo created SLING-6321:
--

 Summary: Sling Mock throwing java.lang.NoClassDefFoundError
 Key: SLING-6321
 URL: https://issues.apache.org/jira/browse/SLING-6321
 Project: Sling
  Issue Type: Bug
  Components: Testing
Affects Versions: Testing Sling Mock 1.8.0
Reporter: Gustavo


I'm getting the following error:

{panel}

java.lang.NoClassDefFoundError: 
org/apache/sling/models/spi/injectorspecific/InjectAnnotationProcessorFactory

at 
org.apache.sling.models.impl.ModelAdapterFactory.(ModelAdapterFactory.java:143)
at 
org.apache.sling.testing.mock.sling.context.SlingContextImpl.registerDefaultServices(SlingContextImpl.java:160)
at 
org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:143)
at 
org.apache.sling.testing.mock.sling.junit.SlingContext.access$100(SlingContext.java:35)
at 
org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:126)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.ClassNotFoundException: 
org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessorFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 26 more

{panel}

trying to run the following snipet:

{code}

@RunWith(MockitoJUnitRunner.class)
public class SimpleMockTest {

@Rule
public final SlingContext context = new SlingContext();

@Test
public void testSomething() {
Resource resource = 
context.resourceResolver().getResource("/content/sample/en");
}

}
{code}

Using the following dependencies:

{code:xml}

org.apache.sling
org.apache.sling.api
2.7.0


org.apache.sling
org.apache.sling.models.api
1.0.0
provided




org.apache.sling
org.apache.sling.testing.osgi-mock
1.8.0
test


org.apache.sling
org.apache.sling.testing.jcr-mock
1.1.16
test


org.apache.sling
org.apache.sling.testing.sling-mock
1.8.0
test

{code}

Am i missing something?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-6115) Context-Aware Config: Web Console Plugin for Configuration Resolution

2016-11-23 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15691526#comment-15691526
 ] 

Stefan Seifert edited comment on SLING-6115 at 11/23/16 10:30 PM:
--

Completed: At revision: 1771057  

it supports resolving configurations via ConfigurationResolver (by using the 
ConfigurationManager API)


was (Author: sseif...@pro-vision.de):
Completed: At revision: 1771057  


> Context-Aware Config: Web Console Plugin for Configuration Resolution
> -
>
> Key: SLING-6115
> URL: https://issues.apache.org/jira/browse/SLING-6115
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Minor
>  Labels: contextaware-config
> Fix For: Context-Aware Configuration Impl 1.2.0
>
>
> with the first implementation prototype a web console plugin was included 
> which can be used to test/debug configuration resource resolution.
> it was not maintained properly during all the refactoring and new features 
> that were added since then, thus is quite broken currently.
> the web console plugin has to be refactored and fixed, and perhaps enhanced 
> to support the new features as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SLING-6115) Context-Aware Config: Web Console Plugin for Configuration Resolution

2016-11-23 Thread Stefan Seifert (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert resolved SLING-6115.
---
Resolution: Fixed

Completed: At revision: 1771057  


> Context-Aware Config: Web Console Plugin for Configuration Resolution
> -
>
> Key: SLING-6115
> URL: https://issues.apache.org/jira/browse/SLING-6115
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Minor
>  Labels: contextaware-config
> Fix For: Context-Aware Configuration Impl 1.2.0
>
>
> with the first implementation prototype a web console plugin was included 
> which can be used to test/debug configuration resource resolution.
> it was not maintained properly during all the refactoring and new features 
> that were added since then, thus is quite broken currently.
> the web console plugin has to be refactored and fixed, and perhaps enhanced 
> to support the new features as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (SLING-6320) New Endpoint through Connector Creation does not get updated

2016-11-23 Thread JIRA
Dominique Jäggi created SLING-6320:
--

 Summary: New Endpoint through Connector Creation does not get 
updated
 Key: SLING-6320
 URL: https://issues.apache.org/jira/browse/SLING-6320
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Discovery API 1.0.2
Reporter: Dominique Jäggi


The _StandardPropertyProvider_ updates the _endpoint_ property upon the 
_HttpService_ being modified.

If a new endpoint is created by having a custom 
_org.apache.felix.http.jetty.ConnectorFactory_ that adds a 
_org.eclipse.jetty.server.Connector_ (e.g. to add an SSL listener), the 
_HttpService_ will not be modified and therefore the _StandardPropertyProvider_ 
not propagate the new endpoint.

The _StandardPropertyProvider_ should probably also (or only?) listen to the 
binding/unbinding of _Connectors_. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SLING-6315) o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled

2016-11-23 Thread Antonio Sanso (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antonio Sanso resolved SLING-6315.
--
Resolution: Won't Fix

> o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled
> --
>
> Key: SLING-6315
> URL: https://issues.apache.org/jira/browse/SLING-6315
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Antonio Sanso
>Assignee: Antonio Sanso
>Priority: Minor
>
> {noformat}
> 18.11.2016 02:58:23.445 *ERROR* [FelixDispatchQueue] 
> org.apache.sling.scripting.core FrameworkEvent ERROR 
> (java.lang.IllegalStateException: The bundle is 
> uninstalled.)java.lang.IllegalStateException: The bundle is uninstalled.
>   at org.apache.felix.framework.Felix.getBundleEntry(Felix.java:1741)
>   at org.apache.felix.framework.BundleImpl.getEntry(BundleImpl.java:291)
>   at 
> org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory.bundleChanged(ScriptEngineManagerFactory.java:158)
>   at 
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
>   at 
> org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1148)
>   at 
> org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:55)
>   at 
> org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:103)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5517) Support of startsWith in exclude path of Content Disposition filter

2016-11-23 Thread Antonio Sanso (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15690310#comment-15690310
 ] 

Antonio Sanso commented on SLING-5517:
--

[~kwin]

bq. Flash file behave in the browsers if a Content-Disposition header is set? 

yes no problem.

bq. What about referencing fonts with that Content-Disposition header?

same they work fine.

> Support of startsWith in exclude path of Content Disposition filter
> ---
>
> Key: SLING-5517
> URL: https://issues.apache.org/jira/browse/SLING-5517
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mandeep Gandhi
> Fix For: Security 1.0.18
>
>
> Right now exclude path parameter of config of Content Disposition filter 
> takes   specific paths into account. 
> To excluded everything under a give path, an enhancement is required.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6319) Installer sometimes deletes the wrong .ser files

2016-11-23 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15690263#comment-15690263
 ] 

Bertrand Delacretaz commented on SLING-6319:


And the test that validates this is at 
https://svn.apache.org/repos/asf/sling/trunk/installer/core/src/test/java/org/apache/sling/installer/core/impl/OsgiInstallerImplTest.java

> Installer sometimes deletes the wrong .ser files
> 
>
> Key: SLING-6319
> URL: https://issues.apache.org/jira/browse/SLING-6319
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Affects Versions: Installer Core 3.8.0
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>
> It looks like the logic used to delete the {{rsrc.getPrivateCopyOfFile()}} in 
> {{OsgiInstallerImpl.registerResources}} is wrong and sometimes causes .ser 
> files to be wrongly deleted.
> I'll commit a new {{OsgiInstallerImplTest}} that demonstrates this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SLING-6319) Installer sometimes deletes the wrong .ser files

2016-11-23 Thread Bertrand Delacretaz (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz resolved SLING-6319.

Resolution: Fixed

Fixed in http://svn.apache.org/r1770974 after adding the test mentioned above 
and a bit of refactoring to make the logic easier to understand.

> Installer sometimes deletes the wrong .ser files
> 
>
> Key: SLING-6319
> URL: https://issues.apache.org/jira/browse/SLING-6319
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Affects Versions: Installer Core 3.8.0
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>
> It looks like the logic used to delete the {{rsrc.getPrivateCopyOfFile()}} in 
> {{OsgiInstallerImpl.registerResources}} is wrong and sometimes causes .ser 
> files to be wrongly deleted.
> I'll commit a new {{OsgiInstallerImplTest}} that demonstrates this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6165) Expose a service for Sling Scripting that provides request-scoped Resource Resolvers for scripting dependencies

2016-11-23 Thread Radu Cotescu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15690120#comment-15690120
 ] 

Radu Cotescu commented on SLING-6165:
-

[~olli], are you ok with releasing a new version of the 
{{org.apache.sling.scripting.api}} + {{org.apache.sling.scripting.core}} to 
have this service available? Offline we talked about renaming the {{impl}} 
sub-package from {{core}}, and I can do that almost instantly.

> Expose a service for Sling Scripting that provides request-scoped Resource 
> Resolvers for scripting dependencies
> ---
>
> Key: SLING-6165
> URL: https://issues.apache.org/jira/browse/SLING-6165
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
> Fix For: Scripting Core 2.0.42, Scripting API 2.1.10
>
>
> A new Sling Scripting service ({{ScriptingResourceResolverFactory}}) should 
> be implemented in order to provide access to request-based 
> {{ResourceResolvers}} for solving script dependencies.
> The following two methods should be available:
> {noformat}
> /**
>  * Provides a request-scoped {@link ResourceResolver} with only read access 
> to the search paths. This resolver should be used for script 
>  * resolution in the context of the same request rendering process. The 
> {@code ResourceResolver} should not be closed by consumers (calling
>  * {@link ResourceResolver#close} doesn't do anything), since this service 
> will handle the closing operation automatically. The 
>  * {@code ResourceResolver} will be shared between scripting dependencies 
> that render parts of the response for the same request.
>  */
> ResourceResolver getRequestScopedResourceResolver()
> /**
>  * Provides a {@link ResourceResolver} with only read access to the search 
> paths. Once you're done processing {@link Resource}s with this 
>  * {@code ResourceResolver} make sure to close it.
>  */
> ResourceResolver getResourceResolver()
> {noformat}
> [sling-dev email 
> thread|https://lists.apache.org/thread.html/db2a78249baf2d6234a4549a5aff8b5474256add9829f86ac78d1c56@%3Cdev.sling.apache.org%3E]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (SLING-6319) Installer sometimes deletes the wrong .ser files

2016-11-23 Thread Bertrand Delacretaz (JIRA)
Bertrand Delacretaz created SLING-6319:
--

 Summary: Installer sometimes deletes the wrong .ser files
 Key: SLING-6319
 URL: https://issues.apache.org/jira/browse/SLING-6319
 Project: Sling
  Issue Type: Bug
  Components: Installer
Affects Versions: Installer Core 3.8.0
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz


It looks like the logic used to delete the {{rsrc.getPrivateCopyOfFile()}} in 
{{OsgiInstallerImpl.registerResources}} is wrong and sometimes causes .ser 
files to be wrongly deleted.

I'll commit a new {{OsgiInstallerImplTest}} that demonstrates this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-5517) Support of startsWith in exclude path of Content Disposition filter

2016-11-23 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15690026#comment-15690026
 ] 

Konrad Windszus edited comment on SLING-5517 at 11/23/16 1:10 PM:
--

That contradicts https://tools.ietf.org/html/rfc6266#section-4.2 and I really 
fear that browser behaviour might change in the future, because actually the 
Content-Disposition header should take precedence. How does including a e.g. 
Flash file behave in the browsers if a Content-Disposition header is set? What 
about referencing fonts with that Content-Disposition header?


was (Author: kwin):
That contradicts https://tools.ietf.org/html/rfc6266#section-4.2 and I really 
fear that browser behaviour might change in the future, because actually the 
Content-Disposition header should take precedence.

> Support of startsWith in exclude path of Content Disposition filter
> ---
>
> Key: SLING-5517
> URL: https://issues.apache.org/jira/browse/SLING-5517
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mandeep Gandhi
> Fix For: Security 1.0.18
>
>
> Right now exclude path parameter of config of Content Disposition filter 
> takes   specific paths into account. 
> To excluded everything under a give path, an enhancement is required.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5517) Support of startsWith in exclude path of Content Disposition filter

2016-11-23 Thread Antonio Sanso (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15690038#comment-15690038
 ] 

Antonio Sanso commented on SLING-5517:
--

bq. That contradicts https://tools.ietf.org/html/rfc6266#section-4.2 and I 
really fear that browser behaviour might change in the future, because actually 
the Content-Disposition header should take precedence.
 
[~kwin] I disagree this is going to change... 

> Support of startsWith in exclude path of Content Disposition filter
> ---
>
> Key: SLING-5517
> URL: https://issues.apache.org/jira/browse/SLING-5517
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mandeep Gandhi
> Fix For: Security 1.0.18
>
>
> Right now exclude path parameter of config of Content Disposition filter 
> takes   specific paths into account. 
> To excluded everything under a give path, an enhancement is required.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5517) Support of startsWith in exclude path of Content Disposition filter

2016-11-23 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15690026#comment-15690026
 ] 

Konrad Windszus commented on SLING-5517:


That contradicts https://tools.ietf.org/html/rfc6266#section-4.2 and I really 
fear that browser behaviour might change in the future, because actually the 
Content-Disposition header should take precedence.

> Support of startsWith in exclude path of Content Disposition filter
> ---
>
> Key: SLING-5517
> URL: https://issues.apache.org/jira/browse/SLING-5517
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mandeep Gandhi
> Fix For: Security 1.0.18
>
>
> Right now exclude path parameter of config of Content Disposition filter 
> takes   specific paths into account. 
> To excluded everything under a give path, an enhancement is required.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (SLING-5228) Remove loginAdministrative() usage from org.apache.sling.installer.provider.jcr

2016-11-23 Thread Robert Munteanu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu reassigned SLING-5228:
--

Assignee: Robert Munteanu

> Remove loginAdministrative() usage from 
> org.apache.sling.installer.provider.jcr
> ---
>
> Key: SLING-5228
> URL: https://issues.apache.org/jira/browse/SLING-5228
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Reporter: Antonio Sanso
>Assignee: Robert Munteanu
> Fix For: JCR Installer 3.1.20
>
>
> Counted 4 occurrences



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5228) Remove loginAdministrative() usage from org.apache.sling.installer.provider.jcr

2016-11-23 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15690015#comment-15690015
 ] 

Robert Munteanu commented on SLING-5228:


By briefly looking at the code, it looks to me that the JCR installer provider 
only scans the repository for installable resources, and then passes them on to 
the OSGi installer. As such, this bunde would only need read access to the 
repository and a service user will be useful

> Remove loginAdministrative() usage from 
> org.apache.sling.installer.provider.jcr
> ---
>
> Key: SLING-5228
> URL: https://issues.apache.org/jira/browse/SLING-5228
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Reporter: Antonio Sanso
>Assignee: Robert Munteanu
> Fix For: JCR Installer 3.1.20
>
>
> Counted 4 occurrences



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-5228) Remove loginAdministrative() usage from org.apache.sling.installer.provider.jcr

2016-11-23 Thread Robert Munteanu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu updated SLING-5228:
---
Fix Version/s: JCR Installer 3.1.20

> Remove loginAdministrative() usage from 
> org.apache.sling.installer.provider.jcr
> ---
>
> Key: SLING-5228
> URL: https://issues.apache.org/jira/browse/SLING-5228
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Reporter: Antonio Sanso
>Assignee: Robert Munteanu
> Fix For: JCR Installer 3.1.20
>
>
> Counted 4 occurrences



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5815) Expose DistributionContentSerializer

2016-11-23 Thread Tommaso Teofili (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15689678#comment-15689678
 ] 

Tommaso Teofili commented on SLING-5815:


committed a first version of the exposed API in r1770942.
For now no resource mapping, as it sounds overkill.

> Expose DistributionContentSerializer 
> -
>
> Key: SLING-5815
> URL: https://issues.apache.org/jira/browse/SLING-5815
> Project: Sling
>  Issue Type: Improvement
>  Components: Distribution
>Reporter: Tommaso Teofili
>Assignee: Tommaso Teofili
> Fix For: Content Distribution 0.2.0
>
> Attachments: SLING-5815.0.patch, SLING-5815.1.patch
>
>
> Expose {{DistributionContentSerializer}} API from 
> _org.apache.sling.distribution.core_ in order to allow implementation of 
> custom serialization formats (e.g. Avro and Kryo defined in 
> _org.apache.sling.distribution.extensions_).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6315) o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled

2016-11-23 Thread Felix Meschberger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15689557#comment-15689557
 ] 

Felix Meschberger commented on SLING-6315:
--

bq. Is it still possible to have a race condition

Unless you implement a synchronous event listener, which I strongly discourage, 
yes, there is a chance for a race condition. Is this a problem ? This should be 
rare.

Even this situation that you are trying to fix/workaround should really be 
extremely rare and only on a "flickering" system, which might even hint at a 
problematic underlying provisioning function !

So maybe, it might even make sense to *not* do anything about this problem in 
the event listener but rather seek to fix the "system flickering" in the 
provisioning function ? As in "fix the root not the symptom"

> o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled
> --
>
> Key: SLING-6315
> URL: https://issues.apache.org/jira/browse/SLING-6315
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Antonio Sanso
>Assignee: Antonio Sanso
>Priority: Minor
>
> {noformat}
> 18.11.2016 02:58:23.445 *ERROR* [FelixDispatchQueue] 
> org.apache.sling.scripting.core FrameworkEvent ERROR 
> (java.lang.IllegalStateException: The bundle is 
> uninstalled.)java.lang.IllegalStateException: The bundle is uninstalled.
>   at org.apache.felix.framework.Felix.getBundleEntry(Felix.java:1741)
>   at org.apache.felix.framework.BundleImpl.getEntry(BundleImpl.java:291)
>   at 
> org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory.bundleChanged(ScriptEngineManagerFactory.java:158)
>   at 
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
>   at 
> org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1148)
>   at 
> org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:55)
>   at 
> org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:103)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6315) o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled

2016-11-23 Thread Antonio Sanso (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15689551#comment-15689551
 ] 

Antonio Sanso commented on SLING-6315:
--

[~fmeschbe] thanks for the hint. 
Is it still possible to have a race condition though between the if block and 
the {{event.getBundle().getEntry()}} ?

> o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled
> --
>
> Key: SLING-6315
> URL: https://issues.apache.org/jira/browse/SLING-6315
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Antonio Sanso
>Assignee: Antonio Sanso
>Priority: Minor
>
> {noformat}
> 18.11.2016 02:58:23.445 *ERROR* [FelixDispatchQueue] 
> org.apache.sling.scripting.core FrameworkEvent ERROR 
> (java.lang.IllegalStateException: The bundle is 
> uninstalled.)java.lang.IllegalStateException: The bundle is uninstalled.
>   at org.apache.felix.framework.Felix.getBundleEntry(Felix.java:1741)
>   at org.apache.felix.framework.BundleImpl.getEntry(BundleImpl.java:291)
>   at 
> org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory.bundleChanged(ScriptEngineManagerFactory.java:158)
>   at 
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
>   at 
> org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1148)
>   at 
> org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:55)
>   at 
> org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:103)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6315) o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled

2016-11-23 Thread Felix Meschberger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15689529#comment-15689529
 ] 

Felix Meschberger commented on SLING-6315:
--

Rather than try-catching (on every event even !) I suggest to amend the the 
test for the started event with a test for the bundle state, such as :

{code}
if (event == started and bundle.state == active) { ... }
{code}

> o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled
> --
>
> Key: SLING-6315
> URL: https://issues.apache.org/jira/browse/SLING-6315
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Antonio Sanso
>Assignee: Antonio Sanso
>Priority: Minor
>
> {noformat}
> 18.11.2016 02:58:23.445 *ERROR* [FelixDispatchQueue] 
> org.apache.sling.scripting.core FrameworkEvent ERROR 
> (java.lang.IllegalStateException: The bundle is 
> uninstalled.)java.lang.IllegalStateException: The bundle is uninstalled.
>   at org.apache.felix.framework.Felix.getBundleEntry(Felix.java:1741)
>   at org.apache.felix.framework.BundleImpl.getEntry(BundleImpl.java:291)
>   at 
> org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory.bundleChanged(ScriptEngineManagerFactory.java:158)
>   at 
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
>   at 
> org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1148)
>   at 
> org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:55)
>   at 
> org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:103)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6315) o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled

2016-11-23 Thread Radu Cotescu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15689502#comment-15689502
 ] 

Radu Cotescu commented on SLING-6315:
-

LGTM. I would maybe just implement it like:
{code}
if event == started {
  URL url = null;
  try {
  } catch (ISE) {
  log
  }
} else event == stopped {
}
{code}

We don't need the URL for when the bundle stops, right?

> o.a.sling.scripting.core: IllegalStateException: The bundle is uninstalled
> --
>
> Key: SLING-6315
> URL: https://issues.apache.org/jira/browse/SLING-6315
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Antonio Sanso
>Assignee: Antonio Sanso
>Priority: Minor
>
> {noformat}
> 18.11.2016 02:58:23.445 *ERROR* [FelixDispatchQueue] 
> org.apache.sling.scripting.core FrameworkEvent ERROR 
> (java.lang.IllegalStateException: The bundle is 
> uninstalled.)java.lang.IllegalStateException: The bundle is uninstalled.
>   at org.apache.felix.framework.Felix.getBundleEntry(Felix.java:1741)
>   at org.apache.felix.framework.BundleImpl.getEntry(BundleImpl.java:291)
>   at 
> org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory.bundleChanged(ScriptEngineManagerFactory.java:158)
>   at 
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
>   at 
> org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1148)
>   at 
> org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:55)
>   at 
> org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:103)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-5517) Support of startsWith in exclude path of Content Disposition filter

2016-11-23 Thread Antonio Sanso (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15689472#comment-15689472
 ] 

Antonio Sanso edited comment on SLING-5517 at 11/23/16 9:14 AM:


[~kwin] even if {{/apps/myapp/images}} has the filter enabled 

{code}

{code}
 will work without any problem
so what is the real use case?


was (Author: asanso):
[~kwin] even if {{/apps/myapp/images}} has the filter enabled 

{code}
 will work without any problem
{code}

so what is the real use case?

> Support of startsWith in exclude path of Content Disposition filter
> ---
>
> Key: SLING-5517
> URL: https://issues.apache.org/jira/browse/SLING-5517
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mandeep Gandhi
> Fix For: Security 1.0.18
>
>
> Right now exclude path parameter of config of Content Disposition filter 
> takes   specific paths into account. 
> To excluded everything under a give path, an enhancement is required.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-5517) Support of startsWith in exclude path of Content Disposition filter

2016-11-23 Thread Antonio Sanso (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15689472#comment-15689472
 ] 

Antonio Sanso edited comment on SLING-5517 at 11/23/16 9:14 AM:


[~kwin] even if {{/apps/myapp/images}} has the filter enabled 

{code}

{code}

will work without any problem.
So what is the real use case?


was (Author: asanso):
[~kwin] even if {{/apps/myapp/images}} has the filter enabled 

{code}

{code}
 will work without any problem
so what is the real use case?

> Support of startsWith in exclude path of Content Disposition filter
> ---
>
> Key: SLING-5517
> URL: https://issues.apache.org/jira/browse/SLING-5517
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mandeep Gandhi
> Fix For: Security 1.0.18
>
>
> Right now exclude path parameter of config of Content Disposition filter 
> takes   specific paths into account. 
> To excluded everything under a give path, an enhancement is required.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5517) Support of startsWith in exclude path of Content Disposition filter

2016-11-23 Thread Antonio Sanso (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15689472#comment-15689472
 ] 

Antonio Sanso commented on SLING-5517:
--

[~kwin] even if {{/apps/myapp/images}} has the filter enabled 

{code}
 will work without any problem
{code}

so what is the real use case?

> Support of startsWith in exclude path of Content Disposition filter
> ---
>
> Key: SLING-5517
> URL: https://issues.apache.org/jira/browse/SLING-5517
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mandeep Gandhi
> Fix For: Security 1.0.18
>
>
> Right now exclude path parameter of config of Content Disposition filter 
> takes   specific paths into account. 
> To excluded everything under a give path, an enhancement is required.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)