Re: Using a mysql db in sling trunk

2010-03-17 Thread Eric Norman
We should probably add optional imports for all the common jdbc drivers to the embedded server bundle so updating/rebuilding it would not be necessary. Would you mind filing a new issue in JIRA for tracking? Thanks, Eric On Mar 17, 2010 3:44 PM, Michael Yin yincr...@gmail.com wrote: I rebuilt

Re: How to implement 'everyone-except' access control in Jackrabbit 2.0

2010-03-25 Thread Eric Norman
/10 8:54 AM, Eric Norman wrote: Hi Ray, Thanks for providing this good information. I'm replying to the sling users mailing list to continue discussion about how this information affects sling. Since the order of the ACEs is important in resolving the access control in jackrabbit, we need

Re: XPATH Child query

2010-07-29 Thread Eric Norman
Hi Federico, I believe the following query would do what you are asking for. The xpath query uses the // abbreviation for the descendant-or-self axis. var query = queryManager.createQuery(/jcr:root/content/david//element(*, nt:unstructured) order by @created descending, xpath); Regards, -Eric

Re: Creating a file

2010-07-29 Thread Eric Norman
Hi Audrey, It looks ok to me. Did you call session.save() at the end? On Jul 29, 2010 10:03 AM, Audrey Colbrant audrey.colbr...@inria.fr wrote: Hi, I am trying to create a file from server side following some examples, but no way, the file is not created. I have had a look to server logs but I

Re: ESP again...

2010-08-05 Thread Eric Norman
I think in your case the code would look something like this: % var items = currentNode.lineItems; % % var nodeIterator = items.nodes; % % while (nodeIterator.hasNext()) % %

Re: Created node property

2010-08-10 Thread Eric Norman
Hi Federico, No, the 'created' property is not an implicit property of every node. The form that creates the blog post in the espblog sample has a hidden input field that adds the created property. The value of the 'created' property is auto-generated by sling. The documentation could probably

Re: User managment

2010-08-11 Thread Eric Norman
compatibility here. Security is more important) Regards Felix On 11.08.2010 09:15, Mike Müller wrote: Hi Wouldn't it be safer if this feature is turned off be default? best regards mike -Original Message- From: Eric Norman [mailto:eric.d.nor...@gmail.com] Sent: Wednesday

Re: upgrading to Jackrabbit 2.2.5

2011-03-31 Thread Eric Norman
Hi All, I found a use case where I could also use an upgrade to jackrabbit 2.2.5 to utilize some changes in user/group management. I filed JIRA issue SLING-2044 for tracking and will attempt the upgrade today. Regards, Eric On Fri, Mar 25, 2011 at 8:23 AM, Justin Edelson

Re: Reset user pwd

2011-04-30 Thread Eric Norman
Hi Markus, Yes, you are right, the existing usermgmt bundle doesn't handle that use case. We could probably add that feature to the usermgmt bundle with a patch and a new release of the usermgmt bundle. To reset the password in a secure way, I am thinking of something like this: 1. A new

Re: Reset user pwd

2011-04-30 Thread Eric Norman
One more thing. It probably makes sense to allow the admin user (or group) to use the existing 'changePassword' servlet without supplying the old password. Can you file a new bug report for that? Regards, Eric On Sat, Apr 30, 2011 at 12:05 PM, Eric Norman eric.d.nor...@gmail.comwrote: Hi

Re: Creating usersgroups

2011-05-02 Thread Eric Norman
Hi Markus, Thanks for reporrting your findings. My quick take is: no, that is not on purpose. It looks like a bug to me. Please file a new issue in jira. I can try to take a look at it later today or tomorrow. Regards, Eric On Mon, May 2, 2011 at 2:38 AM, Markus Joschko

Re: Reset user pwd

2011-05-07 Thread Eric Norman
for the PW reset (digest etc) is still kept in one place. WDYT? Regards, Markus On Sat, Apr 30, 2011 at 9:05 PM, Eric Norman eric.d.nor...@gmail.com wrote: Hi Markus, Yes, you are right, the existing usermgmt bundle doesn't handle that use case. We could probably add that feature

Re: Reset user pwd

