这是indexloc提供的服务,不要输入任何密码
Skip to content

Adding documentation for Fetch Metadata, Cross-Origin Opener Poliy & Cross-Origin Embedder Policy #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 7, 2020

Conversation

salcho
Copy link
Contributor

@salcho salcho commented Aug 28, 2020

Hello Struts devs!

We're really proud to have contributed to Struts by adding Fetch Metadata (apache/struts#426) and COOP/COEP support (apache/struts#432) in the past few months while CSP is still being reviewed (apache/struts#430). This PR updates documentation to reflect the new interceptors (not CSP!), their parameters, usage and brief explanations of what these security mitigations are and how they work.

We hope this will motivate Struts developers to enable brand new security mitigations on their way forward :)

* Adding documentation for FM and COOP/COEP (#1)

* Fetch Metadata docs

* Added explanations of FM and COOP/COEP

* Add docs for COOP and COEP

* Update source/security/index.md

Co-authored-by: Sal <salchoman@gmail.com>

* Update source/security/index.md

Co-authored-by: Sal <salchoman@gmail.com>

* Removed extra white space

* Update source/core-developers/fetch-metadata-interceptor.md

Co-authored-by: Sal <salchoman@gmail.com>

* Update source/core-developers/fetch-metadata-interceptor.md

Co-authored-by: Sal <salchoman@gmail.com>

* Update source/core-developers/fetch-metadata-interceptor.md

Co-authored-by: Sal <salchoman@gmail.com>

* Update source/core-developers/fetch-metadata-interceptor.md

Co-authored-by: Sal <salchoman@gmail.com>

* Fixes based on PR comments

Co-authored-by: Giannis Chatziveroglou <gchatz@mit.edu>
Co-authored-by: Sal <salchoman@gmail.com>

* Fixes in interceptors table and individual interceptors files

* Update source/core-developers/coep-interceptor.md

Co-authored-by: Sal <salchoman@gmail.com>

* Update source/core-developers/coep-interceptor.md

Co-authored-by: Sal <salchoman@gmail.com>

Co-authored-by: Giannis Chatziveroglou <gchatz@mit.edu>
Co-authored-by: Sal <salchoman@gmail.com>
Copy link
Member

@yasserzamani yasserzamani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow! astonish work! 👏 Absolutely contribution motivates us and Struts needs especially regarding security improvements, thank you very much! 💯 🥇

Below a few nitpick but please also wait for others if I'm right with them.

## Examples

```xml
<interceptor name="coep" class="org.apache.struts2.interceptor.CoepInterceptor"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you've already defined and added it to struts-default.xml.defaultStack at here , this duplicate definition is not needed as far as I can remember but please wait if @apache/struts-committers acknowledge as well.

<interceptor name="coep" class="org.apache.struts2.interceptor.CoepInterceptor"/>

<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="defaultStack">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. I think it should be something like:

<action  name="someAction" class="com.examples.SomeAction">
	<interceptor-ref name="defaultStack">
		<param name="coepInterceptor.exemptedPaths">...
.
.
.
	</interceptor-ref>


<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="defaultStack">
<interceptor-ref name="coop">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(similar here)


<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="defaultStack">
<interceptor-ref name="fetchMetadata">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(similar here)

@gchatz22
Copy link

gchatz22 commented Aug 28, 2020

Thank you for your comments @yasserzamani ! Applied your changes and as said will also be waiting for @apache/struts-committers opinion

@lukaszlenart
Copy link
Member

LGTM 👍

@lukaszlenart lukaszlenart merged commit 85d7bbc into apache:master Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants