[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15834523#comment-15834523 ] Justin Edelson commented on SLING-6187: --- I looked through about half of the SlingPostProcessor implementations I could find on GitHub and those in AEM and could not find any other case of an @Suffix which would be impacted. [~fmeschbe] [~bdelacretaz] any comments on this latest patch? > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187c.diff, SLING-6187.patch, > SLING-6187-profile.diff, SLING-6187-profile.diff, SLING-6187-validating.diff > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15826747#comment-15826747 ] Alexander Klimetschek commented on SLING-6187: -- Ah, thanks for the test. This wasn't apparent from skimming over the code! An explicit comment might be great, since it would be crucial. We should have a look at the @Suffixes we know (in Sling and AEM) and ask the community to get a sense. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187c.diff, SLING-6187.patch, > SLING-6187-profile.diff, SLING-6187-profile.diff, SLING-6187-validating.diff > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15826741#comment-15826741 ] Justin Edelson commented on SLING-6187: --- And at least for the {{@Encrypted}} case in AEM, the postfix is removed from the modification list. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187c.diff, SLING-6187.patch, > SLING-6187-profile.diff, SLING-6187-profile.diff, SLING-6187-validating.diff > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15826738#comment-15826738 ] Justin Edelson commented on SLING-6187: --- [~alexander.klimetschek] the way the patch works is that: 1. Look for all the modifications which have an @ in them. Consider the part before the @ to be the "base path". 2. For each of those, identify if there is a item in the modification list with that "base path" 3. If there is one, fail. So if the modification list contains * {{foo}} + {{foo@Suffix}} - fail * {{foo}} - ok * {{foo@Suffix}} - ok I realized I forgot to include the test for the last case in the diff. Here it is: {code} public void testRemainingPostfixWithoutUnPostfixedIsSuccessful() { TestingResourceResolver resourceResolver = new TestingResourceResolver(); MockSlingHttpServlet3Request request = new MockSlingHttpServlet3Request("/test", null, null, null, null); request.setResourceResolver(resourceResolver); final PostOperation operation = new AbstractPostOperation() { @Override protected void doRun(SlingHttpServletRequest request, PostResponse response, List changes) throws RepositoryException { changes.add(Modification.onChange(ModificationType.CREATE, "/content/test@Postfix")); } }; HtmlResponse response = new HtmlResponse(); operation.run(request, response, new SlingPostProcessor[0]); assertTrue(response.isSuccessful()); assertTrue(resourceResolver.commitCalled); assertFalse(resourceResolver.revertCalled); } {code} > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187c.diff, SLING-6187.patch, > SLING-6187-profile.diff, SLING-6187-profile.diff, SLING-6187-validating.diff > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15826728#comment-15826728 ] Alexander Klimetschek commented on SLING-6187: -- Thanks [~justinedelson]. AFAICS, the patch [^SLING-6187c.diff] looks at all @Suffixes, thus breaking any cases where someone would legitimately try to create a {{foo@Suffix}} property in JCR. As [mentioned above|#comment-15746876], we can make it a bit more selective by only checking for suffixes where there is an according parameter without the suffix: * {{foo}} and {{foo@Suffix}} in parameters => do the validation * {{foo@Suffix}} => skip I was also thinking of post processors to indicate their suffix(es) in a service property and have the post servlet check for it explicitly. However, checking the modification list could work as well. Not sure if existing post processors would typically remove the @Suffix entries from the change list - if not, it would fail. The other alternative to avoid any backwards compatibility issues (at the cost of changing the request signature for the affected clients of the encryption use case or any other that wants to benefit from this new validation) would be to come up with something distinctively different, say {{@@@Suffix}}. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187c.diff, SLING-6187.patch, > SLING-6187-profile.diff, SLING-6187-profile.diff, SLING-6187-validating.diff > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15768151#comment-15768151 ] Dominik Süß commented on SLING-6187: Do we really want the request to define the PostProcessors? in my mind PostProcessing is an implementation detail that should not be wired to the request. When I was analyzing PostProcessors some years ago I always had the impression that we would probably need to have a better registry of postprocessing pipelines/chains and would make sure every step in the defined pipeline (e.g. registered for a certain path or resourcetype) would need to be satisfied. So instead of dynamically wiring postprocessors that are available by their service ranking we would have a defined pipeline naming steps where the postprocessors would provide the implementation for the steps and none of the steps can be unsatisfied (or would lead to implicit failure). > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187-validating.diff, SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15761651#comment-15761651 ] Justin Edelson commented on SLING-6187: --- While I agree this is unlikely, it is still a potentially breaking change that we should avoid IMHO. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187-validating.diff, SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15760252#comment-15760252 ] Alexander Klimetschek commented on SLING-6187: -- It wouldn't be prohibited in general, but just if 2 parameters are there, one is the property, the other is property + suffix. Pretty unlikely and you could have a per request flag to override this (or use ./ trickery). Alternatively we could come up with a new syntax, say ":property@Suffix" (leading : is already used as special parameter in the post servlet). > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187-validating.diff, SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15752250#comment-15752250 ] Justin Edelson commented on SLING-6187: --- bq. IIUC, the new validating patch requires a configuration of the sling post servlet bundle (for the ModificationValidatingPostProcessor) to set a pattern (like @Encrypted) that must not be present after all other processors have run through? Correct. bq. If we have a mechanism where the presence of a post processor that announces its @Suffix in the service properties itself is enough (see above), that additional configuration wouldn't be necessary. But that would mean all post processors handling custom suffixes need to be changed, otherwise their requests would fail. I'm not sure I understand this. We can't prohibit the @ symbol in the modification set in general since this is a legal JCR character, as I wrote in https://issues.apache.org/jira/browse/SLING-6187?focusedCommentId=15606583=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15606583. And if we rely on the service properties, that doesn't really help if the service is not present (the original issue). > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187-validating.diff, SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15752215#comment-15752215 ] Alexander Klimetschek commented on SLING-6187: -- IIUC, the new validating patch requires a configuration of the sling post servlet bundle (for the ModificationValidatingPostProcessor) to set a pattern (like @Encrypted) that must not be present after all other processors have run through? That seems feasible, albeit it does require the @Encrypted post processor module provider to ensure this configuration on the sling post servlet is also present. If they put the configuration in the same deployment package as the post processor, there is still a (very small?) chance that these are temporarily gone _together_, leading to the original issue. If we have a mechanism where the presence of a post processor that announces its @Suffix in the service properties itself is enough (see above), that additional configuration wouldn't be necessary. But that would mean all post processors handling custom suffixes need to be changed, otherwise their requests would fail. How many custom @Suffix based post processors do we know about? I would like to hear others opinion on that as well. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187-validating.diff, SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15748948#comment-15748948 ] Justin Edelson commented on SLING-6187: --- WDYT about a generic mechanism that checks the modification set's source strings against a regular expression, i.e. you would configure this with "^.*@Encrypted$" and if one of the modifications has a source maching that regex, the POST fails. This would happen before persisting. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15748802#comment-15748802 ] Alexander Klimetschek commented on SLING-6187: -- The core of the issue is that the use of @Suffix together with a post processor will write the properties if the processor is not there, because the post servlet itself does not know about the suffixes and post processors. We should fix that and have a mechanism where the post servlet knows about the suffix. Or something else if we don't want to touch the suffix behaviour. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15748386#comment-15748386 ] Justin Edelson commented on SLING-6187: --- Again, the use of the suffix is just a convention and not at all required (or IME all that common outside of the @Encrypted case in AEM, but others may have different exposure) for SlingPostProcessors, so I don't think we should be building a specific solution against them. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15746895#comment-15746895 ] Alexander Klimetschek commented on SLING-6187: -- The point is _additional_ parameter. The request already says "@Encrypted" and indicates what it wants. Adding a second one, with more arbitrary names, and which also works if left out, will not help the situation IMO. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15746882#comment-15746882 ] Justin Edelson commented on SLING-6187: --- bq. Why should an API client know that certain fields are handled by a post processor and also pass another parameter where it has to know that the set is called xyz? Note that addressing the profile is not different from addressing individual post processor names, it is an implementation detail. By this logic, the operation names are also implementation details. I disagree. The name is a abstract concept which is implemented by some particular thing with that name. bq. It should behave like an extra sling post operation, which I believe would fail if not present based on the operation name aka suffix name or prefix "trick" as in my proposal above. So is your specific concern that the parameter name refers to "post processors"? What if the POST contained something like: :requiredFeatures=encryptedProperties,audit Where each feature is just an name representing some capability. For now, this would map to post processors, but that could be changed in the future (for example, encryptedProperties could be implemented by the Post Servlet directly and that feature would always be available). > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15746876#comment-15746876 ] Alexander Klimetschek commented on SLING-6187: -- FWIW: All approaches require changes to the requests made by clients anyway. Except for this one: have the post servlet detect suffixes, have post processors indicate their suffixes in a service property, and make it fail if no such processor is found. Suffix detection means: - there is one property named "xyz" - AND there is another "xyz@" Then normal properties containing a @ are still possible. However, all post processors handling suffixes are required to be changed and advertise their suffix, otherwise their requests will fail. Upside would be that the request signature would not change at all. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15746852#comment-15746852 ] Alexander Klimetschek commented on SLING-6187: -- My view now is that a post processor that relies on the @Suffix mechanism where the properties would be written differently, without failure, if the processor is not active, is a problem of the processor. And slightly so for Sling encouraging this fragile approach. The Sling Post servlet should have a mechanism like I outlined above that gives a clear behavior, without a default behavior fallback, without any implementation specific references the client has to know about. Why should an API client know that certain fields are handled by a post processor and also pass another parameter where it has to know that the set is called xyz? Note that addressing the profile is not different from addressing individual post processor names, it is an implementation detail. It should behave like an extra sling post operation, which I believe would fail if not present, but as part of the normal sling post servlet mixed with normal properties. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187-profile.diff, > SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15746807#comment-15746807 ] Justin Edelson commented on SLING-6187: --- [~alexander.klimetschek] I'm trying to solve this problem in a generic way that can be reused across multiple PostProcessors (or, really based on [~bdelacretaz]'s feedback multiple 'sets' of PostProcessors). Certainly the AEM issue can be solved in a different way by changing how the encryption post processing is done to *not* rely on an @Suffix param being handled. That would be a very AEM specific (and likely non-backwards compatible change) which we should discuss in the proper context. Personally, I think the functionality described in this issue is important regardless of the specifics of the AEM encryption issue. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15746788#comment-15746788 ] Alexander Klimetschek commented on SLING-6187: -- What about this alternative? - these encrypted properties are prefixed with a value like j_ so they do not get handled by the normal SlingPostProcessor (or another prefix, configurable as per https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#omitting-some-parameters ) - that post processor in question only handles the ones with prefix to be sure they don't get written without it and throws an error otherwise (forces clients to change the request, alternatively a warning) - some new mechanism needs to be added to make the reuqest fail if these properties were not processed so the original request can fail if that post processor is offline IMO this needs to be solved on the interface layer (i.e. the request parameters etc.), and not be depending on the implementation (who knows, maybe we turn such a post processor into a core feature at some point). > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187-profile.diff, SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15745678#comment-15745678 ] Alexander Klimetschek commented on SLING-6187: -- [~fmeschbe] The problem is if you have an important "add-on" post processor, for example one that encrypts properties server side before storing them in the JCR, and for some reason it's not active (bundle restarting etc.). Since it's "add-on", it would happily store the unprocessed (e.g. unencrypted) value and return without an error. Maybe the source of the issue is the add-on character of such a post processor as in the encryption case. If it would be something that does not work at all if the post processor (or whatever pluggable interface) is not found, you automatically get an error. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15745626#comment-15745626 ] Justin Edelson commented on SLING-6187: --- [~bdelacretaz] I'm not comfortable adding a delimiter to the operation name since we've never said that you can't put a + (or any other character) in an operation name. I would be OK with a new parameter {{requiredPostProcessorProfile}} whose value corresponds to the configuration object you're suggesting. WDYT? [~fmeschbe] the use case is laid out in the issue description -- a POST request may depend upon the presence of one or more post processors. Currently, if these post processors are not present, there is no way for the client to ensure that the request is handled properly and this issue is about allowing the client to make assertions about the way the request is handled. Keying this off of resource type or node types won't work because this isn't about the target resource, it is about the POST request itself. Two different POSTs to the same resource (even with the same operation) may have a different set of expected post processors. >From my perspective, no additional implementation detail is leaked -- this is >no different than the extant {{:operation}} parameter. Just like we fail if >the {{:operation}} is not present, we should fail if there is a required post >processor which isn't present. I fail to see the difference. I have reverted the commit for now while I look at implementing the profile ("flavor" implies that post processors are tied to operations when they are orthogonal) suggestion from [~bdelacretaz]. IMHO, it appears at first glance to be adding significantly more complexity than is warranted. But if that is what is needed to obtain consensus, so be it. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15745591#comment-15745591 ] Felix Meschberger commented on SLING-6187: -- [~justinedelson] I share [~alexander.klimetschek]'s concerns (and sorry for being late to the party as well). Somehow this really smells very badly. It's like exposing some implementation and machine details. It ties clients into explicit implementations. Basically I allows for close coupling of clients with post processor implementations. It think this is wrong. Maybe I don't understand the use case fully (I just read the proposed implementation). What problem does this solution try to solve ? > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15745497#comment-15745497 ] Bertrand Delacretaz commented on SLING-6187: Sorry for chiming in late, just saw this now - how about using a different operation name to point to a specific list of post processors? I.e. instead of using {{myop}} use {{myop+myflavor}} where "myflavor" is a parameter for a configurable service that checks that all required post processors for "myflavor" are present. I think what's triggering alarms is pointing directly to a list of post processors, instead of a more abstract concept like "the processors required to do X". > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > Attachments: SLING-6187.patch > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15613238#comment-15613238 ] Alexander Klimetschek commented on SLING-6187: -- Could this check be based on the resource type? Then you'd configure the required post processors based on the RT (or node type), and it's completely server side. This lets me think however, that whatever the @suffix triggers in the first place (say an encryption of a property), which you want to guarantee, should probably also be defined purely server side. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15613159#comment-15613159 ] Justin Edelson commented on SLING-6187: --- Regarding bq. The name of the post processor is a server implementation detail and with a new request parameter existing clients would have to be changed. Maybe there is a other way to ensure it... I'd be happy to remove the use of the implementation class's simple name as a fallback and require that assertable post processors have the new service registration property mentioned above if that would help with your concerns. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15606631#comment-15606631 ] Justin Edelson commented on SLING-6187: --- I'm not sure what you mean by "already handled". Unless a SlingPostProcessor removes the parameter with the @suffix, a property with that name is happily created. Which _could_ be the desired behavior -- the Post servlet has no way of knowing unless the client tells it. Yes, I agree that this change would require existing clients to change *if* they want to make such an assertion. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15606603#comment-15606603 ] Alexander Klimetschek commented on SLING-6187: -- regarding 2): the @suffix is in a separate request parameter and this is already handled IIRC. The name of the post processor is a server implementation detail and with a new request parameter existing clients would have to be changed. Maybe there is a other way to ensure it... > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15606583#comment-15606583 ] Justin Edelson commented on SLING-6187: --- [~alexander.klimetschek] There's two problems I see with the approach you are describing (if I am in fact understanding it): 1) There's nothing that requires that SlingPostProcessors operate on @suffix parameters, so merely checking that the modification list doesn't contain any @suffix parameters after the operation is complete doesn't guarantee that a particular SlingPostProcessor was present. 2) It is totally legal for a JCR property name to contain an @ sign, so checking that the list of modifications for the @ sign is not valid. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15606487#comment-15606487 ] Alexander Klimetschek commented on SLING-6187: -- Having clients to specify that doesn't feel quite right - it should be a server side validation. What if the sling post servlet understands the @suffix (in this case @Encrypted) and detects if no post processor has handled it? > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15606111#comment-15606111 ] Rob Ryan commented on SLING-6187: - Thanks, sorry my confusion. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" request parameter understood > by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter > may contain a comma-delimited list of names (see below) which *must* be > available *at the time the request is processed* in order for the request to > be handled. Whether or not those processors _do_ anything or whether the > request succeeds or not is a separate question; this is just a preflight > check if you will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15606101#comment-15606101 ] Justin Edelson commented on SLING-6187: --- [~rr...@adobe.com] perhaps the description isn't clear -- the "list" is populated as part of the request. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" parameter understood by the > Sling Post Servlet named {{:requiredPostProcessors}}. This parameter may > contain a comma-delimited list of names (see below) which *must* be available > *at the time the request is processed* in order for the request to be > handled. Whether or not those processors _do_ anything or whether the request > succeeds or not is a separate question; this is just a preflight check if you > will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-6187) Provide a way for a POST request to assert a set of required SlingPostProcessors
[ https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15606079#comment-15606079 ] Rob Ryan commented on SLING-6187: - A single monolithic list is probably not the best thing here, maybe follow the service user style with 'amended' configurations to allow separate modules to specify required post processors. > Provide a way for a POST request to assert a set of required > SlingPostProcessors > > > Key: SLING-6187 > URL: https://issues.apache.org/jira/browse/SLING-6187 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Justin Edelson >Assignee: Justin Edelson > Fix For: Servlets Post 2.3.16 > > > I would like to add support for a new "special" parameter understood by the > Sling Post Servlet named {{:requiredPostProcessors}}. This parameter may > contain a comma-delimited list of names (see below) which *must* be available > *at the time the request is processed* in order for the request to be > handled. Whether or not those processors _do_ anything or whether the request > succeeds or not is a separate question; this is just a preflight check if you > will. > If any of the required SlingPostProcessors are not available, the request > will fail with a 501 error. > The name of a SlingPostProcessor will be defined by a newly defined service > registration property {{postProcessor.name}} and default to the simple name > of the SlingPostProcessor's implementation class if that property is not > defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)