[jira] [Updated] (SLING-7544) Make optimized alias lookup non-blocking

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler updated SLING-7544:

Fix Version/s: (was: Resource Resolver 1.6.2)
   Resource Resolver 1.6.4

> Make optimized alias lookup non-blocking
> 
>
> Key: SLING-7544
> URL: https://issues.apache.org/jira/browse/SLING-7544
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.5.36
>Reporter: Dominik Süß
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Resource Resolver 1.6.4
>
>  Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> The implementation of optimized alias lookup as introduced with SLING-2521 
> blocks CommonResourceResolver activation while loading aliases to fillup the 
> aliasmap. In case a corresponding index is not present yet this can lead to 
> full tree traversal while indexing is doing the same in the background.
> The proposed improvements are:
> * making loading of the aliasmap happen asynchronously
> * only use optimized handling as soon as aliasmap is built
> * wait for non traversal index (optional - forced by default, can be turned 
> off for small datasets)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7665) Use bnd Maven plugins

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler updated SLING-7665:

Fix Version/s: (was: Resource Resolver 1.6.2)
   Resource Resolver 1.6.4

> Use bnd Maven plugins
> -
>
> Key: SLING-7665
> URL: https://issues.apache.org/jira/browse/SLING-7665
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Reporter: Oliver Lietz
>Priority: Major
> Fix For: Resource Resolver 1.6.4
>
> Attachments: SLING-7665.patch
>
>
> Additionally patch overrides {{Require-Capability}} for 
> {{OsgiObservationBridge}}, see also [bnd #2429 Provide a way to override 
> (required) capabilities generated from DS 
> annotations|https://github.com/bndtools/bnd/issues/2429]:
> {noformat}
> Require-Capability:\
>   
> osgi.service;filter:="(objectClass=org.osgi.service.event.EventHandler)";effective:=active;resolution:=optional
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SLING-7593) ResourceTraversor doesn't support ResourceDecorator pattern

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler closed SLING-7593.
---

> ResourceTraversor doesn't support ResourceDecorator pattern
> ---
>
> Key: SLING-7593
> URL: https://issues.apache.org/jira/browse/SLING-7593
> Project: Sling
>  Issue Type: Bug
>  Components: API, Servlets
>Reporter: Joanna Jasnowska
>Assignee: Carsten Ziegeler
>Priority: Blocker
> Fix For: API 2.18.2, Servlets Get 2.1.32
>
> Attachments: 
> calling_deprecated_ResourceUtil_listChildren(resource)_replaced_with_resource_listChildren.patch,
>  listChildren_method_fixed.patch
>
>
> In my current project, we are using ResourceDecorator pattern. In one case we 
> would like to decorate a resource with additional children. Unfortunately 
> ResourceTraversor object doesn't accept information about children from 
> ResourceDecorator. It is caused by usage of 
> ResourceUtil.listChildren(resource) method (inside ResourceTraversor class) 
> which is deprecated. Under the hood the method invokes 
> resource.getResourceResolver.listChildren(resource) method which reads data 
> directly from repo. In result our additional children are not returned. 
> Moreover, we don't have a place to add them to the list returned from 
> resourceResolver.listChildren method.
> When we change the approach and we invoke resource.listChildren() method 
> instead of ResourceUtil.listChildren(resource) then we get solution which is 
> compatible with ResourceDecorator pattern and on the other hand when 
> resources are not decorated then no changes should be observed.
> Additionally I have one additional question about 
> org.apache.sling.servlets.get bundle imported packages. Why do we have the 
> following dependency org.apache.sling.api.resource.external;version="[1.0,2)" 
> in the latest released version? On the other hand the same bundle has 
> dependency on org.apache.sling.api.resource; version="[2.10,3)". Is it 
> expected? If yes then how to provide 
> org.apache.sling.api.resource.external;version="[1.0,2)" on my environment, 
> because now I don't have it.
> In the attachment section, you could find patch containing fix for the 
> described scenario.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SLING-3524) ResourceResolver.clone(null) should not share the same JCR session

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler closed SLING-3524.
---

> ResourceResolver.clone(null) should not share the same JCR session
> --
>
> Key: SLING-3524
> URL: https://issues.apache.org/jira/browse/SLING-3524
> Project: Sling
>  Issue Type: Improvement
>  Components: API, JCR, ResourceResolver
>Affects Versions: Resource Resolver 1.0.6
>Reporter: Alexander Klimetschek
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: API 2.18.2, Resource Resolver 1.6.2, JCR Resource 3.0.12
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> {{ResourceResolver.clone()}} will reuse the same JCR session in case it was 
> created by passing an existing session using 
> {{JcrResourceConstants.AUTHENTICATION_INFO_SESSION}}. If you need a clone of 
> the resource resolver to pass into a new, separate thread, and use 
> {{ResourceResolver.clone(null)}}, you will actually share the session, but 
> this is not obvious. The problem is that a JCR session cannot be shared 
> across threads.
> The javadocs of clone() say "the same credential data is used as was used to 
> create this instance".
> There are a few problems with this:
> - seeing the session object itself as "credential data" is unintuitive
> - in my code, I have no idea what the original credential data was, so I 
> don't know what kind of credential data it was to make the right decision
> - since sharing a JCR session is to be avoided at all times, the resource 
> resolver should prevent one from this
> A solution would be if a plain {{ResourceResolver.clone(null)}} would return 
> a session that impersonated itself, abstracting this from the resource 
> resolver user. Additionally, it might be worth looking that clone always 
> returns a new session, unless specifically stated.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7591) Session leak when a ResourceResolver is created from a Session then gets cloned

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler updated SLING-7591:

Fix Version/s: (was: JCR Resource 3.0.10)
   JCR Resource 3.0.12

> Session leak when a ResourceResolver is created from a Session then gets 
> cloned
> ---
>
> Key: SLING-7591
> URL: https://issues.apache.org/jira/browse/SLING-7591
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 3.0.8
>Reporter: Csaba Varga
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: JCR Resource 3.0.12
>
>
> The following steps will cause a new JCR session to be opened then leaked:
>  # Create a ResourceResolver out of an existing JCR session (using 
> AUTHENTICATION_INFO_SESSION)
>  # Call clone() on the ResourceResolver created in step 1, passing the 
> ResourceResolverFactory.USER_IMPERSONATION key with a username to impersonate
>  # Close the ResourceResolver created in step 2.
> The expected behavior is that since step 2 opened a new JCR Session in the 
> background, step 3 should close it. The actual behavior is that the JCR 
> session stays open without an obvious way to close it, and these leaked 
> sessions can pile up if this sequence is executed often.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-3524) ResourceResolver.clone(null) should not share the same JCR session

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler updated SLING-3524:

Fix Version/s: (was: JCR Resource 3.0.10)
   JCR Resource 3.0.12

> ResourceResolver.clone(null) should not share the same JCR session
> --
>
> Key: SLING-3524
> URL: https://issues.apache.org/jira/browse/SLING-3524
> Project: Sling
>  Issue Type: Improvement
>  Components: API, JCR, ResourceResolver
>Affects Versions: Resource Resolver 1.0.6
>Reporter: Alexander Klimetschek
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: API 2.18.2, Resource Resolver 1.6.2, JCR Resource 3.0.12
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> {{ResourceResolver.clone()}} will reuse the same JCR session in case it was 
> created by passing an existing session using 
> {{JcrResourceConstants.AUTHENTICATION_INFO_SESSION}}. If you need a clone of 
> the resource resolver to pass into a new, separate thread, and use 
> {{ResourceResolver.clone(null)}}, you will actually share the session, but 
> this is not obvious. The problem is that a JCR session cannot be shared 
> across threads.
> The javadocs of clone() say "the same credential data is used as was used to 
> create this instance".
> There are a few problems with this:
> - seeing the session object itself as "credential data" is unintuitive
> - in my code, I have no idea what the original credential data was, so I 
> don't know what kind of credential data it was to make the right decision
> - since sharing a JCR session is to be avoided at all times, the resource 
> resolver should prevent one from this
> A solution would be if a plain {{ResourceResolver.clone(null)}} would return 
> a session that impersonated itself, abstracting this from the resource 
> resolver user. Additionally, it might be worth looking that clone always 
> returns a new session, unless specifically stated.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: /etc/map with Placeholders for farms / dev stack

2018-07-30 Thread Georg Henzler