2011-05-18 Thread Eric Norman
at 11:29 AM, Eric Norman eric.d.nor...@gmail.comwrote: Hi Markus, Yes, that is a good point. I was reviewing the open issues and it looks like we already have an issue (SLING-1555https://issues.apache.org/jira/browse/SLING-1555) requesting OSGi services for the user management actions

Re: creating or giving users full write access?

2011-07-27 Thread Eric Norman
Hi Craig, The permissions in the jackrabbit implementation are inherited from the parent, so if you grant the permissions at the root or some other parent folder, it applies to the children as well. A quick way to see what privileges in effect for a node to to view the effective permissions json

Re: Regarding user manager sample UI compatibility

2011-08-09 Thread Eric Norman
Hi Anuj, The sling jackrabbit server bundle was updated to use jackrabbit 2.2.5 for SLING-2044 https://issues.apache.org/jira/browse/SLING-2044 which is scheduled to be released in version 2.1.2 of that bundle. Since it it not yet a released bundle, you could try the building it locally and use

Re: JsonQueryServlet NullPointerException on Simple XPATH Query

2011-12-04 Thread Eric Norman
Per SLING-2226 (see [1] ) usage of the JsonQueryServlet is discouraged. As to the cause of this NPE, I believe [2] is the revision of that class that you are using. On line 193 of that file where the NPE was thrown, it looks like either the row returned by the query was null or the row didn't

Re: JsonQueryServlet NullPointerException on Simple XPATH Query

2011-12-05 Thread Eric Norman
be very useful. On 12/4/11 12:20 PM, Eric Norman eric.d.nor...@gmail.com wrote: Per SLING-2226 (see [1] ) usage of the JsonQueryServlet is discouraged. As to the cause of this NPE, I believe [2] is the revision of that class that you are using. On line 193 of that file where the NPE

Re: SysXML content importer

2011-12-28 Thread Eric Norman
If I recall correctly, I believe the :contentType value for that system view sample file should be jcr.xml instead of xml. On Wed, Dec 28, 2011 at 12:38 PM, Christian Sprecher kindofw...@gmail.comwrote: Hi all I am trying to import a JCR System XML (see attached sample.xml), using this

Re: SysXML content importer

2012-01-10 Thread Eric Norman
? Should I generate an OSGI bundle? Cheers Chris On Wed, Dec 28, 2011 at 11:47 PM, Eric Norman eric.d.nor...@gmail.com wrote: If I recall correctly, I believe the :contentType value for that system view sample file should be jcr.xml instead of xml. On Wed, Dec 28, 2011 at 12:38 PM

Re: securing SlingPostServlet

2012-06-24 Thread Eric Norman
I usually try to avoid using the nt:unstructured node type (and anything similar) to prevent issues where an authorized user is able to add unexpected content to the repository. If you define JCR node types you can explicitly declare what properties and child nodes are allowed along with some

Re: Redirect User after deleting his account.

2012-07-22 Thread Eric Norman
Hi Chris, I believe you should be able to just redirect to the logout servlet and pass it the resource you want to go to after the logout is processed. The logout servlet will clear out the old auth info and the redirect to your target resource. For example, something like this:

Re: letting resourceSuperType's script to handle the request before/after current script

2012-07-23 Thread Eric Norman
Maybe you can just forward the request and specify a different resourceType? Something like this: sling:forward resource=${resource} resourceType=sling/servlet/default/ On Mon, Jul 23, 2012 at 11:28 AM, sam ” skyn...@gmail.com wrote: Hey, I have: /apps/image/base

Re: Sling and html templates?

2012-09-08 Thread Eric Norman
There are probably numerous ways to do that depending on what style of framework you prefer. If you want to use simple esp scripts (jsp would be similar), you can delegate rendering to another script by using the sling.include(..) techniques, For example, the usermanager-ui sample (see [1]) has

Re: Avoiding to show acls, users and groups to anonymous

2012-09-16 Thread Eric Norman
Instead of denying rights to the everyone group, deny rights to the anonymous principal instead. Like this: curl -FprincipalId=anonymous -Fprivilege@jcr:readAccessControl=denied http://admin:admin@localhost:8080/.modifyAce.html Regards, Eric On Sun, Sep 16, 2012 at 11:40 AM, Sandro Boehme

Re: Something like a jcr:execute privilege?

2012-09-16 Thread Eric Norman
I usually just do my own access check inside each script that is updating something using the PrivilegesInfo class (see [1]). For example, something like this: % var privilegesInfo = new Packages.org.apache.sling.jcr.jackrabbit.accessmanager.PrivilegesInfo(); if

Re: defining a new primary node type on a fly

2012-10-17 Thread Eric Norman
...@adobe.comwrote: On 13.10.2012, at 00:37, Eric Norman eric.d.nor...@gmail.com wrote: I'd agree that using unstructured types can be useful for prototyping when the final structure is changing frequently. But I would be cautious about that approach for a production system. Unstructured node types

Re: User Management docs

2013-03-21 Thread Eric Norman
See: http://sling.apache.org/documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html That should get you started. Regards, Eric On Thu, Mar 21, 2013 at 9:07 AM, Fabian Christ christ.fab...@googlemail.com wrote: 2013/3/21 Fabian Christ christ.fab...@googlemail.com: I am

Re: adding nodes programmatically: Exc

2013-06-02 Thread Eric Norman
The child node created by your addNode(name) call has a node type that does not declare sling:resourceType as an allowed property for the node. So you would either need to use the addNode variant (see [1]) that specifies a primary nodetype for the new node that does allow that property, or add a

Re: Managing Permissions using Sling

2013-08-11 Thread Eric Norman
Hi Anjan, It does look like something is wrong there. Please go ahead and open a new JIRA issue with your findings. Patches are also welcome if you have a proposal for how to fix the bug. Regards, Eric On Sat, Aug 10, 2013 at 2:20 AM, anjan poliset...@gmail.com wrote: I am using Sling's

Custom error handling scripts that consider the request file extension?

2018-08-09 Thread Eric Norman
Does anyone have a convenient existing solution for error handling that considers the incoming request file extension when resolving which script to use to render the error response? For example, I am expecting that a request to http://localhost:8080/bogus.json should return a JSON response with

Re: Unable to start o.a.sling.starter-10 with java 10

2018-07-14 Thread Eric Norman
Ah, ok. Yes it does start with the --add-modules java.se.ee argument added. On Sat, Jul 14, 2018 at 12:02 AM, Karl Pauls wrote: > can you try again with > > java —add-modules java.se.ee > > ? > > regards, > > Karl > > On Saturday, July 14, 2018, Eric Norman w

Unable to start o.a.sling.starter-10 with java 10

2018-07-13 Thread Eric Norman
Is anyone else having troubles with staring o.a.sling.starter-10 with a java 10 JRE? The release notes for sling 10 indicated that java 10 was supported, but I get the following error when attempting to startup. I get now errors when using a java8 JRE. ~/Downloads $

Re: users@sling.apache.org

2018-09-22 Thread Eric Norman
Are you using sling standalone which has an embedded jetty servlet container inside it? If so, then think the general approach for putting a httpd server in front of a jetty based server would be to use mod_proxy as a reverse proxy. You should be able to do a web search for "jetty mod_proxy" to

Re: ACE Restrictions with jackrabbit.accessmanager

2018-11-16 Thread Eric Norman
Hi Stefan, I took a look at the code and it seems that support for read/write of restrictions on the ACE has not yet been implemented in the sling jackrabbit.accessmanager REST operations (and elsewhere). However, it looks like adding support for read/write of ACE restrictions would not be

Re: [question] 2 sling instances behind one apache server sharing 1 session

2018-12-11 Thread Eric Norman
Please note that I have not tried to set something like this up, but I think I might prefer a proper SSO solution to reduce the fragility, but this is just my 2 cents. First, in order to use the same cookie for both sling instances, the cookie domain and path must be sent by the server from both

Re: ContentLoader Import problem

2018-12-06 Thread Eric Norman
Hi Jason, I would think the ContentLoader could be enhanced to provide more granular import logic than the "overwrite" and "overwriteProperties" directives provide. For a point of comparison, in a previous (non-sling) project I worked on we had a similar mechanism for importing content into a

Re: ContentLoader Import problem

2018-12-08 Thread Eric Norman
uld be a great addition. It may be hard to change the existing > options as that could break downstream use cases but I'm sure there's ways > of updating this. I took a look at the code and I'm not familiar enough > with oak in this use case to make that change. > > > > - Jas

Re: Executing xpath query with number in path

2019-08-29 Thread Eric Norman
If I recall correctly, if you want to use paths in XPath queries then you need to escape the path segments according to ISO9075 rules. For your referenced, there is a brief section about that on the wiki at [1]. Also, there is a utility class in jackrabbit that can do the ISO9075 path encoding

Re: OIDC or SAML2 for Sling

2019-12-11 Thread Eric Norman
Hi Cris, It should be possible. For one of my projects I had to implement something similar to support OAuth2 based logins to a sling based server using the facebook/google/twitter oauth support. I basically needed 3 main custom OSGi services to make it work: 1. A custom impl of

Re: OIDC or SAML2 for Sling

2019-12-11 Thread Eric Norman
the need to manage group membership at the > identity provider? > > Cris > > > > > > > > > On Dec 11, 2019, at 1:55 PM, Eric Norman wrote: > > > > Hi Cris, > > > > It should be possible. For one of my projects I had to implement > something >

Re: Sling XML Namespace

2020-02-14 Thread Eric Norman
http://www.jcp.org/jcr/1.0 it won't do that (of course it will still > validate xml syntax). > > John Kramer > Java Software Engineer > E-Commerce Web Team > e: john.kra...@panerabread.com <mailto:john.kra...@panera.com> > m: 314-435-2370 > > On 2/13/20, 23:22, &quo

Re: Sling XML Namespace

2020-02-13 Thread Eric Norman
Hi John, Would it be possible for you to provide any more details about the use cases where you would be using validated xml files instead of JSON files? Regards, Eric On Thu, Feb 13, 2020, 10:45 AM John Kramer wrote: > That's disappointing. Have you guys ever considered producing an XSD? >

Re: Content Security Policy Headers

2020-01-10 Thread Eric Norman
I set these headers (and HSTS header) with a simple servlet filter. Regards, Eric On Fri, Jan 10, 2020, 9:26 AM Jason E Bailey wrote: > If you're not familiar with them > > https://tools.ietf.org/html/rfc7231 > https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP > > I'm wondering if anyone

Incomplete OSGi manifest for Commons Johnzon 1.2.0?

2020-03-18 Thread Eric Norman
It looks to me that any bundle that attempts to depend on the new org.apache.sling.commons.johnzon:1.2.0 artifact produces a manifest for the new bundle that now makes it not activate when deployed to the sling runtime. I opened https://issues.apache.org/jira/browse/SLING-9218 for tracking the

Re: Setting Cache-Control in response Header while accessing JSON data

2020-03-18 Thread Eric Norman
Have you considered registering a custom servlet filter to set the response headers before forwarding on? https://sling.apache.org/documentation/the-sling-engine/filters.html On Wed, Mar 18, 2020 at 2:47 AM Saurabh Tiwari wrote: > Hello team, > > I trying to set the Cache Header in the

Re: How to test other System User Access

2020-07-08 Thread Eric Norman
Hi Cris, Have you already considered the apis provided by the PrivilegesInfo class from [1]? I would think that one of the PrivilegesInfo#getEffectiveAccessRights or PrivilegesInfo#getEffectiveAccessRightsForPrincipal apis should get you pretty close to your requirements. 1.

Re: SLING-9503 control over variable replacement in feature models

2021-01-11 Thread Eric Norman
gt; the "properties" section in your pom and mentioning the property in > >> "replacePropertyVariables" - but this needs to be an explicit decision. > >> > >> Regards > >> Carsten > >> > >> Am 10.01.2021 um 23:58 schrieb Eric

Re: Datasource selection

2020-12-15 Thread Eric Norman
For simplicity, you could probably let the framework do a bit more work for you and remove the need for the BundleContext field by using the reference bind method technique that sends you the service instance + the properties. For example, something like this: private Map dataSources = new

RE: SLING-9503 control over variable replacement in feature models

2021-01-10 Thread Eric Norman
I see that the changes from SLING-9503 changed the variable replacement in slingfeature-maven-plugin to be more limited. Is there an expectation that the substitutions for the limited "replacePropertyVariables" values would only use the property value hardcoded in the pom and ignore the system

Re: SLING-9503 control over variable replacement in feature models

2021-01-11 Thread Eric Norman
open it up to system properties via > the "properties" section in your pom and mentioning the property in > "replacePropertyVariables" - but this needs to be an explicit decision. > > Regards > Carsten > > Am 10.01.2021 um 23:58 schrieb Eric Norman:

Re: SLING-9503 control over variable replacement in feature models

2021-01-12 Thread Eric Norman
format which > would be incompatible to the current format and you can get the same > support via the properties section: > > > some-${name1} > > > and then use name2 in replacePropertyVariables. > > Regards > Carsten > > Am 11.01.2021 um 19:12 schrieb Eri

Re: Stopping Apache Sling Launchpad upon exception in OSGi bundle

2021-04-27 Thread Eric Norman
Hi Michael, I don't believe there is currently any configuration for the Apache Felix Jetty Based Http Service that would do that automatically. It seems to me that there are a couple of options that you may consider: 1. A "fail before startup" solution where you could utilize some other

Re: Sling/Felix JDBC Connection Pool problem

2021-03-01 Thread Eric Norman
is seemingly found and DB > interaction works. > But from an architectural perspective, a JSP is obviously not the place > where database code should be placed... > > Question is, how can access to the driver be achieved from an OSGi bundle? > > Best, > Juerg > > >

Re: Sling/Felix JDBC Connection Pool problem

2021-02-26 Thread Eric Norman
I'm not using JDBC datasources personally, but can you clarify in what context your client code is running? In general the @Reference annotations (both the older felix.scr ones and the newer standardardized annotations from OSGi R6 specification) are only going to work when they are within a

Re: Starting a FAR with the Sling feature launcher without network access

2022-03-16 Thread Eric Norman
I haven't looked too closely at this, but if I recall correctly, when using the launcher with a .far it seemed like the logged count of local artifacts was more than double the number before so I'm not sure if it is ignored completely? It seemed like it was counting the artifacts inside the .far

Re: Server-Side Testing

2022-08-23 Thread Eric Norman
Hi Andy, What I usually do for debugging/inspecting the pax exam instance is to add optional configuration to enable remote debugging (see [1]). Then you can set a breakpoint in your test code and it will stop there for you to take a look around. One example of this is at: 1,

Re: Server-Side Testing

2022-09-26 Thread Eric Norman
a file node in Sling. > I am wondering if there is a way with PaxExam to do that with a direct API > exam as my tests are not there to test the REST Api but rather to make sure > my code is working? > > Anyhow Jsoup will work fine if it is the only way. > > - Andy > >

Re: Re: Sling 12 issue

2023-04-12 Thread Eric Norman
Hi Rahul, The launcher script allows you to utilize the JAVA_OPTS environment variable to supply java remote debugging arguments to the jvm. For example, to set the env variable and run the launcher with a one-line subshell, you can execute something like this to open port 5000 for remote

Re: Re: Re: Sling 12 issue

2023-04-18 Thread Eric Norman
rds, Eric On Tue, Apr 18, 2023 at 6:21 AM Rahul Rupani wrote: > On 2023/04/12 15:49:23 Eric Norman wrote: > > Hi Rahul, > > > > The launcher script allows you to utilize the JAVA_OPTS environment > > variable to supply java remote debugging arguments to the jvm. > >

Re: Re: CustomNodeType on startup in Sling12

2024-02-07 Thread Eric Norman
Hi Rahul, One more clarification please: Is your question about how to declare your own custom node types in the sling feature model? Or is this specific to the builtin nodetypes from jackrabbit-filevault? Regards, Eric On Wed, Feb 7, 2024 at 11:08 AM Eric Norman wrote: > Hi Rahul, >

Re: Re: CustomNodeType on startup in Sling12

2024-02-07 Thread Eric Norman
Hi Rahul, Your description wasn't clear to me, but can we assume that the node type you are using "vlt:PackageDefinition" is coming from the jackrabbit-filevault bundle? I'm not an expert on jackrabbit-filevault, but a quick search of their codebase suggests that the filevault nodetypes are