28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Make sure you have addressed the issues described in "Broken Authentication and Session Management"<br />

and "Insecure Direct Object References". In addition, check if a user is allowed to access a specific URL before<br />

actually executing the code behind that requested URL. Consider putting an authentication check in place for<br />

each JavaScript file before continuing to send any data back to the client's Web browser.<br />

Insufficient transport layer protection<br />

● Problem<br />

Without transport-layer protection, the user's network traffic can be monitored, and attackers can steal<br />

sensitive information such as logon credentials or credit-card data.<br />

● Solution<br />

Turn on transport-layer protection in <strong>SAP</strong> <strong>HANA</strong> XS; the procedure is described in the <strong>SAP</strong> <strong>HANA</strong> security<br />

guide.<br />

Invalidated redirects and forwards<br />

● Problem<br />

Web applications frequently redirect users to other pages or use internal forwards in a similar manner.<br />

Sometimes the target page is specified in an invalid (not permitted) parameter. This enables an attacker to<br />

choose a destination page leading to the possibility of phishing attacks or the spamming of search engines.<br />

● Solution<br />

To prevent invalidated redirects or forwards, application developers should validate the requested destination<br />

before forwarding, for example, by checking if the destination is present in a whitelist.<br />

XML processing issues<br />

● Problem<br />

There are several potential security issues related to processing XML as input or to generating XML as output.<br />

In addition, problems with related technologies (such as XSLT) can enable the inclusion of other (unwanted)<br />

files.<br />

● Solution<br />

Bear the following rules and suggestions in mind when processing or generating XML output:<br />

○ When processing XML coming form an untrusted source, disable DTD processing and entity expansion<br />

unless strictly required. This helps prevent Billion Laugh Attacks (Cross-Site Request Forgery), which can<br />

bring down the processing code and, depending on the configuration of the machine, an entire server.<br />

○ To prevent the inclusion (insertion) of unwanted and unauthorized files, restrict the ability to open files or<br />

URLs even in requests included in XML input that comes from a trusted source. In this way, you prevent<br />

the disclosure of internal file paths and internal machines.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Writing Server-Side JavaScript Applications<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!