Hi Andreas,


Install Hooks have their own issues like that they do not work for
replication


Install Hooks work flawlessly with replication since around two years
(AEM 6.3)


and they requires to changes whatever the customer has /
provides in order to add the place holders.


not sure what you mean with this?


... allowing external URLs is dangerous...

I do agree with that and I will remove that from my POC.


A property file should still be possible... so if we do this
in Sling, I think the following is needed:

Property Sources to be supported at minimum:

* An OSGi configuration
* A local properties file
* OS Env variables
* Java System Properties

There should be an Felix console plugin to show what is active
from what source and where the value is used. It should live in
a bundle named like e.g. org.apache.sling.systemenv and provide
a simple interface to perform string interpolation on any
string. This service can then be used by

* Resource resolver
* Sling distribution
* Context-Aware Configuration

a product like AEM can also use this interface in

* AEM replication config
* externaliser config

To have this mechanism properly rolled out it will take some
time (until all listed modules properly use the to-defined
interface)

IMHO it is not an option to do it locally in resourceresolver
because

a) it would result in quite a bit of duplicated code across the
modules listed above (once we actually start implement it)
b) if additional sources need to be added in the future (think
ZooKeeper as one interesting option to receive those env-specific
values), all consumers would have to be updated (unlikely to
happen, more likely is to have inconsistent behaviour over time)

Since the described above is quite a bit of effort, I opt for
pushing a lower-level approach forward (something like [1] or
maybe even something on oak level). Then there is only one
implementation needed and it's available immediately, everywhere.

-Georg

[1] https://issues.apache.org/jira/browse/JCRVLT-254





Re: [Dev][GSoC]Resource /favicon.ico not found

2018-07-30 Thread Robert Munteanu

Hi Hasini,

On 2018-07-30 19:43, Hasini Witharana wrote:

Hi all,

I am creating a custom authentication handler by implementing
AuthenticationHandler interface. I have registered the custom
authentication handler as a OSGI component and the below code shows the
custom authentication handler I implemented.

@Component(

service = AuthenticationHandler.class ,
name = "OIDC Authentication Handler",
property = {"sling.servlet.methods={GET, POST}",
AuthenticationHandler.PATH_PROPERTY+"=/auth/oidc", },
immediate = true)

public class OIDCAuthenticationHandler extends
DefaultAuthenticationFeedbackHandler implements AuthenticationHandler 
{



@Override
public AuthenticationInfo extractCredentials(HttpServletRequest
request, HttpServletResponse response) {


return new AuthenticationInfo("OIDC", 
"hasinidila...@gmail.com",

"abc".toCharArray());

}

}


I created a user with the given 
credentials(username:hasinidila...@gmail.com,

password:abc) manually and I am trying to get logged into
http://localhost:8080/starter/index.html automatically with the above
credentials.

When I send a request to http://localhost:8080/auth/oidc as shown in 
the

code I am getting the below error in error logs.

*Resource /favicon.ico not found*

How to solve this?


That is a request that the browser automatically sends and should not 
impact your Sling app at all.


Robert


[jira] [Commented] (SLING-7790) Allow for synchronous installation of bundles and configurations via install hook

2018-07-30 Thread Georg Henzler (JIRA)


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

Georg Henzler commented on SLING-7790:
--

bq. What do you think about explicitly mention each to be installed 
bundle/configuration with their full path in the package properties

I'd like to not have to do that because it's not that nice from a maintenance 
perspective (refactorings might break packages if people forget to update that 
property). Sling models is an example where java packages had to be first 
listed explicitly and now we are happy to not have to do that anymore (with the 
bnd plugin).

bq. currently you hardcode the directories to "config" and "install" which may 
be overwritten via configuration

good catch! I would update the code to propertly check for 
sling.jcrinstall.folder.name.regexp and sling.jcrinstall.folder.max.depth in 
PID org.apache.sling.installer.provider.jcr.impl.JcrInstaller to fix that, 
would that approach be ok for you?



> Allow for synchronous installation of bundles and configurations via install 
> hook
> -
>
> Key: SLING-7790
> URL: https://issues.apache.org/jira/browse/SLING-7790
> Project: Sling
>  Issue Type: New Feature
>  Components: Installer
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Normally bundles configurations are installed asynchronously after a bundle 
> is saved to the JCR during package installation (vault packages). This is due 
> to the backgroundThread that the OsgiInstallerImpl is using. Since the 
> introduction of the pauseInstallation signal node via SLING-3747, the 
> installation of bundles and configurations is even forced to after the 
> completed vault package installation. This behaviour also means that the 
> package dependency can be declared, but it is not effective on "contained 
> bundle level" but only on JCR content level. The following is not possible 
> today:
> Complete Package with sub packages:
> * Package A (containing Bundle A)
> * Package B (containing Bundle B) with dependency to Bundle A
> If it is just a OSGi package dependency from Bundle B to Bundle A the 
> installation order does not matter (the OSGi framework will sort it out). 
> However if the content of Package B has a dependency to bundle A (think 
> custom oak restrictions [1] or install hooks referenced) there will be an 
> error. 
> To allow for those cases and to avoid manual steps (not providing a complete 
> package often means exactly that), it would be good to have a means to 
> install contained bundles of a package synchronously. This can be achieved by 
> a fairly simple install hook that "pre-installs" the contained 
> InstallableResources with the correct digest to the OsgiInstaller. The 
> subsequent call of sling-org-apache-sling-installer-provider-jcr will just 
> update the already installed resource again with the same digest (which will 
> not cause any action in the system). 
> Obviously this mechanism should only be used where needed and only for 
> configurations and bundles that are safe to install (bundles/configs that 
> will never restart any of the base services). Using the install hook makes 
> the mechanism "opt-in". 
> [1] 
> https://sling.apache.org/documentation/bundles/sling-oak-restrictions.html
> https://jackrabbit.apache.org/oak/docs/security/authorization/restriction.html#pluggability



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


/etc/map units tests and the issue of recursive mapping

2018-07-30 Thread Andreas Schaefer
Hi

For SLING-7768 I created two unit test classes 
(org.apache.sling.resourceresolver, branch: feature/SLING-7768) that test the 
basic etc mapping behaving directly with MapEntries and one through the 
Resource Resolver which also includes tests using resolve().

During my tests I ran into an issue with the /etc/map mapping that led to an 
issue where Sling became unresponsive and luckily can be fixed by changing the 
path to the /etc/map in the Resource Resolver Factory configuration. It might 
be good to provide a configuration settings where certain paths like the one 
from Composum can be excluded from the mapping to avoid loosing access to 
composum due to a misconfiguration in the mapping.

Cheers - Andy Schaefer

Re: /etc/map with Placeholders for farms / dev stack

2018-07-30 Thread Andreas Schaefer
Hi George

> On Jul 26, 2018, at 2:21 PM, Georg Henzler  wrote:
> 
> Hi Andreas,
> 
> I'm not sure if this is going in the right direction - this is currently
> implemented at at a local module level 
> (sling-org-apache-sling-resourceresolver)
> when it is really something that the platform should support (see below).

Ruben and I were discussing to add placeholders also to OSGi Configurations to 
be able to change host names for both the etc-mapping but also for Distribution 
/ Replication.
That would requires to add the string interpolation to Felix in order to make 
it work as just trying to handle the OSG configuration from JCR leads to many 
issues.
But for now we would love to see this in Sling as soon as possible as testing 
of bigger companies is difficult and time consuming.
If we have a solution in Jackrabbit I am more than happy to remove my code from 
the resource resolver.

> 
> Also note that your example/reasoning in the description of SLING-7768
> only lists DEV/QA/STAGING/PROD - if you are limited to those environments you
> can easily do with runmodes. Placeholder replacement becomes interesting when
> you think about an "elastic number of environments" that are not known at
> development time (think about spinning up "STAGING-7" for that special 
> performance
> test that needs to run in isolation)

This was the basic test case but our case this involves to have a different 
host name because of a temporary migration server.
It would also work for URL paths as well.

