Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

CDS authorization error

$
0
0

Hi Experts,

 

I've created a hdbschema and a hdbdd file that I'm using to define all my database ojects. Also, I've created a hdbrole file, in order to define a role with full access to the schema, as below:

 

role scn::scn {

schema scn:SCN.hdbschema: CREATE ANY, ALTER, DROP, EXECUTE, SELECT, INSERT, UPDATE, DELETE, INDEX, TRIGGER, DEBUG, REFERENCES;

}

 

So far so good, using procedure GRANT_ACTIVATED_ROLE, I granted this role to 2 users: USER01 and USER02.

 

Later, since not all DDL is supported by CDS, I had to manually create a view in this schema (using the "create view" statement). I used to create this view USER01. Here starts my problem.

 

Just USER01 is able to select form this view, when I try to select from this view with USER02, I receive the following error:

 

Could not execute 'select * from "SCN"."scn::tables.myManuallView"'

SAP DBTech JDBC: [258]: insufficient privilege: Not authorized: line 1 col 29 (at pos 28)

 

Since this view is part of the schema SCN, I believe both users (USER01 and USER02) should be allowed to select the information, since both users have the role scn::scn role. Right?

 

As a workaround, I tried to grant permission manually to USER02, using USER01, but again, I receive the following error:

 

Could not execute 'grant select on "SCN"."scn::tables.myManuallView" to USER02'

Error: (dberror) 258 - insufficient privilege: Not authorized to grant the privilege on the view: line 1 col 30 (at pos 30)

 

Using GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT leeds to a different error:

 

Could not execute 'CALL "GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT"('SELECT', ...' in 316 ms 105 µs .

SAP DBTech JDBC: [258]: insufficient privilege: Not authorized to grant the privilege on the view: line 1 col 31 (at pos 30)

 

I belive all would be solved if I could somehow create this view using _SYS_REPO, but I'm not sure if this is possible.

 

Any ideas?

 

Thanks and regards,

Roberto Falk

 

PS: I've checked with the people responsible for CDS and currently on HANA SP9, the feature that I need is not supported. Will be supported on further releases (SP10 or SP11).

PS2: My HANA version is 1.00.093.00....


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>