MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Security concept with ROLE

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 315
Topics: 49
Location: Germany

PostPosted: Fri Feb 02, 2018 7:13 am    Post subject: Security concept with ROLE Reply with quote

Dear all,

the DB2 Syntax diagram for DB2 zOS shows something like this:


GRANT SELECT ON anySchema.AnyView TO ROLE <anyRole>

I also found this:

CREATE ROLE <anyRole>.

Question: How can I add Users to this role <anyRole>?

Is this way "state of the art"?

Or is something like this better:

Setup in RACF <anyRACFGroup>
Connect User to <anyRACFGroup>
in DB2: GRANT SELECT ON anySchema.AnyView TO <anyRACFGroup>
This works for accessing the view by SPUFI.
But it doesn't work submitting any JCL, calling EXEC PGM=IKJEFT01 with BIND PACKAGE. This results to -551 and the remark, that UserXY doesn't have the privilege for anySchema.AnyView . (all other necessary privileges like BINDADD are available).



Background of my question: Our installation is very old. We have now to create a lot of new tables, views and we are thinking about to use the ROLE concept - but nobody really knows, how this works.

Which concept is state of the art?


And please: Don't advise me to ask any administrator. This doesn't help - our administrators are not really sure about the ROLE concept and asked me for help.

Thank you for your time,
bauer
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Feb 02, 2018 11:50 am    Post subject: Re: Security concept with ROLE Reply with quote

bauer wrote:
Dear all,

the DB2 Syntax diagram for DB2 zOS shows something like this:


GRANT SELECT ON anySchema.AnyView TO ROLE <anyRole>

I also found this:

CREATE ROLE <anyRole>.

Question: How can I add Users to this role <anyRole>?


Bauer,

Unless I am missing something isn't it as simple as granting?

Code:

grant role <role_name> to user <username>


and for a table

Code:

 grant select on table <table_name> to role <role_name>


bauer wrote:

Connect User to <anyRACFGroup>
in DB2: GRANT SELECT ON anySchema.AnyView TO <anyRACFGroup>
This works for accessing the view by SPUFI.
But it doesn't work submitting any JCL, calling EXEC PGM=IKJEFT01 with BIND PACKAGE. This results to -551 and the remark, that UserXY doesn't have the privilege for anySchema.AnyView . (all other necessary privileges like BINDADD are available).


If you are using IKJEFT01, then you need to grant access to the plans DSNTIAUL, DSNTEP02 to your users and they can run the queries in batch as long as they are already granted the table view.

bauer wrote:

Background of my question: Our installation is very old. We have now to create a lot of new tables, views and we are thinking about to use the ROLE concept - but nobody really knows, how this works.
bauer


What version of DB2 are you running?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 315
Topics: 49
Location: Germany

PostPosted: Fri Feb 02, 2018 12:27 pm    Post subject: Reply with quote

kolusu,

thank you for your reply and time.

This
Code:
grant role <role_name> to user <username>


works only for DB2 LUW, not DB2 zOS.

I did some addtional reading in the manuals and asked some other experts.

To connect the user to the role in DB2 zOS something like


Code:
CREATE TRUSTED CONTEXT


is necessary. Oversized for me.


The solution using the RACF groups is, to add the OWNER clause to the BIND PACKAGE Statement.

And the owner clause should be filled with the RACF group.

This was just tested by myself and this works.

About your comment regarding DSNTIAUL, DSNTEP02 and the GRANTs, not sure about the current settings.

Regarding your question about the DB2 Version: Probably my poor english and misunderstanding. "very old Installation" means the basic settings, procedure / process for binding packages / granting views was established 25 years ago, the db2 version is a 11 version.

So upgrades of course were done in the past for DB2 but no upgrades / reviews for the process how to bind / grant views and packages.

So the topic is closed.

Thank you once again for your time,
bauer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group