-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from Cognifide/feature/osgi-settings
Feature/osgi settings
- Loading branch information
Showing
25 changed files
with
298 additions
and
35 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
src/main/aem/jcr_root/apps/cognifide/secureaem/components/htmlLibraryManager/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:cq="https://www.day.com/jcr/cq/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="cq:Component" | ||
sling:resourceSuperType="cognifide/secureaem/components/abstractTest" | ||
testClass="com.cognifide.secureaem.tests.HtmlLibraryManagerTest"/> |
5 changes: 5 additions & 0 deletions
5
src/main/aem/jcr_root/apps/cognifide/secureaem/components/slingJsHandler/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:cq="https://www.day.com/jcr/cq/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="cq:Component" | ||
sling:resourceSuperType="cognifide/secureaem/components/abstractTest" | ||
testClass="com.cognifide.secureaem.tests.SlingJsHandlerTest"/> |
5 changes: 5 additions & 0 deletions
5
src/main/aem/jcr_root/apps/cognifide/secureaem/components/slingJspScriptHandler/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:cq="https://www.day.com/jcr/cq/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="cq:Component" | ||
sling:resourceSuperType="cognifide/secureaem/components/abstractTest" | ||
testClass="com.cognifide.secureaem.tests.SlingJspScriptHandlerTest"/> |
5 changes: 5 additions & 0 deletions
5
src/main/aem/jcr_root/apps/cognifide/secureaem/components/wcmFilter/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:cq="https://www.day.com/jcr/cq/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="cq:Component" | ||
sling:resourceSuperType="cognifide/secureaem/components/abstractTest" | ||
testClass="com.cognifide.secureaem.tests.WcmFilterTest"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/aem/jcr_root/etc/secureaem/html-library-manager/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:cq="https://www.day.com/jcr/cq/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" xmlns:nt="https://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="cq:Page"> | ||
<jcr:content | ||
jcr:description="Some OSGI settings are set by default to allow easier debugging of the application. These need to be changed on your publish and author productive instances to avoid internal information leaking to the public." | ||
jcr:primaryType="cq:PageContent" | ||
jcr:title="Html Library Manager" | ||
sling:resourceType="cognifide/secureaem/renderers/testRenderer" | ||
severity="MAJOR" | ||
url="https://docs.adobe.com/docs/en/aem/6-2/administer/security/security-checklist.html#OSGI%20Settings" | ||
urlDesc="Official AEM Security Checklist"> | ||
<testComponent | ||
jcr:primaryType="nt:unstructured" | ||
sling:resourceType="cognifide/secureaem/components/htmlLibraryManager" | ||
enabled="true"/> | ||
</jcr:content> | ||
</jcr:root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/aem/jcr_root/etc/secureaem/sling-js-handler/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:cq="https://www.day.com/jcr/cq/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" xmlns:nt="https://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="cq:Page"> | ||
<jcr:content | ||
jcr:description="Some OSGI settings are set by default to allow easier debugging of the application. These need to be changed on your publish and author productive instances to avoid internal information leaking to the public." | ||
jcr:primaryType="cq:PageContent" | ||
jcr:title="Sling Java Script Handler" | ||
sling:resourceType="cognifide/secureaem/renderers/testRenderer" | ||
severity="MAJOR" | ||
url="https://docs.adobe.com/docs/en/aem/6-2/administer/security/security-checklist.html#OSGI%20Settings" | ||
urlDesc="Official AEM Security Checklist"> | ||
<testComponent | ||
jcr:primaryType="nt:unstructured" | ||
sling:resourceType="cognifide/secureaem/components/slingJsHandler" | ||
enabled="true"/> | ||
</jcr:content> | ||
</jcr:root> |
17 changes: 17 additions & 0 deletions
17
src/main/aem/jcr_root/etc/secureaem/sling-jsp-script-handler/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:cq="https://www.day.com/jcr/cq/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" xmlns:nt="https://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="cq:Page"> | ||
<jcr:content | ||
jcr:description="Some OSGI settings are set by default to allow easier debugging of the application. These need to be changed on your publish and author productive instances to avoid internal information leaking to the public." | ||
jcr:primaryType="cq:PageContent" | ||
jcr:title="Sling JSP script Handler" | ||
sling:resourceType="cognifide/secureaem/renderers/testRenderer" | ||
severity="MAJOR" | ||
url="https://docs.adobe.com/docs/en/aem/6-2/administer/security/security-checklist.html#OSGI%20Settings" | ||
urlDesc="Official AEM Security Checklist"> | ||
<testComponent | ||
jcr:primaryType="nt:unstructured" | ||
sling:resourceType="cognifide/secureaem/components/slingJspScriptHandler" | ||
enabled="true"/> | ||
</jcr:content> | ||
</jcr:root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/aem/jcr_root/etc/secureaem/wcm-filter/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:cq="https://www.day.com/jcr/cq/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" xmlns:nt="https://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="cq:Page"> | ||
<jcr:content | ||
jcr:description="AEM WCM Filter should be disabled on publish" | ||
jcr:primaryType="cq:PageContent" | ||
jcr:title="AEM WCM Filter" | ||
sling:resourceType="cognifide/secureaem/renderers/testRenderer" | ||
severity="MAJOR" | ||
url="https://docs.adobe.com/docs/en/aem/6-2/deploy/configuring/osgi-configuration-settings.html#Day%20CQ%20WCM%20Debug%20Filter" | ||
urlDesc="Official Configuring AEM document"> | ||
<testComponent | ||
jcr:primaryType="nt:unstructured" | ||
sling:resourceType="cognifide/secureaem/components/wcmFilter" | ||
enabled="true"/> | ||
</jcr:content> | ||
</jcr:root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/com/cognifide/secureaem/tests/HtmlLibraryManagerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.cognifide.secureaem.tests; | ||
|
||
import com.cognifide.secureaem.AbstractTest; | ||
import com.cognifide.secureaem.Configuration; | ||
import com.cognifide.secureaem.markers.AuthorTest; | ||
import com.cognifide.secureaem.markers.PublishTest; | ||
|
||
public class HtmlLibraryManagerTest extends AbstractTest | ||
implements AuthorTest, PublishTest, OsgiConfigurationTest { | ||
|
||
public HtmlLibraryManagerTest(Configuration config) { | ||
super(config); | ||
} | ||
|
||
@Override public boolean doTest(String url, String instanceName) throws Exception { | ||
String configurationEndpoint = url | ||
+ "/system/console/configMgr/com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl.json"; | ||
String body = getJsonBodyOfOsgiConfiguration(configurationEndpoint, getUsernamePasswordCredentials(instanceName), instanceName); | ||
checkBooleanValue(getBooleanValueFromJson("htmllibmanager.minify", body), true, "Minify", | ||
instanceName); | ||
checkBooleanValue(getBooleanValueFromJson("htmllibmanager.gzip", body), true, "Gzip", instanceName); | ||
checkBooleanValue(getBooleanValueFromJson("htmllibmanager.debug", body), false, "Debug", | ||
instanceName); | ||
checkBooleanValue(getBooleanValueFromJson("htmllibmanager.timing", body), false, "Timing", | ||
instanceName); | ||
return getErrorMessages().isEmpty(); | ||
} | ||
} | ||
|
Oops, something went wrong.