Skip to content

Commit 7ae1aa6

Browse files
Merge pull request #196 from advanced-security/jeongsoolee09/XSJS-docs-update
Improve language of `XSJSAuthentication.md`
2 parents 83bc1e4 + cee4987 commit 7ae1aa6

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
# Broken XSJS authentication
1+
# Authentication not enforced in HANA XS application
22

3-
If you choose to use server-side JavaScript to write your application code, you need to bear in mind the potential for (and risk of) attack against authentication infrastructure. Leaks or flaws in the authentication or session management functions allow attackers to impersonate users and gain access to unauthorized systems and data.
3+
This HANA XS application does not enforce authentication on the requests it handles.
4+
5+
## Overview
6+
7+
SAP HANA XS applications are called via HTTP requests to process a connected HANA database, and this makes it critical to authenticate the sender of the request. Failing to do so allows attackers to impersonate users and gain access to underlying systems and data.
48

59
## Recommendation
610

7-
Use the built-in SAP HANA XS authentication mechanism and session management (cookies).
8-
- In `XS Advanced` authentication is enabled by default, the `authenticationMethod` property indicates which authentication will be applied. If set to `none` than all routes are not protected.
9-
- In `XS Classic` use the `authentication` keyword in the application's `.xsaccess` file to enable authentication and set it according to the method you want implement (`LogonTicket`, `Form`, or `Basic`) to ensure that all objects in the application path are available only to authenticated users.
11+
Use the built-in SAP HANA XS authentication mechanism and session management (cookies).
12+
- If `XS Advanced` is used, authentication **is enabled by default**, and the `authenticationMethod` property indicates which authentication will be applied. However, avoid setting the property to something else than `none`, as doing so turns off all authentication on all routes.
13+
- If `XS Classic` is used, authentication is **not enabled by default**, so the `authentication` property in the application's `.xsaccess` file should be set to enable authentication. Set the value of the property according to the method you want to implement (`LogonTicket`, `Form`, or `Basic`).
1014

1115
## Example
1216

13-
The following `xs-app.json` fragment shows disabled XSJS authentication.
17+
The fragment from an `xs-app.json` file shows the application in question having its authentication explicitly disabled.
1418

1519
```json
1620
{
1721
"welcomeFile": "index.html",
1822
"authenticationMethod": "none",
1923
...
20-
}
24+
}
2125
```
2226

2327
## References
2428

25-
* SAP: [Server-Side JavaScript Security Considerations](https://help.sap.com/docs/SAP_HANA_PLATFORM/d89d4595fae647eabc14002c0340a999/2040c1b7e478448cb9904c55ac06cac8.html).
26-
* XS Advanced: [Application Router Configuration](https://help.sap.com/docs/SAP_HANA_PLATFORM/4505d0bdaf4948449b7f7379d24d0f0d/5f77e58ec01b46f6b64ee1e2afe3ead7.html#authenticationmethod)
27-
* XS Classic: [Authentication](https://help.sap.com/docs/SAP_HANA_PLATFORM/b3d0daf2a98e49ada00bf31b7ca7a42e/a9fc5c220d744180850996e2f5d34d6c.html?version=2.0.03&locale=en-US#authentication)
28-
* Common Weakness Enumeration: [CWE-306](https://cwe.mitre.org/data/definitions/306.html).
29+
- SAP: [Server-Side JavaScript Security Considerations](https://help.sap.com/docs/SAP_HANA_PLATFORM/d89d4595fae647eabc14002c0340a999/2040c1b7e478448cb9904c55ac06cac8.html).
30+
- SAP: [XS Advanced Application Router Configuration](https://help.sap.com/docs/SAP_HANA_PLATFORM/4505d0bdaf4948449b7f7379d24d0f0d/5f77e58ec01b46f6b64ee1e2afe3ead7.html#authenticationmethod), relevant to XS Advanced applications.
31+
- SAP: [Application-Access File Keyword Options: Authentication](https://help.sap.com/docs/SAP_HANA_PLATFORM/b3d0daf2a98e49ada00bf31b7ca7a42e/a9fc5c220d744180850996e2f5d34d6c.html?version=2.0.03&locale=en-US#authentication), relevant to XS Classic applications.
32+
- Common Weakness Enumeration: [CWE-306](https://cwe.mitre.org/data/definitions/306.html).

0 commit comments

Comments
 (0)