Anonymous Connections in SAP HANA XSC

How-To Details

The following how to guide will show you how to enable an anonymous connection to your XSC application. In many cases you will of course not want anonymous access however there may be a case where it would be prudent or even required.

The simple steps should allow you to enable your entire project or a single package or sub-package for anonymous access.

Open your existing XSC application.

Add a new file into the package or sub-package that you wish to give anonymous access to. This can be the root application level where the .xsapp file is located or a lower level sub-package. The file you are adding should have the extension .xssqlcc

The content of the file should be.

{
"description" : "Anonymous SQL connection"
}

Now you will need to modify the .xsaccess file, if you have chosen to put the access in a lower level sub-package then you will need to create the .xsaccess as well, or copy it from the root level package.

In the .xsaccess file you will need to modify two lines. The first is the authentication line.

"authentication" : null,

The second is the anonymous connection line.

"anonymous_connection" : "package.name.of.file::AnonConn"

Now that you have changed those two lines you will need to open the XS Admin console. To access the console just alter the browser user to /sap/hana/xs/admin/ then navigate to the package containing your .xssqlcc and select the file.

Chose edit then enter the user login information, this will enable the anonymous connection to work for users going to that particular package of your application.