> 
>> ... Ruben and I think it could be helpful to make the Placeholder Provider
>> more generic to that it could be used in other services like the
>> distribution/replication, externalizers etc to have an easier way to
>> manage server configuration in a central place.
> 
> I agree we should have the capability in the platform, but IMHO it should not
> be in sling-org-apache-sling-resourceresolver. There was a discussion in
> jackrabbit-dev:
> 
> http://jackrabbit.510166.n4.nabble.com/Environment-specific-non-role-based-configurations-td4669795.html
> and https://issues.apache.org/jira/browse/JCRVLT-254
> for the initial issue.
> 
> Btw.: you can achieve your requirement already today (down to AEM 6.0) with
> https://github.com/Netcentric/system-env-install-hook
> (but I'd rather see this as first-class citizen as part of the platform
> and not as a third-party module)

Install Hooks have their own issues like that they do not work for replication 
and they requires to changes whatever the customer has / provides in order to 
add the place holders.

> 
>>> * No need to support anything else like files and system properties to
>>> provide the placeholders. Makes error handling much more complicated (what
>>> do you do if the http download of that placeholder file fails?), and I
>>> would rather leave it to the ops team to implement that process and handle
>>> any errors.
>> I see the issue with the external files / web resources. The system
>> properties are there to make sure an admin can override any settings
>> if things do not work out.
> 
> I agree here with Jörg that allowing external URLs is dangerous here (and
> it could even be seen critical from a security perspective). Also, the config 
> allows
> to give both key value pairs directly and a URL to retrieve them from - I 
> suppose
> these two property sets are merged?

I do agree with that and I will remove that from my POC.

> 
> But to sum up I think the best would be to have a mechanism for placeholder 
> replacement
> on a lower level...
> 
> -Georg



[jira] [Commented] (SLING-7768) Add String Interpolation support to /etc/map

2018-07-30 Thread Andreas Schaefer (JIRA)


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

Andreas Schaefer commented on SLING-7768:
-

Added a unit test class for the Etc Map through Etc Map Entries and one for Etc 
Map through a Resource Resolver including testing the resource resolving and 
String Interpolation.

