Grouper UI csrf xsrf prevention

Similar documents
Open Source Used In TSP

HALCoGen TMS570LS31x Help: example_sci_uart_9600.c

Ecma International Policy on Submission, Inclusion and Licensing of Software

ColdFusion Builder 3.2 Third Party Software Notices and/or Additional Terms and Conditions

System Log NextAge Consulting Pete Halsted

Ecma International Policy on Submission, Inclusion and Licensing of Software

Open Source Used In Cisco Configuration Professional for Catalyst 1.0

Preface. Audience. Cisco IOS Software Documentation. Organization

ANZ TRANSACTIVE MOBILE for ipad

Intel Stress Bitstreams and Encoder (Intel SBE) 2017 AVS2 Release Notes (Version 2.3)

pyserial-asyncio Documentation

iwrite technical manual iwrite authors and contributors Revision: 0.00 (Draft/WIP)

ProgressBar Abstract

Table of Contents Overview...2 Selecting Post-Processing: ColorMap...3 Overview of Options Copyright, license, warranty/disclaimer...

Documentation Roadmap for Cisco Prime LAN Management Solution 4.2

IETF TRUST. Legal Provisions Relating to IETF Documents. Approved November 6, Effective Date: November 10, 2008

Package fst. December 18, 2017

HYDROOBJECTS VERSION 1.1

Static analysis for quality mobile applications

AccuTerm 7 Internet Edition Connection Designer Help. Copyright Schellenbach & Assoc., Inc.

MUMPS IO Documentation

NemHandel Referenceklient 2.3.1

IETF TRUST. Legal Provisions Relating to IETF Documents. February 12, Effective Date: February 15, 2009

calio / form-input-nginx-module

openresty / array-var-nginx-module

Copyright PFU LIMITED 2016

Denkh XML Reporter. Web Based Report Generation Software. Written By Scott Auge Amduus Information Works, Inc.

Open Source Used In c1101 and c1109 Cisco IOS XE Fuji

LGR Toolset (beta) User Guide. IDN Program 24 October 2017

Copyright PFU LIMITED

About This Guide. and with the Cisco Nexus 1010 Virtual Services Appliance: N1K-C1010

Explaining & Accessing the SPDX License List

DAP Controller FCO

User Manual. Date Aug 30, Enertrax DAS Download Client

Fujitsu ScandAll PRO V2.1.5 README

NemHandel Referenceklient 2.3.0


MagicInfo Express Content Creator

Data Deduplication Metadata Extension

Open Source and Standards: A Proposal for Collaboration

The Cron service allows you to register STAF commands that will be executed at a specified time interval(s).

QuarkXPress Server Manager 8.0 ReadMe

US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Definiens. Image Miner bit and 64-bit Editions. Release Notes

LGR Toolset (beta) User Guide. IDN Program October 2016

Flask-Sitemap Documentation

Flask Gravatar. Release 0.5.0

Package fst. June 7, 2018

TWAIN driver User s Guide

DAP Controller FCO

Internet Connection Guide

Watch 4 Size v1.0 User Guide By LeeLu Soft 2013

Conettix Universal Dual Path Communicator B465

License, Rules, and Application Form

PageScope Box Operator Ver. 3.2 User s Guide

FLAMEBOSS 300 MANUAL

