Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Using xsodata service with SAP HANA XS Engine without authentication
To use an xsodata service with SAP HANA XS Engine without authentication, you need to configure specific access control files. The xsaccess file defines who is authorized to access the content exposed by a SAP HANA XS application package and what content should be displayed based on access permissions.
Note that to use the xsaccess file without credentials, you have to create an xssqlcc file (SQL Connection Configuration file) that establishes the database connection parameters for the XS application.
Required Files
For anonymous access to xsodata services, you need two essential configuration files ?
xsaccess File
The .xsaccess file controls authorization and authentication settings ?
{
"exposed": true,
"authentication": {
"method": "none"
}
}
xssqlcc File
The .xssqlcc file defines the SQL connection configuration for database access ?
{
"description": "SQL connection for anonymous access",
"propertyTable": "<SCHEMA_NAME>.<PROPERTY_TABLE>",
"sqlcc_name": "anonymous_connection"
}
Implementation Steps
To implement anonymous access to your xsodata service ?
1. Create the .xsaccess file in your XS application root directory
2. Create the .xssqlcc file to define database connection parameters
3. Ensure your .xsodata service file references the correct SQL connection
4. Deploy the application package to activate the changes
For more detailed implementation guidance, check out this thread: xsodata service without authentication
Conclusion
Configuring xsodata services without authentication requires proper setup of both xsaccess and xssqlcc files to enable anonymous access while maintaining secure database connections. This approach is useful for public-facing services that don't require user authentication.