> Add String Interpolation support to /etc/map
> 
>
> Key: SLING-7768
> URL: https://issues.apache.org/jira/browse/SLING-7768
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
> Environment: Sling 11-SNAPSHOT, JDK 1.8
>Reporter: Andreas Schaefer
>Priority: Major
> Attachments: Screenshot 2018-07-06 11.41.58.png, Screenshot 
> 2018-07-06 11.42.41.png, Screenshot 2018-07-06 11.43.34.png
>
>
> Having worked on migrations of a Sling derivate Ruben & I ran into issues 
> where the /etc/map would map to production instead of testing environment.
>  Many big customer have extensive /etc/maps and also many different 
> environments like dev, qa, staging, prod etc.
>  It would be great to have a tool where for example items like the host name 
> or external links in /etc/map could be configured outside so that just one 
> entry has to adjusted rather than creating a full copy of the /etc/map tree.
>   
>  Example:
>   
>  /etc/map/http/phv.fq.host.name.8080
>   
>  Placeholder provides:
>  DEV: phv.fq.host.name=localhost
>  QA: phv.fq.host.name=qa.author.acme.com
>  STAGING: 
> phv.fq.host.name=[staging.author.acme.com|http://staging.author.acme.com/]
>  PROD: phv.fq.host.name=[acme.com|http://acme.com/]
>   
>  At runtime these are the resolved values:
>  DEV: http/localhost.8080
>  QA: http/qa.author.acme.com.8080
>  STAGING: http/[staging.author.acme.com|http://staging.author.acme.com/].8080
>  PROD: http/[acme.com|http://acme.com/].8080
>   
>  Not only does that make it easier and faster to create new test environments 
> but it also cuts down on the chance of copy-n-paste errors.
>   
>  I have a working POC with an PlaceholderProvider OSGi service and an 
> enhanced MapEntries that resolved any placeholders if found.
>   
>  Attached are 3 screenshots:
>  1. OSGi Placeholder Provider Configuration
>  2. /etc/map (Composum)
>  3. Result of [http://andreass.local:8080/] call



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7699) Add ability to stream a Resource tree to Sling

2018-07-30 Thread Jason E Bailey (JIRA)


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

Jason E Bailey updated SLING-7699:
--
Fix Version/s: Resource Filter 1.0.0

> Add ability to stream a Resource tree to Sling
> --
>
> Key: SLING-7699
> URL: https://issues.apache.org/jira/browse/SLING-7699
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: Resource Filter 1.0.0
>
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Add an ability to stream a Resource tree starting from a specific resource



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7699) Add ability to stream a Resource tree to Sling

2018-07-30 Thread Jason E Bailey (JIRA)


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

Jason E Bailey updated SLING-7699:
--
Summary: Add ability to stream a Resource tree to Sling  (was: Add ability 
to stream a Resource tree to the  API bundle)

> Add ability to stream a Resource tree to Sling
> --
>
> Key: SLING-7699
> URL: https://issues.apache.org/jira/browse/SLING-7699
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Add an ability to stream a Resource tree starting from a specific resource



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[Dev][GSoC]Resource /favicon.ico not found

2018-07-30 Thread Hasini Witharana
Hi all,

I am creating a custom authentication handler by implementing
AuthenticationHandler interface. I have registered the custom
authentication handler as a OSGI component and the below code shows the
custom authentication handler I implemented.

@Component(
>> service = AuthenticationHandler.class ,
>> name = "OIDC Authentication Handler",
>> property = {"sling.servlet.methods={GET, POST}",
>> AuthenticationHandler.PATH_PROPERTY+"=/auth/oidc", },
>> immediate = true)
>>
>> public class OIDCAuthenticationHandler extends
>> DefaultAuthenticationFeedbackHandler implements AuthenticationHandler {
>>
>>
>> @Override
>> public AuthenticationInfo extractCredentials(HttpServletRequest
>> request, HttpServletResponse response) {
>>
>>
>> return new AuthenticationInfo("OIDC", "hasinidila...@gmail.com",
>> "abc".toCharArray());
>>
>> }
>>
>> }

I created a user with the given credentials(username:hasinidila...@gmail.com,
password:abc) manually and I am trying to get logged into
http://localhost:8080/starter/index.html automatically with the above
credentials.

When I send a request to http://localhost:8080/auth/oidc as shown in the
code I am getting the below error in error logs.

*Resource /favicon.ico not found*

How to solve this?

Thank You.
-- 
*Hasini Witharana*
Undergraduate | Department of Computer Science and Engineering
University of Moratuwa
Linkedin 


[jira] [Commented] (SLING-7699) Add ability to stream a Resource tree to the API bundle

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler commented on SLING-7699:
-

[~jebailey] Thanks, no worries. I assume that we could create a new component 
for this in the future

> Add ability to stream a Resource tree to the  API bundle
> 
>
> Key: SLING-7699
> URL: https://issues.apache.org/jira/browse/SLING-7699
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Add an ability to stream a Resource tree starting from a specific resource



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7699) Add ability to stream a Resource tree to the API bundle

2018-07-30 Thread Jason E Bailey (JIRA)


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

Jason E Bailey commented on SLING-7699:
---

I had added a method to the API to provide a Stream of the resource 
and it's descendants and attempted a release. This created a lengthy discussion 
on the mailing list about the merits of this being in the API. Due to lack of 
consensus I pulled the modification and worked on implementing it separately so 
that the benefits could be demonstrated. On pulling all of this out and 
resetting commits, I missed that this Jira status had been set to resolved.

> Add ability to stream a Resource tree to the  API bundle
> 
>
> Key: SLING-7699
> URL: https://issues.apache.org/jira/browse/SLING-7699
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Add an ability to stream a Resource tree starting from a specific resource



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: [VOTE] Release Apache Sling API 2.18.2

2018-07-30 Thread Carsten Ziegeler
SLING-3524 is part of the changelog, I removed SLING-7699 and reopened it

Thanks

Carsten


Stefan Seifert wrote
> +1 on the release.
> 
> comments on the changelog in jira:
> - SLING-3524 is missing
> - i found no trace for SLING-7699 in the git changelog for this release, we 
> should remove it from this version
> 
> stefan
> 
>> -Original Message-
>> From: Carsten Ziegeler [mailto:cziege...@apache.org]
>> Sent: Wednesday, July 25, 2018 11:03 AM
>> To: Sling Developers
>> Subject: [VOTE] Release Apache Sling API 2.18.2
>>
>> Hi,
>>
>> We solved 3 issues in this release:
>> https://issues.apache.org/jira/projects/SLING/versions/12342941
>>
>> Staging repository:
>> https://repository.apache.org/content/repositories/orgapachesling-1924
>>
>> You can use this UNIX script to download the release and verify the
>> signatures:
>> http://svn.apache.org/repos/asf/sling/trunk/check_staged_release.sh
>>
>> Usage:
>> sh check_staged_release.sh 1924 /tmp/sling-staging
>>
>> Please vote to approve this release:
>>
>>  [ ] +1 Approve the release
>>  [ ]  0 Don't care
>>  [ ] -1 Don't release, because ...
>>
>> This majority vote is open for at least 72 hours.
>>
>> Carsten
>> --
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziege...@apache.org
> 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[jira] [Updated] (SLING-7699) Add ability to stream a Resource tree to the API bundle

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler updated SLING-7699:

Fix Version/s: (was: API 2.18.2)

> Add ability to stream a Resource tree to the  API bundle
> 
>
> Key: SLING-7699
> URL: https://issues.apache.org/jira/browse/SLING-7699
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Add an ability to stream a Resource tree starting from a specific resource



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (SLING-7699) Add ability to stream a Resource tree to the API bundle

2018-07-30 Thread Carsten Ziegeler (JIRA)


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

Carsten Ziegeler reopened SLING-7699:
-

What is the status here? This is labelled as API but is not in the API bundle

> Add ability to stream a Resource tree to the  API bundle
> 
>
> Key: SLING-7699
> URL: https://issues.apache.org/jira/browse/SLING-7699
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Add an ability to stream a Resource tree starting from a specific resource



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] jimmycasey opened a new pull request #1: Fixed Spelling.

2018-07-30 Thread GitBox
jimmycasey opened a new pull request #1: Fixed Spelling.
URL: https://github.com/apache/sling-org-apache-sling-mom/pull/1
 
 
   Hi there, 
   I wrote this bot based on the top 10 most misspelled english words.
   (https://blog.oxforddictionaries.com/2016/08/02/corpus-misspellings/)
   The bot queries, forks, clones, fixes and commits but I manually create the 
PRs.
   All the best,
   Jimmy


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Welcome to our five new Sling PMC members!

2018-07-30 Thread Bertrand Delacretaz
Hi Sling community,

The Sling PMC took a good look at our list of active committers and as
a result has proposed the following people as members of the Sling
PMC, and without opposition ASF's Board of Directors (*) I'm happy to
announce our five new PMC members, in no specific order:

Andrei Dulvac, Nicolas Peltier, Julian Sedding, Georg Henzler and
David Bosschaert

A big thank you to all of you for your continued efforts to help keep
Sling at a high level of quality and robustness, and congratulations
on your new role here!

-Bertrand

(*) Board oppositions are extremely unlikely, I don't remember a
single one - but in theory they could happen


[VOTE RESULT] Release Apache Sling API 2.18.2

2018-07-30 Thread Carsten Ziegeler
The vote passes with four binding +1 votes

Thanks everyone

Regards

Carsten



-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[CANCELLED] [VOTE] Release Apache Sling Resource Filter version 1.0.0

2018-07-30 Thread Jason E Bailey
updating source based on feedback.

- Jason

On Tue, Jul 24, 2018, at 1:46 PM, Jason E Bailey wrote:
> Hi,
> 
> This is the initial release of the Sling Resource Filter
> 
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling- 1923/
> 
> You can use this UNIX script to download the release and verify the 
> signatures:
> https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD
> 
> Usage:
> sh check_staged_release.sh 1923 /tmp/sling-staging
> 
> Please vote to approve this release:
> 
>   [ ] +1 Approve the release
>   [ ]  0 Don't care
>   [ ] -1 Don't release, because ...
> 
> This majority vote is open for at least 72 hours.
> 
> --
> Jason


Re: [VOTE] Release Apache Sling API 2.18.2

2018-07-30 Thread Daniel Klco
+1

On Mon, Jul 30, 2018 at 5:43 AM Stefan Seifert 
wrote:

> +1 on the release.
>
> comments on the changelog in jira:
> - SLING-3524 is missing
> - i found no trace for SLING-7699 in the git changelog for this release,
> we should remove it from this version
>
> stefan
>
> >-Original Message-
> >From: Carsten Ziegeler [mailto:cziege...@apache.org]
> >Sent: Wednesday, July 25, 2018 11:03 AM
> >To: Sling Developers
> >Subject: [VOTE] Release Apache Sling API 2.18.2
> >
> >Hi,
> >
> >We solved 3 issues in this release:
> >https://issues.apache.org/jira/projects/SLING/versions/12342941
> >
> >Staging repository:
> >https://repository.apache.org/content/repositories/orgapachesling-1924
> >
> >You can use this UNIX script to download the release and verify the
> >signatures:
> >http://svn.apache.org/repos/asf/sling/trunk/check_staged_release.sh
> >
> >Usage:
> >sh check_staged_release.sh 1924 /tmp/sling-staging
> >
> >Please vote to approve this release:
> >
> >  [ ] +1 Approve the release
> >  [ ]  0 Don't care
> >  [ ] -1 Don't release, because ...
> >
> >This majority vote is open for at least 72 hours.
> >
> >Carsten
> >--
> >Carsten Ziegeler
> >Adobe Research Switzerland
> >cziege...@apache.org
>
>


[jira] [Resolved] (SLING-7613) Remove deprecation of SlingRepository.loginAdministrative()

2018-07-30 Thread Robert Munteanu (JIRA)


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

Robert Munteanu resolved SLING-7613.

   Resolution: Won't Fix
Fix Version/s: (was: JCR API 2.4.2)

We failed to gather consensus and there were strong arguments against this 
raised on the Sling dev list - 
https://lists.apache.org/thread.html/629fa177b8409a5e7548d6980063263b60b42a12d97010155dc36b6c@%3Cdev.sling.apache.org%3E
 .

Resolving "won't fix".

> Remove deprecation of SlingRepository.loginAdministrative()
> ---
>
> Key: SLING-7613
> URL: https://issues.apache.org/jira/browse/SLING-7613
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Affects Versions: JCR API 2.4.0
>Reporter: Jörg Hoh
>Assignee: Robert Munteanu
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> There was a discussion on the Sling user list [1] about usecases which can 
> only be solved using the deprecated loginAdministrative() call. In the 
> context of Sling and Oak there are indeed a few cases which can be solved 
> best with a true admin session:
> * locking and unlocking nodes which have been locked by a different user.
> * at deployments resources/nodes are deployed at many locations inside the 
> repo, so you can either use an admin session or a system-user with an 
> equivalent set of permissions.
> * the discussions leaves it open if the impersonation feature internally 
> relies on an admin session or can be achieved without it.
> System users should be the preferred, but I would like to have an offical and 
> non-deprecated way to get an admin session in the API. It's ok if I need to 
> configure the explicit whitelisting as it is in place right now. But it 
> should be there.
> Plus there should be proper documentation when to use which approach.
> [1] 
> http://apache-sling.73963.n3.nabble.com/Deprecation-of-SlingRepository-loginAdministrative-td4081024.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] rombert commented on issue #1: SLING-7613 - Remove deprecation of SlingRepository.loginAdministrative()

2018-07-30 Thread GitBox
rombert commented on issue #1: SLING-7613 - Remove deprecation of 
SlingRepository.loginAdministrative()
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-api/pull/1#issuecomment-408901673
 
 
   We failed to gather consensus and there were strong arguments against this 
raised on the Sling dev list - 
https://lists.apache.org/thread.html/629fa177b8409a5e7548d6980063263b60b42a12d97010155dc36b6c@%3Cdev.sling.apache.org%3E
 .
   
   Closing without merging.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rombert closed pull request #1: SLING-7613 - Remove deprecation of SlingRepository.loginAdministrative()

2018-07-30 Thread GitBox
rombert closed pull request #1: SLING-7613 - Remove deprecation of 
SlingRepository.loginAdministrative()
URL: https://github.com/apache/sling-org-apache-sling-jcr-api/pull/1
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] toniedzwiedz commented on issue #5: Feature/stop selector duplication

2018-07-30 Thread GitBox
toniedzwiedz commented on issue #5: Feature/stop selector duplication
URL: 
https://github.com/apache/sling-org-apache-sling-dynamic-include/pull/5#issuecomment-408901571
 
 
   @rombert ah, I see, it's a blacklist, rather than a whitelist. I renamed the 
package to `org.apache.sling.dynamicinclude.impl` and inspected `MANIFEST.mf`, 
it seems to have done the trick
   
   ```
   Export-Package: org.apache.sling.dynamicinclude;version="4.0.0";uses:="j
avax.servlet,org.apache.sling.api,org.apache.sling.dynamicinclude.gener
ator,org.apache.sling.dynamicinclude.pathmatcher,org.osgi.service.compo
nent",org.apache.sling.dynamicinclude.generator;version="3.0.0",org.apa
che.sling.dynamicinclude.generator.types;version="3.0.0";uses:="org.apa
che.sling.dynamicinclude.generator,org.osgi.service.component",org.apac
he.sling.dynamicinclude.pathmatcher;version="3.0.0"
   ```
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: SLING-7613 - un-deprecating loginAdministrative

2018-07-30 Thread Robert Munteanu
On Tue, 2018-07-17 at 14:55 +0200, Robert Munteanu wrote:
> Comments/reviews are most welcome, I plan to merge this next Monday.

It's clear from the discussions that there is no consensus on whether
this is a good thing or not. I will drop this PR and close the Jira as
WONTFIX.

There are some good ideas that popped in the thread, but I believe they
deserve separate attention.

Thanks all for the discussion,

Robert



[jira] [Created] (SLING-7793) ACLs pipes

2018-07-30 Thread Nicolas Peltier (JIRA)
Nicolas Peltier created SLING-7793:
--

 Summary: ACLs pipes
 Key: SLING-7793
 URL: https://issues.apache.org/jira/browse/SLING-7793
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: pipes 2.0.2
Reporter: Nicolas Peltier


ACLs pipes could be great, with following feature:
- .allow(userName) (default allow jcr:all on currentResource to userName, can 
be overriden with jcr:privilege=... property),
- .deny(userName) (default deny jcr:read on currentResource to userName, can be 
overriden with jcr:privilege)
- .acls() will return current resource, with in output bindings array of ACLs 
mentioning principal, privilege of that resource. If current resource is an 
authorizable, and if some flag is set to true, then returns ACLs attached to 
that user in the repository.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] rombert commented on issue #5: Feature/stop selector duplication