cs50.c /**************************************************************************** * CS50 Library 6 *

Enterprise Payment Solutions. Scanner Installation April EPS Scanner Installation: Quick Start for Remote Deposit Complete TM

@list = bsd_glob('*.[ch]'); $homedir = bsd_glob('~gnat', GLOB_TILDE GLOB_ERR);

iphone/ipad Connection Manual

Note: The version the Event service must be 1.10 or later (but less than 3.0.0).

LabVIEW Driver. User guide Version

User Guide. Calibrated Software, Inc.

FLAME BOSS 200V2 & 300 MANUAL. Version 2.6 Download latest at FlameBoss.com/manuals

HYDRODESKTOP VERSION 1.4 QUICK START GUIDE

RPly Documentation. Release Alex Gaynor

Navigator Documentation

Distinction Import Module User Guide. DISTINCTION.CO.UK

HIS document 2 Loading Observations Data with the ODDataLoader (version 1.0)

CSCE Inspection Activity Name(s):

An Easy Way to Split a SAS Data Set into Unique and Non-Unique Row Subsets Thomas E. Billings, MUFG Union Bank, N.A., San Francisco, California

Introduction. The Win32 OpenSSL Installation Group hopes that you enjoy this software and get many years of use out of it!

Programming Style & Firmware Standards

This file includes important notes on this product and also the additional information not included in the manuals.

Definiens. Image Miner bit and 64-bit Edition. Release Notes

SW MAPS TEMPLATE BUILDER. User s Manual

openresty / encrypted-session-nginx-module

Scott Auge

<!--Released: February > <!--====================================================================--> <!--March > <!--

PTZ Control Center Operations Manual

Dr. K. Y. Srinivasan. Jason Goldschmidt. Technical Lead NetApp Principal Architect Microsoft Corp.

This file includes important notes on this product and also the additional information not included in the manuals.

DoJSON Documentation. Release Invenio collaboration

TheGreenBow VPN Client ios User Guide

Hyperscaler Storage. September 12, 2016

Packet Trace Guide. Packet Trace Guide. Technical Note

Supported and Interoperable Devices and Softwares for the Cisco Secure Access Control System 5.2

SkyPilot OS Installation: Fedora Core 5

Taking the LPC800 into the delta quadrant :)

User Manual for Video Codec

SMS2CMDB Project Summary v1.6

Anybus Wireless Bridge Ethernet Bluetooth Access Point Product Guide

File Servant User Manual

Avaya VPN Client Software Release 10.05_100

NEC Display Solutions MultiProfiler for Linux x64 Versions Installation Guide

Management Software Web Browser User s Guide

Encrypted Object Extension

Installation. List Wrangler - Mailing List Manager for GTK+ Part I. 1 Requirements. By Frank Cox. September 3,

Tenable Hardware Appliance Upgrade Guide

Definiens. Tissue Studio Release Notes

Transcription:

Grouper UI csrf xsrf prevention Wiki Home Download Grouper Grouper Guides Community Contributions Developer Resources Grouper Website This is in Grouper 2.2 UI. btw, Ive heard this does not work with IE8. Logging Set this in log4j.properties for enhanced logging log4j.logger.edu.internet2.middleware.grouper.grouperui.csrf.csrfguardlogg er = DEBUG Legacy instructions These instructions install OWASP CSRF guard in the Grouper UI. These instructions are intended for Grouper v2.1, though it will probably work on v2.0, and could be adapted for previous versions as well. 1. Download the jar, note, this is from the mchyzer github clone 1.5. If you have Grouper UI v2.1.5 or less, then add this logging jar. Note, remember on upgrade to remove this temporary jar. 2. Put the jar(s) in the UI WEB-INF/lib dir 3. Put this in the grouper UI web.core.xml (or web.xml if not building again), below all of the existing <filter> tags.

<listener> <listener-class>org.owasp.csrfguard.csrfguardservletcontextlistener</liste ner-class> </listener> <listener> <listener-class>org.owasp.csrfguard.csrfguardhttpsessionlistener</listener -class> </listener> <servlet> <servlet-name>owaspjavascriptservlet</servlet-name> <servlet-class>org.owasp.csrfguard.servlet.javascriptservlet</servlet-clas s> </servlet> <servlet-mapping> <servlet-name>owaspjavascriptservlet</servlet-name> <url-pattern>/grouperexternal/public/owaspjavascriptservlet</url-pattern> </servlet-mapping> <filter> <filter-name>csrfguard</filter-name> <filter-class>org.owasp.csrfguard.csrfguardfilter</filter-class> </filter> <filter-mapping> <filter-name>csrfguard</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 4. Create conf/owasp.csrfguard.properties (which will go in WEB-INF/classes/Owasp.CsrfGuard.properties), which is the default properties file (extract from csrfguard.jar from META-INF/csrfguard.properties 5. Create conf/owasp.csrfguard.overlay.properties (which will go in WEB-INF/classes/Owasp.CsrfGuard.overlay.properties) org.owasp.csrfguard.logger=edu.internet2.middleware.grouper.grouperui.csrf.csrfguardlogger org.owasp.csrfguard.tokenperpage=false org.owasp.csrfguard.action.redirect.page=%servletcontext%/grouperexternal/ public/csrferror.html org.owasp.csrfguard.configuration.provider.factory=org.owasp.csrfguard.con fig.overlay.configurationoverlayproviderfactororg.owasp.csrfguard.configur ation.provider.factory=org.owasp.csrfguard.config.overlay.configurationove rlayproviderfactory

org.owasp.csrfguard.unprotected.defaultgrouper=%servletcontext%/ org.owasp.csrfguard.unprotected.grouperhome=%servletcontext%/home.do org.owasp.csrfguard.unprotected.grouperdir=%servletcontext%/grouper/* org.owasp.csrfguard.unprotected.grouperexternal=%servletcontext%/grouperex ternal/index.html org.owasp.csrfguard.unprotected.grouperexternalapphtml=%servletcontext%/gr ouperexternal/apphtml/* org.owasp.csrfguard.unprotected.grouperexternalpublic=%servletcontext%/gro uperexternal/public/* org.owasp.csrfguard.unprotected.grouperui=%servletcontext%/grouperui/ org.owasp.csrfguard.unprotected.grouperuiindex=%servletcontext%/grouperui/ index.html org.owasp.csrfguard.unprotected.grouperuiapphtml=%servletcontext%/grouperu i/apphtml/* org.owasp.csrfguard.unprotected.grouperi2mi=%servletcontext%/i2mi/* org.owasp.csrfguard.unprotected.grouperscripts=%servletcontext%/scripts/* org.owasp.csrfguard.unprotected.grouperindex=%servletcontext%/index.jsp org.owasp.csrfguard.unprotected.grouperowaspjavascript=%servletcontext%/gr ouperexternal/public/owaspjavascriptservlet org.owasp.csrfguard.unprotected.grouperstrutsbrowsestems=%servletcontext%/ browsestems.do org.owasp.csrfguard.unprotected.grouperstrutsbrowsestemscreate=%servletcon text%/browsestemscreate.do org.owasp.csrfguard.unprotected.grouperstrutsbrowsestemsfind=%servletconte xt%/browsestemsfind.do org.owasp.csrfguard.unprotected.grouperstrutsbrowsestemsmanage=%servletcon text%/browsestemsmanage.do org.owasp.csrfguard.unprotected.grouperstrutsbrowsestemsjoin=%servletconte xt%/browsestemsjoin.do org.owasp.csrfguard.unprotected.grouperstruts/browsestemssubjectsearch=%se rvletcontext%/browsestemssubjectsearch.do org.owasp.csrfguard.unprotected.grouperstrutsbrowsestemsall=%servletcontex t%/browsestemsall.do org.owasp.csrfguard.unprotected.grouperstrutserror=%servletcontext%/error. do org.owasp.csrfguard.unprotected.grouperstrutsfiltererror=%servletcontext%/ filtererror.do org.owasp.csrfguard.unprotected.grouperstrutshelp=%servletcontext%/help.do org.owasp.csrfguard.unprotected.grouperstrutslogin=%servletcontext%/login. do org.owasp.csrfguard.unprotected.grouperstrutslogout=%servletcontext%/logou t.do org.owasp.csrfguard.unprotected.grouperstrutspopulateallgroups=%servletcon text%/populateallgroups.do org.owasp.csrfguard.unprotected.grouperstrutspopulateassignnewmembers=%ser vletcontext%/populateassignnewmembers.do org.owasp.csrfguard.unprotected.grouperstrutspopulatechains=%servletcontex t%/populatechains.do org.owasp.csrfguard.unprotected.grouperstrutspopulatecopygroup=%servletcon

text%/populatecopygroup.do org.owasp.csrfguard.unprotected.grouperstrutspopulatecopygrouptostem=%serv letcontext%/populatecopygrouptostem.do org.owasp.csrfguard.unprotected.grouperstrutspopulatecopyotherstemtostem=% servletcontext%/populatecopyotherstemtostem.do org.owasp.csrfguard.unprotected.grouperstrutspopulatecopystem=%servletcont ext%/populatecopystem.do org.owasp.csrfguard.unprotected.grouperstrutspopulatecreategroup=%servletc ontext%/populatecreategroup.do org.owasp.csrfguard.unprotected.grouperstrutspopulatecreategroups=%servlet Context%/populateCreateGroups.do org.owasp.csrfguard.unprotected.grouperstrutspopulatecreatestem=%servletco ntext%/populatecreatestem.do org.owasp.csrfguard.unprotected.grouperstrutspopulatedebugprefs=%servletco ntext%/populatedebugprefs.do org.owasp.csrfguard.unprotected.grouperstrutspopulateeditgroup=%servletcon text%/populateeditgroup.do org.owasp.csrfguard.unprotected.grouperstrutspopulateeditgroupattributes=% servletcontext%/populateeditgroupattributes.do org.owasp.csrfguard.unprotected.grouperstrutspopulateeditstem=%servletcont ext%/populateeditstem.do org.owasp.csrfguard.unprotected.grouperstrutspopulatefindnewmembers=%servl etcontext%/populatefindnewmembers.do org.owasp.csrfguard.unprotected.grouperstrutspopulatefindnewmembersforstem s=%servletcontext%/populatefindnewmembersforstems.do org.owasp.csrfguard.unprotected.grouperstrutspopulategroupasfactor=%servle tcontext%/populategroupasfactor.do org.owasp.csrfguard.unprotected.grouperstrutspopulategroupmember=%servletc ontext%/populategroupmember.do org.owasp.csrfguard.unprotected.grouperstrutspopulategroupmembers=%servlet Context%/populateGroupMembers.do org.owasp.csrfguard.unprotected.grouperstrutspopulategrouppriviligees=%ser vletcontext%/populategrouppriviligees.do org.owasp.csrfguard.unprotected.grouperstrutspopulategroupsummary=%servlet Context%/populateGroupSummary.do org.owasp.csrfguard.unprotected.grouperstrutspopulategrouptypes=%servletco ntext%/populategrouptypes.do org.owasp.csrfguard.unprotected.grouperstrutspopulateindex=%servletcontext %/populateindex.do org.owasp.csrfguard.unprotected.grouperstrutspopulatejoingroups=%servletco ntext%/populatejoingroups.do org.owasp.csrfguard.unprotected.grouperstrutspopulatelistsavedgroups=%serv letcontext%/populatelistsavedgroups.do org.owasp.csrfguard.unprotected.grouperstrutspopulatelistsavedstems=%servl etcontext%/populatelistsavedstems.do org.owasp.csrfguard.unprotected.grouperstrutspopulatelistsavedsubjects=%se rvletcontext%/populatelistsavedsubjects.do org.owasp.csrfguard.unprotected.grouperstrutspopulatemanagegroups=%servlet Context%/populateManageGroups.do org.owasp.csrfguard.unprotected.grouperstrutspopulatemovegrouptostem=%serv letcontext%/populatemovegrouptostem.do org.owasp.csrfguard.unprotected.grouperstrutspopulatemovegroup=%servletcon text%/populatemovegroup.do

org.owasp.csrfguard.unprotected.grouperstrutspopulatemovescopieslinks=%ser vletcontext%/populatemovescopieslinks.do org.owasp.csrfguard.unprotected.grouperstrutspopulatemoveotherstemtostem=% servletcontext%/populatemoveotherstemtostem.do org.owasp.csrfguard.unprotected.grouperstrutspopulatemovestem=%servletcont ext%/populatemovestem.do org.owasp.csrfguard.unprotected.grouperstrutspopulatemygroups=%servletcont ext%/populatemygroups.do org.owasp.csrfguard.unprotected.grouperstrutspopulatestemmember=%servletco ntext%/populatestemmember.do org.owasp.csrfguard.unprotected.grouperstrutspopulatestempriviligees=%serv letcontext%/populatestempriviligees.do org.owasp.csrfguard.unprotected.grouperstrutspopulatesubjectsummary=%servl etcontext%/populatesubjectsummary.do org.owasp.csrfguard.unprotected.grouperstrutsuseraudit=%servletcontext%/us eraudit.do org.owasp.csrfguard.unprotected.groupersimplemembershipupdateimportexporte xportsubjectidscsv=%servletcontext%/grouperui/app/simplemembershipupdateim portexport.exportsubjectidscsv/* org.owasp.csrfguard.unprotected.groupersimplemembershipupdateimportexporte xportallcsv=%servletcontext%/grouperui/app/simplemembershipupdateimportexp ort.exportallcsv/* org.owasp.csrfguard.unprotected.grouperuiv2mainindex=%servletcontext%/grou perui/app/uiv2main.index org.owasp.csrfguard.unprotected.grouperuiv2mainfoldermenu=%servletcontext% /grouperui/app/uiv2main.foldermenu org.owasp.csrfguard.unprotected.grouperuiv2groupaddmemberfilter=%servletco ntext%/grouperui/app/uiv2group.addmemberfilter org.owasp.csrfguard.unprotected.grouperuiv2groupimportgroupexportsubmit=%s ervletcontext%/grouperui/app/uiv2groupimport.groupexportsubmit org.owasp.csrfguard.unprotected.grouperuiv2stemcopyparentfolderfilter=%ser vletcontext%/grouperui/app/uiv2stem.stemcopyparentfolderfilter org.owasp.csrfguard.unprotected.grouperuiv2stemcreategroupparentfolderfilt er=%servletcontext%/grouperui/app/uiv2stem.creategroupparentfolderfilter org.owasp.csrfguard.unprotected.grouperuiv2stemcreatestemparentfolderfilte r=%servletcontext%/grouperui/app/uiv2stem.createstemparentfolderfilter org.owasp.csrfguard.unprotected.grouperuiv2subjectaddtogroupfilter=%servle tcontext%/grouperui/app/uiv2subject.addtogroupfilter org.owasp.csrfguard.unprotected.grouperuiv2groupupdatefilter=%servletconte xt%/grouperui/app/uiv2group.groupupdatefilter org.owasp.csrfguard.unprotected.grouperuiv2groupcompositefilter=%servletco ntext%/grouperui/app/uiv2group.groupcompositefactorfilter org.owasp.csrfguard.unprotected.grouperuiv2stemaddmemberfilter=%servletcon text%/grouperui/app/uiv2stem.addmemberfilter org.owasp.csrfguard.unprotected.grouperuiv2externalentitiesaddgroupfilter= %servletcontext%/grouperui/app/uiv2externalentities.addgroupfilter org.owasp.csrfguard.unprotected.grouperuiv2subjectaddtostemfilter=%servlet Context%/grouperUi/app/UiV2Subject.addToStemFilter org.owasp.csrfguard.unprotected.grouperuiv2subjectaddtoattributedeffilter=

%servletcontext%/grouperui/app/uiv2subject.addtoattributedeffilter

6. Create WEB-INF/tld/csrfguard.tld <?xml version="1.0"?> <!-- The OWASP CSRFGuard Project, BSD License Eric Sheridan (eric@infraredsecurity.com), Copyright (c) 2011 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of OWASP nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0. xsd" version="2.0"> <tlib-version>1.2</tlib-version>

<jsp-version>2.0</jsp-version> <short-name>owasp CsrfGuard Tag Library</short-name> <uri>http://www.owasp.org/index.php/category:owasp_csrfguard_project/owasp.csrfguard.tld </uri> <tag> <name>token</name> <tag-class>org.owasp.csrfguard.tag.tokentag</tag-class> <body-content>empty</body-content> <attribute> <name>uri</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <tag> <name>token-name</name> <tag-class>org.owasp.csrfguard.tag.tokennametag</tag-class> <body-content>empty</body-content> </tag> <tag> <name>token-value</name> <tag-class>org.owasp.csrfguard.tag.tokenvaluetag</tag-class> <body-content>empty</body-content> <attribute> <name>uri</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <tag> <name>a</name> <tag-class>org.owasp.csrfguard.tag.atag</tag-class> <dynamic-attributes>true</dynamic-attributes> </tag> <tag> <name>form</name> <tag-class>org.owasp.csrfguard.tag.formtag</tag-class> <dynamic-attributes>true</dynamic-attributes>

</tag> </taglib> 7. Edit grouperexternal/apphtml/grouper.html Add this entry under all the existing js files <script src="../../grouperexternal/public/owaspjavascriptservlet"></script> 8. Create grouperexternal/public/csrferror.html. Note, would be nice to have this in externalized text... CSRF token is missing, <a href="../../">start over</a> 9. Edit grouperui/apphtml/grouper.html Add this entry under all the existing js files <script src="../../grouperexternal/public/owaspjavascriptservlet"></script> 10. Edit WEB-INF/grouperUi/templates/common/commonTaglib.jsp, add this line <%@ taglib uri="/web-inf/tld/csrfguard.tld" prefix="csrf" %> 11. Edit WEB-INF/grouperUi/templates/simpleMembershipUpdate/simpleMembershipUpdateImport.jsp, add this line below the form tag <input type="hidden" name="<csrf:token-name/>" value="<csrf:token-value uri="/grouper/grouperui/app/simplemembershipupdateimportexport.importcsv"/ >"/> 12. Edit jsp/head.jsp, add this line below the other script tags <script src="grouperexternal/public/owaspjavascriptservlet"></script> 13. Edit WEB-INF/grouperUi2/assetsJsp/commonBottom.jsp, add this below the script tags <script src="../../grouperexternal/public/owaspjavascriptservlet"></script> 14. Edit WEB-INF/grouperUi2/groupImport/groupImport.jsp FROM <form id="importgroupformid" enctype="multipart/form-data" method="post" > TO

<form id="importgroupformid" enctype="multipart/form-data" method="post" > <%-- note this wont work for token per page --%> <input type="hidden" name="<csrf:token-name/>" value="<csrf:token-value />"/> Note, you can test that it works by setting up a static HTML page to remove a member from a group, or you can comment out the JS include in the the head.jsp or other files and try to use the UI, you will get an error