Cross Site Request Forgery (CSRF) and Cross-Frame Scripting (XFS) protection in Lansa

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
aidom
Posts: 9
Joined: Sat Sep 16, 2017 1:03 am

Cross Site Request Forgery (CSRF) and Cross-Frame Scripting (XFS) protection in Lansa

Post by aidom »

Are there any Lansa best practices, documentation, and working examples for Cross Site Request Forgery (CSRF) and Cross-Frame Scripting (XFS) protection in Visual Lansa?
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: Cross Site Request Forgery (CSRF) and Cross-Frame Scripting (XFS) protection in Lansa

Post by Dino »

Hi

As I understand, usually this kind of protection/consideration is something you handle underneath LANSA, in the code internally created by the product, transparent to the user, versus something you would like to consider when touching LANSA code. I would really suggest you send this question to LANSA support, in particular if you have a vulnerabilities report or something like that, so a case can be opened and followed thru, which could end as an enhancement request.
aidom
Posts: 9
Joined: Sat Sep 16, 2017 1:03 am

Re: Cross Site Request Forgery (CSRF) and Cross-Frame Scripting (XFS) protection in Lansa

Post by aidom »

Thanks Dino ... will do!
BrendanB
Posts: 134
Joined: Tue Nov 24, 2015 10:29 am

Re: Cross Site Request Forgery (CSRF) and Cross-Frame Scripting (XFS) protection in Lansa

Post by BrendanB »

Hi Aidom,

Typically to mitigate against these attacks, server headers such as X-Frame-Origin can be set (most webservers allow configuration so that these headers are always sent, but as to *how* to do it -- depends very much on what webserver you are using). This is 'outside' of LANSA, as the webserver is typically either Apache or IIS.

The other method that can help is the use of CSP (Content Security Policy) Files.
Visual LANSA has had the ability to include these since SP2 of Version 14.
https://docs.lansa.com/14/en/lansa004/i ... 2_0165.htm

Visual LANSA ships with 3 different CSP (Low, Medium, Strict) files, but of course, these can (and should) be fine-tuned to your requirements.

A combination of these 2 things is usually enough to mitigate against CSRF and XFS.

Brendan.
aidom
Posts: 9
Joined: Sat Sep 16, 2017 1:03 am

Re: Cross Site Request Forgery (CSRF) and Cross-Frame Scripting (XFS) protection in Lansa

Post by aidom »

Thanks for the info BrendanB ... much appreciated!
Post Reply