2018-07-30 Thread GitBox
rombert commented on issue #5: Feature/stop selector duplication
URL: 
https://github.com/apache/sling-org-apache-sling-dynamic-include/pull/5#issuecomment-408887166
 
 
   @toniedzwiedz  - thanks for the update. If you look at the generated 
manifest, you will see that the `urlbuilder` package is still included in the 
list of exported packages. I would suggest moving it to an `impl` or `internal` 
package so that it's automatically excluded from the export packages.
   
   Also, the release depends on whether we have other contributions to process, 
but it should be OK to start the release after the PR is merged, and then the 
release is available in ~3 days.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jimmycasey opened a new pull request #1: Fixed Spelling.

2018-07-30 Thread GitBox
jimmycasey opened a new pull request #1: Fixed Spelling.
URL: https://github.com/apache/sling-org-apache-sling-jobs-it/pull/1
 
 
   Hi there, 
   I wrote this bot based on the top 10 most misspelled english words.
   (https://blog.oxforddictionaries.com/2016/08/02/corpus-misspellings/)
   The bot queries, forks, clones, fixes and commits but I manually create the 
PRs.
   All the best,
   Jimmy


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] toniedzwiedz edited a comment on issue #5: Feature/stop selector duplication

2018-07-30 Thread GitBox
toniedzwiedz edited a comment on issue #5: Feature/stop selector duplication
URL: 
https://github.com/apache/sling-org-apache-sling-dynamic-include/pull/5#issuecomment-408883889
 
 
   @rombert the changes you suggested pertaining to the `UrlBuilder` have been 
introduced.
   
   Sorry for the delay, I had to deal with some higher-priority stuff and then 
I went on vacation.  We'll be testing this on AEM 6.4 this week. If it goes 
well, we should be able to merge this.
   
   How long does it usually take between a merge and an official release?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] toniedzwiedz edited a comment on issue #5: Feature/stop selector duplication

2018-07-30 Thread GitBox
toniedzwiedz edited a comment on issue #5: Feature/stop selector duplication
URL: 
https://github.com/apache/sling-org-apache-sling-dynamic-include/pull/5#issuecomment-408883889
 
 
   Sorry for the delay, I had to deal with some higher-priority stuff and then 
I went on vacation.  We'll be testing this on AEM 6.4 this week. If it goes 
well, we should be to merge this.
   
   @rombert the changes you suggested pertaining to the `UrlBuilder` have been 
introduced.
   
   How long does it usually take between a merge and an official release?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] bdelacretaz closed pull request #4: Fixed Spelling.

2018-07-30 Thread GitBox
bdelacretaz closed pull request #4: Fixed Spelling.
URL: https://github.com/apache/sling-org-apache-sling-commons-log/pull/4
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java
 
