on 02-06-2014 12:04 AM
I am trying to create some xsodata services. I have created a .xsaccess file at global folder level which has the following content:
{
"exposed": true,
"authentication" : null
}
I have a services folder inside my parent folder where I have created a test service. The content of the service is
service namespace "example.services" {
"TESTUSER1"."testdb" as "testdb";
}
But when I hit this url: <hostname:port>/example/services/example.xsodata/testdb I get a 403 error. To verify if my .xsaccess if working fine, I created a dummy html file in the same folder as example.xsodata service. If I hit that link, it works fine and does not ask me any authentication.
To extend it further, I added .xsaccess file in services folder and added the same content as that mentioned above. It still gives 403 error to my example.xsodata service. To try this even further, I made the services/.xsaccess to have this content
{
"exposed": true,
"authentication" : [{"method":"Basic"}]
}
This prompted me for username/password and when i entered the values, it showed me the correct data as I expected.
I am utterly confused here because I want to make the services without authentication (for which i set authentication as null) and it is not working.
Please help me understand what am I missing here. Any help is really appreciable.
Hi Raghuveer,
The purpose of xsaccess file is that it enables you to specify who or what is authorized to access the content exposed by a SAP HANA XS application package and what content they are allowed to see.
If you want to use it without credentials, you will need to create a xssqlcc file
Check the below thread for your answer
SAP Hana Anonymous User? And HTTP POST method? | SAP HANA
And also read HANA Developer Guide, Section 3.5.3 for more info:
http://help.sap.com/hana/SAP_HANA_Developer_Guide_en.pdf
Regards,
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ,
I am using "SAP HANA Cloud Platform developer account"to create xsodata web services. Only I can access the xsodata web services. When my colleagues try to run the web service on their browser its giving below error.
{ "error": { "code": "", "message": { "lang": "en-US", "value": "Service exception: insufficient privilege."},"innererror":{"exception":"exception 1: no.71000258 (ptime\/query\/checker\/query_check.cc:2547)\n Not authorized\nNO exception throw location recorded. Stack generation suppressed.\n"}}
I have seen the post where I need to update the "_SYS_XS"."SQL_CONNECTIONS" table. But I am not authorized to _SYS_XS"."SQL_CONNECTIONS" table in my trial version. How can I resolve this issue?
Please anyone can help me here.
Regards,Shanthal
Hi,
Refer to the below link to solve the privilege issue.
The table is created in _SYS_BIC Schema .
Create a hdbrole file with the below sql privileges and assign it to your user and then you would be able to access the xsodata service.
role p1940xxtrial.dev.perslist.roles::user
{
sql object p1940xxtrial.dev.perslist.data::mymodel.person: SELECT, INSERT, UPDATE, DELETE; application privilege: p1940xxtrial.dev.perslist::Basic;
}
call HCP.HCP_GRANT_ROLE_TO_USER('p1940xxtrial.dev.perslist.roles::user','p1940xx')
Hope this solves your issue.
Thanks
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.