If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Group access issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-24-05, 10:50
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Question Group access issue

Hi All - DB2 8.1.5 on AIX 5.2.0.0

I'm having trouble with assigning select privileges to
groups in my enviroment.

Its no problem creating the groups, assigning the privileges and
puttinng users into the groups

But it seems like the database doesn't scan for privileges
assigned to a persons group, only those assigned individually

I know it sounds strange, but I've tested it a dozen times.

Has anyone experienced anything similar ?
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #2 (permalink)  
Old 11-25-05, 03:43
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
group

we are using this for a long time
creating groups at os level / attach user to this group
only grants are given to groups..
grant select on xx.yy to group zzz
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 11-25-05, 03:55
juliane26 juliane26 is offline
Registered User
 
Join Date: Oct 2005
Posts: 109
Did you
- revoke all authorities from PUBLIC (what public can do, everybody can do)
- set the authentication to server (and not to client ?)
__________________
Juliane
Reply With Quote
  #4 (permalink)  
Old 11-25-05, 04:01
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Arrow I think so

My settings on the DBM:

Database manager authentication (AUTHENTICATION) = SERVER
Cataloging allowed without authority (CATALOG_NOAUTH) = NO
Trust all clients (TRUST_ALLCLNTS) = YES
Trusted client authentication (TRUST_CLNTAUTH) = CLIENT
Bypass federated authentication (FED_NOAUTH) = NO

And all public priviliges are on objects not related to this user
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health

Last edited by Tank; 11-25-05 at 04:02. Reason: Error
Reply With Quote
  #5 (permalink)  
Old 11-25-05, 09:20
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
I know it sounds crazy and you most likely already checked on it, but you might want to double check that those users are in those groups? We have never incountered such a problem. We DO NOT give access to PUBLIC nor to individual id's, only group access.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #6 (permalink)  
Old 11-25-05, 09:42
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Arrow Confusing - isn't it

I have checked, look at the attached files:

in 'dwlprk gruppen' you can see that user 'sta' belongs to the group 'dwlprk'

in 'dwlprk privileges' you can see the group 'dwlprk' having select
privileges on the view 'lpr.v_adm1977'

But then 'sta refused' speaks for itself !!
Attached Images
File Type: bmp dwlprk gruppen.bmp (558.9 KB, 39 views)
File Type: bmp dwlprk privileges.bmp (985.4 KB, 28 views)
File Type: bmp sta refused.bmp (611.4 KB, 28 views)
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health

Last edited by Tank; 11-25-05 at 09:43. Reason: typos
Reply With Quote
  #7 (permalink)  
Old 11-25-05, 11:15
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Somehow I don't trust those fancy GUI things.

Can you check that "grep dwlprk /etc/group" indeed shows you "sta" as a member?

What does "select * from syscat.tabauth where tabschema='LPR' and tabname='V_ADM1977'" give you?
Reply With Quote
  #8 (permalink)  
Old 11-28-05, 05:19
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Unhappy The Plot thickens

I've checked both (before) but here are the results:

db2inst2@viggo:/home/db2inst2> lsgroup DWLPRK
DWLPRK id=285 admin=false users=sta adms=jej,db2inst2 registry=files

and:

DB2INST2 | DWLPRK | G | LPR | V_ADM1977 | N N N N N Y N N

where the Y is yes to selectauth.

I'm thoroughly mystified - I think I'll call IBM, thanks for trying guys.
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #9 (permalink)  
Old 11-28-05, 05:39
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Are these errors in Static SQL ? eg. Stored Procedures ? or are these in dynamic SQL eg. Command window. ?

Cheers
Sathyaram
Reply With Quote
  #10 (permalink)  
Old 11-28-05, 05:52
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
The documentation says :

GROUP privileges are not checked for static INSERT statements.
GROUP privileges are not checked for static SELECT INTO statements.

But notes, these SIUD privleges for tables referred in static statements need to be given to users who bind the packages (or create SPs). Once the packages are created, a group can be grant EXECUTE permission on the package and that will not be a problem.

I guess you will face this issue primarily in Dev environment ..

HTH

Cheers
Sathyaram
Reply With Quote
  #11 (permalink)  
Old 11-28-05, 05:55
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Exclamation

Hi Sathyaram

No it works fine in static (SP's)

It doesn't work dynamically
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #12 (permalink)  
Old 12-21-05, 08:29
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Exclamation Solution is at hand

If you guys are interested

It turns out its a reverse uppercase problem.

If you assign privileges on windows to a group these
are upcased - no problem, I knew that and thus had created my
group on the Backend AIX with capitals.

But DB2 doesn't seem to grasp this.

If you create the groups with lowercase names on the backend -
the whole thing works. Even though the privileges and the group checks
are automatically upcased ???!!!

I'm pretty sure it's a bug

But at least it works now.
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #13 (permalink)  
Old 12-21-05, 08:38
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
It is always a little guy problem

Glad you figured it out.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On