b/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java
index 1dbf11c..e4e0557 100644
--- 
a/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java
+++ 
b/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java
@@ -508,7 +508,7 @@ public void onReset(LoggerContext context) {
 
context.setMaxCallerDataDepth(logConfigManager.getMaxCallerDataDepth());
 registerPackageInfoCollector();
 
-// Attach a console appender to handle logging untill we configure
+// Attach a console appender to handle logging until we configure
 // one. This would be removed in RootLoggerListener.reset
 final Logger rootLogger = 
getLoggerContext().getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
 rootLogger.setLevel(Level.INFO);
diff --git 
a/src/test/java/org/apache/sling/commons/log/logback/integration/ITConfigAdminSupport.java
 
b/src/test/java/org/apache/sling/commons/log/logback/integration/ITConfigAdminSupport.java
index c039fec..36977d5 100644
--- 
a/src/test/java/org/apache/sling/commons/log/logback/integration/ITConfigAdminSupport.java
+++ 
b/src/test/java/org/apache/sling/commons/log/logback/integration/ITConfigAdminSupport.java
@@ -51,7 +51,7 @@
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
 public class ITConfigAdminSupport extends LogTestBase {
-// Constants taken from LogbackManager as they are not publically 
accessible
+// Constants taken from LogbackManager as they are not publicly accessible
 public static final String LOG_LEVEL = 
"org.apache.sling.commons.log.level";
 
 public static final String LOG_FILE = "org.apache.sling.commons.log.file";


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] toniedzwiedz commented on issue #5: Feature/stop selector duplication

2018-07-30 Thread GitBox
toniedzwiedz commented on issue #5: Feature/stop selector duplication
URL: 
https://github.com/apache/sling-org-apache-sling-dynamic-include/pull/5#issuecomment-408883889
 
 
   Sorry for the delay, I had to deal with some higher-priority stuff and then 
I went on vacation.  We'll be testing this on AEM 6.4 this week. If it goes 
well, we should be to merge this.
   
   How long does it usually take between a merge and an official release?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jimmycasey opened a new pull request #4: Fixed Spelling.

2018-07-30 Thread GitBox
jimmycasey opened a new pull request #4: Fixed Spelling.
URL: https://github.com/apache/sling-org-apache-sling-commons-log/pull/4
 
 
   Hi there, 
   I wrote this bot based on the top 10 most misspelled english words.
   (https://blog.oxforddictionaries.com/2016/08/02/corpus-misspellings/)
   The bot queries, forks, clones, fixes and commits but I manually create the 
PRs.
   All the best,
   Jimmy


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: SLING-7613 - un-deprecating loginAdministrative

2018-07-30 Thread Jason E Bailey
Maybe a hybrid approach? 

The current problem as I understand it, is that there is a need at times for an 
admin session. The current way to get an admin session allows access to that 
user from anywhere that code can be written, from any bundle, or JSP.  Service 
users are better because they can be linked to a Service, constrained, and you 
can't access them from a script.

Modify the Service user to require an explicit request for the Admin user, 
however that Admin user is restricted by configuration to what services can 
call it.

1. It's now clear in the code when an Admin session is being requested.
2. The Admin session can be restricted to specific services, providing a level 
of security
3. Admin session can not be accessed from a script at all, and you would need 
to access a service instead.
4. We can remove or throw unsupported exceptions on the older direct methods of 
accessing the admin session

- Jason

On Sat, Jul 28, 2018, at 1:27 PM, Dominik Süß wrote:
> I understand this position and can emphasize while it may lead to a wrong
> sense of security. Even service users require severe attention wrt their
> permissions and can be similarly dangerous if they can write code into
> executable locations (and expand the attack by being able to potentially
> use loginadmin).
> 
> I personally still think we should get an option to retrieve a session
> and/or resourceResolver where we further constrain  what the user can do in
> this particular session - processing malicious data in such a session
> couldn’t do harm outside of the case for which the session is built.
> 
> Maybe someone with a deeper security aspect background of the oak team can
> share about their thoughts of how to deal with those cases best.
> 
> Cheers
> Dominik
> 
> Bertrand Delacretaz  schrieb am Sa. 28. Juli 2018
> um 12:06:
> 
> > On Sat, Jul 28, 2018 at 10:23 AM Carsten Ziegeler 
> > wrote:
> > > ...Today you can just look at the
> > > code and you know whether admin is used or not...
> >
> > I share this concern, any mechanism that magically makes something
> > admin is dangerous as it can easily be overlooked.
> >
> > If changes are really needed I think they should keep the current
> > "it's obvious what admin is" visibility.
> >
> > -Bertrand
> >


Re: Markdown resource provider

2018-07-30 Thread Robert Munteanu
On Sat, 2018-07-28 at 13:28 -0400, Jason E Bailey wrote:
> I believe there's a difference between what the two end goals are.
> There is a the rendering of a Markdown resource into HTML and then
> there is using a Markdown file to generate a resource.

That is a good distinction to be made, and one of the things which I've
tried to reflect on the most.

Bertrand's suggestion of distinct fields, lazily computed, for 'raw' vs
'rendered' would solve this nicely and I'm going to investigate this.

> 
> A couple of thoughts on this. 
> # For a Markdown Resource providing attributes, I don't see a reason
> to use YAML for this. Markdown support integrated HTML and HTML
> supports custom tags.  You could  create some thing along the lines
> of  this wouldn't be
> displayed when viewing a rendered version of the file but be
> accessible when parsing.

I think we clarified this in the email thread - YAML front matter is
supported by other tools (and also nicely by Github for viewing) so IMO
it's a good argument for adpoting it.

Thanks,

Robert



Re: Markdown resource provider

2018-07-30 Thread Robert Munteanu
On Fri, 2018-07-27 at 15:49 +0200, Bertrand Delacretaz wrote:
> On Fri, Jul 27, 2018 at 3:16 PM Daniel Klco 
> wrote:
> > On Fri, Jul 27, 2018, 8:46 AM Jason E Bailey 
> > wrote:
> 
> ...
> > > Not understanding the phrase "front matter" in it's usage here
> > 
> > I'm assuming YAML front matter like is used in Jekyll. Correct? ..
> 
> That's my understanding as well, like the first few fields at the top
> of
> 
https://raw.githubusercontent.com/apache/sling-site/master/src/main/jbake/content/contributing.md

Exactly. You can also see it in 
https://github.com/apache/sling-whiteboard/blob/master/mdresourceprovider/src/test/resources/md-test/index.md

Robert



Re: Markdown resource provider

2018-07-30 Thread Robert Munteanu
On Fri, 2018-07-27 at 10:14 +0200, Andrei Dulvac wrote:
> Hi.
> 
> That's cool indeed!
> 
> What about using (potentially different) HTL scripts and create a
> Sling
> model that reads the raw markdown?

The markdown files have a default resource type of sling/markdown/file
[1] . This can be overriden by defining another 'sling:resourceType'
property in the YAML front matter.

And using Bertrand's suggestion of separating 'raw' and 'rendered'
properties means that we can potentially create independend rendering
scripts, and not rely on the one from the MarkdownResource.

Thanks,

Robert

[1]: 
https://github.com/apache/sling-whiteboard/blob/f96ac30acce34426a46cffb85dacc89d7801255b/mdresourceprovider/src/main/java/org/apache/sling/mdresource/impl/MarkdownResource.java#L123



Re: Markdown resource provider

2018-07-30 Thread Robert Munteanu
On Fri, 2018-07-27 at 08:07 +0200, Bertrand Delacretaz wrote:
> On Fri, Jul 27, 2018 at 1:18 AM Robert Munteanu 
> wrote:
> ...
> > - render everything else as HTML into jcr:description ...
> 
> I think rendering is a good idea but how about using a more specific
> property name?
> 
> Maybe use sling:markdownBody and sling:renderedHtmlBody with the
> latter being lazily rendered? Or maybe more concise names, but
> specific names would help avoid surprises IMO.

Those are good points, will change from jcr:title and jcr:description
and investigate having separate 'rendered' vs 'raw' properties.

Thanks!

Robert



Re: Markdown resource provider

2018-07-30 Thread Robert Munteanu
On Fri, 2018-07-27 at 07:51 +0200, Carsten Ziegeler wrote:
> Interesting, I've started similar work some time back but never
> finished
> it :) Back then I thought that this is a cross cutting concern, md
> files
> can be stored anywhere, in the file system, in jcr, fetched by a
> special
> github provider etc. Therefore I started with implementing a resource
> decorator instead which was configured with a path prefix. All
> resources
> beneath that path with the extension md where "decorated" in a
> similar
> way as you describe.

Hm, today I learned something now :-) I will look into the
ResourceDecorator mechanism.

> 
> What are you using for the md to html transformation?

Flexmark-java [1] with the YAML front matter extension.

[1]: https://github.com/vsch/flexmark-java



[jira] [Commented] (SLING-7792) Resource Resolver should return more than one resolved path if available

2018-07-30 Thread Robert Munteanu (JIRA)


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

Robert Munteanu commented on SLING-7792:


I like that better than {{maps}}, indeed.

