List:Internals« Previous MessageNext Message »
From:Vasil Dimov Date:November 5 2007 7:54am
Subject:Re: Restricting access to INFORMATION_SCHEMA tables
View as plain text  
Hi Sergei, thanks for your answer!

On Fri, Nov 02, 2007 at 18:34:02 +0100, Sergei Golubchik wrote:
[...]
> On Nov 02, Vasil Dimov wrote:
[...]
> > Is it possible for an INFORMATION_SCHEMA plugin to restrict the access to
> > the table that it provides? For example allow only the superuser to
> > SELECT from the table?
> 
> No. And it will never be :)
> We''re trying to follow the spirit of the standard here - all standard
> I_S tables are readable by anybody, the standart says
> 
>   GRANT SELECT ON TABLE xxxxx TO PUBLIC WITH GRANT OPTION;
> 
> If one doesn't have enough privileges to see the content, he won't see
> it - a particular value will be NULL or a row will be skipped.
> 
> For example, in INFORMATION_SCHEMA.TABLES one won't see rows for tables
> that he has no privileges on. In INFORMATION_SCHEMA.ROUTINES one can see
> routines he can execute, but routine body still may be NULL, if he
> doesn't have additional privileges, besides EXECUTE (*)
> 
> We're trying to follow these guideliines in the non-standard I_S tables.
> So, everybody will be able to select from your I_S table, but you can
> return an empty set to anybody but a superuser.

Yes, I see your point. Showing empty tables to non-superusers is what I
am going to do.

> You'll need to check privileges, which we don't have a good API for, at
> the moment. Will be fixed when WL#3859 is implemented.
[...]

Wow, 6.1! Can you give me some hint how to check for superuser in 5.1?
(I haven't yet looked into the code...).

Thanks!

-- 
Vasil Dimov
moc.elcaro@stripped        Software Developer @ Oracle/Innobase Oy
gro.DSBeerF@dv                Committer @ FreeBSD.org
gro.d5v@dv                    Home @ Sofia, Bulgaria

Attachment: [application/pgp-signature]
Thread
Restricting access to INFORMATION_SCHEMA tablesVasil Dimov2 Nov
  • Re: Restricting access to INFORMATION_SCHEMA tablesSergei Golubchik2 Nov
    • Re: Restricting access to INFORMATION_SCHEMA tablesVasil Dimov5 Nov
      • Re: Restricting access to INFORMATION_SCHEMA tablesSergei Golubchik5 Nov
        • Re: Restricting access to INFORMATION_SCHEMA tablesVasil Dimov5 Nov
          • Re: Restricting access to INFORMATION_SCHEMA tablesSergei Golubchik9 Nov
  • Re: Restricting access to INFORMATION_SCHEMA tablesSergei Golubchik26 Nov