You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2020/02/23 20:06:00 UTC
[wicket] branch master updated (2dc9bd1 -> ef8049c)
This is an automated email from the ASF dual-hosted git repository.
papegaaij pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git.
from 2dc9bd1 [NO_ISSUE] roll an abstract class that contains common functionality for AJAX and Web-socket request handlers
new 2034316 WICKET-6747: updated summary with CSP
new ef8049c WICKET-6733: enable strict CSP by default
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/main/java/org/apache/wicket/mock/MockApplication.java | 2 ++
.../main/java/org/apache/wicket/protocol/http/WebApplication.java | 2 ++
wicket-user-guide/src/main/asciidoc/security/security_9.adoc | 8 +++-----
3 files changed, 7 insertions(+), 5 deletions(-)
[wicket] 01/02: WICKET-6747: updated summary with CSP
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
papegaaij pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 2034316f9fd7a834185790e60014b9be048d83db
Author: Emond Papegaaij <em...@topicus.nl>
AuthorDate: Sun Feb 23 20:45:05 2020 +0100
WICKET-6747: updated summary with CSP
---
wicket-user-guide/src/main/asciidoc/security/security_9.adoc | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/wicket-user-guide/src/main/asciidoc/security/security_9.adoc b/wicket-user-guide/src/main/asciidoc/security/security_9.adoc
index d9b77c3..74acf19 100644
--- a/wicket-user-guide/src/main/asciidoc/security/security_9.adoc
+++ b/wicket-user-guide/src/main/asciidoc/security/security_9.adoc
@@ -4,10 +4,8 @@ The central element of authorization mechanism is the interface _IAuthorizationS
Wicket natively supports role-based authorizations with strategies _MetaDataRoleAuthorizationStrategy_ and _AnnotationsRoleAuthorizationStrategy_. The difference between these two strategies is that the first offers a programmatic approach for role handling while the second promotes a declarative approach using built-in annotations.
-After having explored how Wicket internally implements authentication and authorization, in the last part of the chapter we have learnt how to configure our applications to support HTTPS and how to specify which pages must be served over this protocol.
-
-In the last paragraph we have seen how Wicket protects package resources with a guard entity that allows us to decide which package resources can be accessed from users.
-
-
+After having explored how Wicket internally implements authentication and authorization, we continued with how to configure our applications to support HTTPS and how to specify which pages must be served over this protocol.
+We've explored the protection Wicket offers against CSRF attacks with URL encryption and the _CsrfPreventionRequestCycleListener_. This was followed by an explanation of the Content Security Policy used by Wicket and how to tune this for your application.
+In the last paragraph we have seen how Wicket protects package resources with a guard entity that allows us to decide which package resources can be accessed from users.
[wicket] 02/02: WICKET-6733: enable strict CSP by default
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
papegaaij pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
commit ef8049cca3d3a44500874a8e4c66cd40f6f353f5
Author: Emond Papegaaij <em...@topicus.nl>
AuthorDate: Sun Feb 23 21:03:59 2020 +0100
WICKET-6733: enable strict CSP by default
---
wicket-core/src/main/java/org/apache/wicket/mock/MockApplication.java | 2 ++
.../src/main/java/org/apache/wicket/protocol/http/WebApplication.java | 2 ++
2 files changed, 4 insertions(+)
diff --git a/wicket-core/src/main/java/org/apache/wicket/mock/MockApplication.java b/wicket-core/src/main/java/org/apache/wicket/mock/MockApplication.java
index 3dbe4fb..d6bfa00 100644
--- a/wicket-core/src/main/java/org/apache/wicket/mock/MockApplication.java
+++ b/wicket-core/src/main/java/org/apache/wicket/mock/MockApplication.java
@@ -74,5 +74,7 @@ public class MockApplication extends WebApplication
// the core CSS causes noise (a head + link in every generated markup) in tests
// and isn't needed, because the markup isn't rendered by a browser
getResourceSettings().disableWicketCoreCSS();
+ // disable nonces, CSP is not needed anyway during tests
+ getCsp().blocking().disabled();
}
}
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
index f6f3bd2..d00b7f4 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
@@ -755,6 +755,7 @@ public abstract class WebApplication extends Application
getHeaderResponseDecorators()
.add(response -> new CSPNonceHeaderResponseDecorator(response, getCsp()));
mount(new ReportCSPViolationMapper(getCsp()));
+ getCsp().blocking().strict();
if (getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT)
{
@@ -764,6 +765,7 @@ public abstract class WebApplication extends Application
{
getResourceSettings().getResourceFinders().add(new Path(resourceFolder));
}
+ getCsp().blocking().reportBack();
}
setPageRendererProvider(WebPageRenderer::new);
setSessionStoreProvider(HttpSessionStore::new);