> Resource Resolver should return more than one resolved path if available
> 
>
> Key: SLING-7792
> URL: https://issues.apache.org/jira/browse/SLING-7792
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.6.0
>Reporter: Alex COLLIGNON
>Priority: Major
>
> The current {{ResourceResolver#map}} methods return a single "path mapped 
> from the (resource) path". However, it is possible than a given path can be 
> mapped to multiple others while using features such as {{sling:alias}} and 
> {{sling:vanityUrl}}.
> In order to support that scenario, it is require to implement new maps method 
> for {{ResourceResolver}} which returns a collection of "resolved path". This 
> collection must contain the resources mapped through {{/etc/map}}, 
> {{sling:alias}} and {{sling:vanityUrl}}.
> The current API suggests to implement a second method to be 
> consistent/symmetric with the existing map operations
> {quote}
> @Nonnull java.util.Collection maps(@Nonnull 
> java.lang.String resourcePath)
> @Nonnull java.util.Collection maps(@Nonnull 
> javax.servlet.http.HttpServletRequest request, @Nonnull java.lang.String 
> resourcePath)
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7792) Resource Resolver should return more than one resolved path if available

2018-07-30 Thread Bertrand Delacretaz (JIRA)


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

Bertrand Delacretaz commented on SLING-7792:


bq. The background is that for a given resource client code needs to know all 
possible variations so that they are added as requirements for an 
authentication handler.

Ah ok, I see the idea now, thanks for clarifying.

Maybe {{getMapppingCandidates}} expresses this better than {{maps}} as a method 
name?

> Resource Resolver should return more than one resolved path if available
> 
>
> Key: SLING-7792
> URL: https://issues.apache.org/jira/browse/SLING-7792
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.6.0
>Reporter: Alex COLLIGNON
>Priority: Major
>
> The current {{ResourceResolver#map}} methods return a single "path mapped 
> from the (resource) path". However, it is possible than a given path can be 
> mapped to multiple others while using features such as {{sling:alias}} and 
> {{sling:vanityUrl}}.
> In order to support that scenario, it is require to implement new maps method 
> for {{ResourceResolver}} which returns a collection of "resolved path". This 
> collection must contain the resources mapped through {{/etc/map}}, 
> {{sling:alias}} and {{sling:vanityUrl}}.
> The current API suggests to implement a second method to be 
> consistent/symmetric with the existing map operations
> {quote}
> @Nonnull java.util.Collection maps(@Nonnull 
> java.lang.String resourcePath)
> @Nonnull java.util.Collection maps(@Nonnull 
> javax.servlet.http.HttpServletRequest request, @Nonnull java.lang.String 
> resourcePath)
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7792) Resource Resolver should return more than one resolved path if available

2018-07-30 Thread Robert Munteanu (JIRA)


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

Robert Munteanu commented on SLING-7792:


As this is based on an offline discussion between myself, [~acollign] and 
[~cziegeler], I'll add some more details.

The background is that for a given resource client code needs to know all 
possible variations so that they are added as requirements for an 
authentication handler. In case multiple mappings are found, e.g. the page has 
an alias but there are also matching entries under {{/etc/map}} the current 
{{ResourceResolver#map}} is not enough, as it only returns one entry.

> Resource Resolver should return more than one resolved path if available
> 
>
> Key: SLING-7792
> URL: https://issues.apache.org/jira/browse/SLING-7792
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.6.0
>Reporter: Alex COLLIGNON
>Priority: Major
>
> The current {{ResourceResolver#map}} methods return a single "path mapped 
> from the (resource) path". However, it is possible than a given path can be 
> mapped to multiple others while using features such as {{sling:alias}} and 
> {{sling:vanityUrl}}.
> In order to support that scenario, it is require to implement new maps method 
> for {{ResourceResolver}} which returns a collection of "resolved path". This 
> collection must contain the resources mapped through {{/etc/map}}, 
> {{sling:alias}} and {{sling:vanityUrl}}.
> The current API suggests to implement a second method to be 
> consistent/symmetric with the existing map operations
> {quote}
> @Nonnull java.util.Collection maps(@Nonnull 
> java.lang.String resourcePath)
> @Nonnull java.util.Collection maps(@Nonnull 
> javax.servlet.http.HttpServletRequest request, @Nonnull java.lang.String 
> resourcePath)
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7792) Resource Resolver should return more than one resolved path if available

2018-07-30 Thread Bertrand Delacretaz (JIRA)


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

Bertrand Delacretaz commented on SLING-7792:


How will the client code select which path to use if you resolve to multiple 
candidates and return just their paths?

We probably need to see the whole picture of how you intend to use this to 
understand better, but if there are multiple candidates I think the resolver 
should provide values such as which one are favorites, or why each candidate is 
present in the result set, to be able to make a sensible decision about which 
path to actually use.

Or maybe it's just a question of assigning priorities to the various mapping 
mechanisms, if their precedence is currently undefined (I' don't know if that's 
the case).

> Resource Resolver should return more than one resolved path if available
> 
>
> Key: SLING-7792
> URL: https://issues.apache.org/jira/browse/SLING-7792
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.6.0
>Reporter: Alex COLLIGNON
>Priority: Major
>
> The current {{ResourceResolver#map}} methods return a single "path mapped 
> from the (resource) path". However, it is possible than a given path can be 
> mapped to multiple others while using features such as {{sling:alias}} and 
> {{sling:vanityUrl}}.
> In order to support that scenario, it is require to implement new maps method 
> for {{ResourceResolver}} which returns a collection of "resolved path". This 
> collection must contain the resources mapped through {{/etc/map}}, 
> {{sling:alias}} and {{sling:vanityUrl}}.
> The current API suggests to implement a second method to be 
> consistent/symmetric with the existing map operations
> {quote}
> @Nonnull java.util.Collection maps(@Nonnull 
> java.lang.String resourcePath)
> @Nonnull java.util.Collection maps(@Nonnull 
> javax.servlet.http.HttpServletRequest request, @Nonnull java.lang.String 
> resourcePath)
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


RE: [VOTE] Release Apache Sling API 2.18.2

2018-07-30 Thread Stefan Seifert
+1 on the release.

comments on the changelog in jira:
- SLING-3524 is missing
- i found no trace for SLING-7699 in the git changelog for this release, we 
should remove it from this version

stefan

>-Original Message-
>From: Carsten Ziegeler [mailto:cziege...@apache.org]
>Sent: Wednesday, July 25, 2018 11:03 AM
>To: Sling Developers
>Subject: [VOTE] Release Apache Sling API 2.18.2
>
>Hi,
>
>We solved 3 issues in this release:
>https://issues.apache.org/jira/projects/SLING/versions/12342941
>
>Staging repository:
>https://repository.apache.org/content/repositories/orgapachesling-1924
>
>You can use this UNIX script to download the release and verify the
>signatures:
>http://svn.apache.org/repos/asf/sling/trunk/check_staged_release.sh
>
>Usage:
>sh check_staged_release.sh 1924 /tmp/sling-staging
>
>Please vote to approve this release:
>
>  [ ] +1 Approve the release
>  [ ]  0 Don't care
>  [ ] -1 Don't release, because ...
>
>This majority vote is open for at least 72 hours.
>
>Carsten
>--
>Carsten Ziegeler
>Adobe Research Switzerland
>cziege...@apache.org



[jira] [Created] (SLING-7792) Resource Resolver should return more than one resolved path if available

2018-07-30 Thread Alex COLLIGNON (JIRA)
Alex COLLIGNON created SLING-7792:
-

 Summary: Resource Resolver should return more than one resolved 
path if available
 Key: SLING-7792
 URL: https://issues.apache.org/jira/browse/SLING-7792
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Affects Versions: Resource Resolver 1.6.0
Reporter: Alex COLLIGNON


The current {{ResourceResolver#map}} methods return a single "path mapped from 
the (resource) path". However, it is possible than a given path can be mapped 
to multiple others while using features such as {{sling:alias}} and 
{{sling:vanityUrl}}.

In order to support that scenario, it is require to implement new maps method 
for {{ResourceResolver}} which returns a collection of "resolved path". This 
collection must contain the resources mapped through {{/etc/map}}, 
{{sling:alias}} and {{sling:vanityUrl}}.

The current API suggests to implement a second method to be 
consistent/symmetric with the existing map operations

{quote}
@Nonnull java.util.Collection maps(@Nonnull java.lang.String 
resourcePath)
@Nonnull java.util.Collection maps(@Nonnull 
javax.servlet.http.HttpServletRequest request, @Nonnull java.lang.String 
resourcePath)
{quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7791) ContentImporter does not import characters such as "&"

2018-07-30 Thread Konrad Windszus (JIRA)


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

Konrad Windszus updated SLING-7791:
---
Affects Version/s: JCR ContentLoader 2.1.10

> ContentImporter does not import characters such as "&"
> --
>
> Key: SLING-7791
> URL: https://issues.apache.org/jira/browse/SLING-7791
> Project: Sling
>  Issue Type: Bug
>Affects Versions: JCR ContentLoader 2.1.10
>Reporter: Van
>Priority: Major
>
> We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
> import data from an UTF-8 encoded XML file into the JCR repository.
> Only the ImportOptions has been customized, and the InputStream contains 
> values such as 
> {code:java}
> liberty  equality
> {code}
> This will get saved as "*liberty equality*" when I expect "*liberty & 
> equality*", which I don't understand as I never saw any issue posting such 
> characters into the JCR.
>  
> org.apache.sling.jcr.contentloader dependency version is 2.1.10



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7791) ContentImporter does not import characters such as "&"

2018-07-30 Thread Julian Sedding (JIRA)


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

Julian Sedding commented on SLING-7791:
---

Thanks for reporting this issue. It would be helpful if you could add a failing 
test to 
[XmlReaderTest|https://github.com/apache/sling-org-apache-sling-jcr-contentloader/blob/master/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java].
 A PR on Github works fine.

> ContentImporter does not import characters such as "&"
> --
>
> Key: SLING-7791
> URL: https://issues.apache.org/jira/browse/SLING-7791
> Project: Sling
>  Issue Type: Bug
>Reporter: Van
>Priority: Major
>
> We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
> import data from an UTF-8 encoded XML file into the JCR repository.
> Only the ImportOptions has been customized, and the InputStream contains 
> values such as 
> {code:java}
> liberty  equality
> {code}
> This will get saved as "*liberty equality*" when I expect "*liberty & 
> equality*", which I don't understand as I never saw any issue posting such 
> characters into the JCR.
>  
> org.apache.sling.jcr.contentloader dependency version is 2.1.10



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7791) ContentImporter does not import characters such as "&"

2018-07-30 Thread Van (JIRA)


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

Van updated SLING-7791:
---
Description: 
We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
import data from an UTF-8 encoded XML file into the JCR repository.

Only the ImportOptions has been customized, and the InputStream contains values 
such as 
{code:java}
liberty  equality
{code}
This will get saved as "*liberty equality*" when I expect "*liberty & 
equality*", which I don't understand as I never saw any issue posting such 
characters into the JCR.

org.apache.sling.jcr.contentloader dependency version is 2.1.10

  was:
We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
import data from an UTF-8 encoded XML file into the JCR repository.

Only the ImportOptions has been customized, and the InputStream contains values 
such as 
{code:java}
liberty  equality
{code}
This will get saved as "*liberty equality*" when I expect "*liberty & 
equality*", which I don't understand as I never saw any issue posting such 
characters into the JCR.


> ContentImporter does not import characters such as "&"
> --
>
> Key: SLING-7791
> URL: https://issues.apache.org/jira/browse/SLING-7791
> Project: Sling
>  Issue Type: Bug
>Reporter: Van
>Priority: Major
>
> We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
> import data from an UTF-8 encoded XML file into the JCR repository.
> Only the ImportOptions has been customized, and the InputStream contains 
> values such as 
> {code:java}
> liberty  equality
> {code}
> This will get saved as "*liberty equality*" when I expect "*liberty & 
> equality*", which I don't understand as I never saw any issue posting such 
> characters into the JCR.
> org.apache.sling.jcr.contentloader dependency version is 2.1.10



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7791) ContentImporter does not import characters such as "&"

2018-07-30 Thread Van (JIRA)


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

Van updated SLING-7791:
---
Description: 
We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
import data from an UTF-8 encoded XML file into the JCR repository.

Only the ImportOptions has been customized, and the InputStream contains values 
such as 
{code:java}
liberty  equality
{code}
This will get saved as "*liberty equality*" when I expect "*liberty & 
equality*", which I don't understand as I never saw any issue posting such 
characters into the JCR.

 

org.apache.sling.jcr.contentloader dependency version is 2.1.10

  was:
We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
import data from an UTF-8 encoded XML file into the JCR repository.

Only the ImportOptions has been customized, and the InputStream contains values 
such as 
{code:java}
liberty  equality
{code}
This will get saved as "*liberty equality*" when I expect "*liberty & 
equality*", which I don't understand as I never saw any issue posting such 
characters into the JCR.

org.apache.sling.jcr.contentloader dependency version is 2.1.10


> ContentImporter does not import characters such as "&"
> --
>
> Key: SLING-7791
> URL: https://issues.apache.org/jira/browse/SLING-7791
> Project: Sling
>  Issue Type: Bug
>Reporter: Van
>Priority: Major
>
> We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
> import data from an UTF-8 encoded XML file into the JCR repository.
> Only the ImportOptions has been customized, and the InputStream contains 
> values such as 
> {code:java}
> liberty  equality
> {code}
> This will get saved as "*liberty equality*" when I expect "*liberty & 
> equality*", which I don't understand as I never saw any issue posting such 
> characters into the JCR.
>  
> org.apache.sling.jcr.contentloader dependency version is 2.1.10



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7791) ContentImporter does not import characters such as "&"

2018-07-30 Thread Van (JIRA)


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

Van updated SLING-7791:
---
Description: 
We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
import data from an UTF-8 encoded XML file into the JCR repository.

Only the ImportOptions has been customized, and the InputStream contains values 
such as 
{code:java}
liberty  equality
{code}
This will get saved as "*liberty equality*" when I expect "*liberty & 
equality*", which I don't understand as I never saw any issue posting such 
characters into the JCR.

  was:
We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
import data from an UTF-8 encoded XML file into the JCR repository.

Only the ImportOptions has been customized, and the InputStream contains values 
such as "*liberty  equality*".

This will get saved as "*liberty equality*" when I expect "*liberty & 
equality*", which I don't understand as I never saw any issue posting such 
characters into the JCR.


> ContentImporter does not import characters such as "&"
> --
>
> Key: SLING-7791
> URL: https://issues.apache.org/jira/browse/SLING-7791
> Project: Sling
>  Issue Type: Bug
>Reporter: Van
>Priority: Major
>
> We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
> import data from an UTF-8 encoded XML file into the JCR repository.
> Only the ImportOptions has been customized, and the InputStream contains 
> values such as 
> {code:java}
> liberty  equality
> {code}
> This will get saved as "*liberty equality*" when I expect "*liberty & 
> equality*", which I don't understand as I never saw any issue posting such 
> characters into the JCR.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-7791) ContentImporter does not import characters such as "&"

2018-07-30 Thread Van (JIRA)


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

Van updated SLING-7791:
---
Summary: ContentImporter does not import characters such as "&"  (was: 
ContentImporter doen not import characters such as "&")

> ContentImporter does not import characters such as "&"
> --
>
> Key: SLING-7791
> URL: https://issues.apache.org/jira/browse/SLING-7791
> Project: Sling
>  Issue Type: Bug
>Reporter: Van
>Priority: Major
>
> We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
> import data from an UTF-8 encoded XML file into the JCR repository.
> Only the ImportOptions has been customized, and the InputStream contains 
> values such as "*liberty  equality*".
> This will get saved as "*liberty equality*" when I expect "*liberty & 
> equality*", which I don't understand as I never saw any issue posting such 
> characters into the JCR.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SLING-7791) ContentImporter doen not import characters such as "&"

2018-07-30 Thread Van (JIRA)
Van created SLING-7791:
--

 Summary: ContentImporter doen not import characters such as "&"
 Key: SLING-7791
 URL: https://issues.apache.org/jira/browse/SLING-7791
 Project: Sling
  Issue Type: Bug
Reporter: Van


We are using the org.apache.sling.jcr.contentloader.ContentImporter API to 
import data from an UTF-8 encoded XML file into the JCR repository.

Only the ImportOptions has been customized, and the InputStream contains values 
such as "*liberty  equality*".

This will get saved as "*liberty equality*" when I expect "*liberty & 
equality*", which I don't understand as I never saw any issue posting such 
characters into the JCR.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7790) Allow for synchronous installation of bundles and configurations via install hook

2018-07-30 Thread Konrad Windszus (JIRA)


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

Konrad Windszus commented on SLING-7790:


In general this looks very good. What do you think about explicitly mention 
each to be installed bundle/configuration with their full path in the package 
properties? That way even for packages containing multiple 
configurations/bundles, only some could be installed in a blocking fashion and 
all other lazily. Also then you could get rid of the code which collects the 
potential bundle/config candidates (because in theory that should also consider 
the JCR Installer OSGi configuration, currently you hardcode the directories to 
"config" and "install" which may be overwritten via configuration and also you 
don't consider the depth of the directory as the JCR Installer does).

> Allow for synchronous installation of bundles and configurations via install 
> hook
> -
>
> Key: SLING-7790
> URL: https://issues.apache.org/jira/browse/SLING-7790
> Project: Sling
>  Issue Type: New Feature
>  Components: Installer
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Normally bundles configurations are installed asynchronously after a bundle 
> is saved to the JCR during package installation (vault packages). This is due 
> to the backgroundThread that the OsgiInstallerImpl is using. Since the 
> introduction of the pauseInstallation signal node via SLING-3747, the 
> installation of bundles and configurations is even forced to after the 
> completed vault package installation. This behaviour also means that the 
> package dependency can be declared, but it is not effective on "contained 
> bundle level" but only on JCR content level. The following is not possible 
> today:
> Complete Package with sub packages:
> * Package A (containing Bundle A)
> * Package B (containing Bundle B) with dependency to Bundle A
> If it is just a OSGi package dependency from Bundle B to Bundle A the 
> installation order does not matter (the OSGi framework will sort it out). 
> However if the content of Package B has a dependency to bundle A (think 
> custom oak restrictions [1] or install hooks referenced) there will be an 
> error. 
> To allow for those cases and to avoid manual steps (not providing a complete 
> package often means exactly that), it would be good to have a means to 
> install contained bundles of a package synchronously. This can be achieved by 
> a fairly simple install hook that "pre-installs" the contained 
> InstallableResources with the correct digest to the OsgiInstaller. The 
> subsequent call of sling-org-apache-sling-installer-provider-jcr will just 
> update the already installed resource again with the same digest (which will 
> not cause any action in the system). 
> Obviously this mechanism should only be used where needed and only for 
> configurations and bundles that are safe to install (bundles/configs that 
> will never restart any of the base services). Using the install hook makes 
> the mechanism "opt-in". 
> [1] 
> https://sling.apache.org/documentation/bundles/sling-oak-restrictions.html
> https://jackrabbit.apache.org/oak/docs/security/authorization/restriction.html#pluggability



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)