home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / oracle / 1258 next >
Encoding:
Internet Message Format  |  1992-08-12  |  1.8 KB

  1. Path: sparky!uunet!olivea!sgigate!odin!mips!swrinde!gatech!paladin.american.edu!news.univie.ac.at!bmwf1f.bmwf.gv.at!hatzinger_m
  2. From: hatzinger_m@bmwf1f.bmwf.gv.at
  3. Newsgroups: comp.databases.oracle
  4. Subject: RE: ** ORACLE Forms security **
  5. Message-ID: <1992Aug12.141616.27@bmwf1f.bmwf.gv.at>
  6. Date: 12 Aug 92 13:21:32 GMT
  7. Organization: (Klaus-Michael Hatzinger), BMWF, Vienna, Austria
  8. Lines: 50
  9.  
  10.  
  11.  
  12. You can limit user access to your oracle database creating a special view 
  13. for your table which nows at run time, if it is running from SQL*Plus or IAP:
  14.  
  15.  
  16. 0. You need ORACLE V6
  17.  
  18. 1. Create your table (table_name)
  19.  
  20. 2. Create a view like
  21.  
  22.     CREATE VIEW view_name AS
  23.     SELECT *
  24.       FROM table_name
  25.      WHERE EXISTS (SELECT 1
  26.                      FROM sys.v_$session S,sys.v_$process P
  27.                     WHERE addr=paddr
  28.                       AND S.username=user
  29.                       AND (INSTR(program,'IAP') <> 0 OR command=3)
  30.                       AND terminal=USERENV('TERMINAL'))
  31.     WITH CHECK OPTION;
  32.  
  33. "command" includes the actual command (SELECT=3,INSERT,...)
  34. "program" includes the actual program name (IAP,SQLPLUS,...).
  35.  
  36.  
  37. 3. ORACLE-user "SYS" must give a "GRANT OPTION" on the virtual views
  38.  
  39.    GRANT SELECT ON v_$session TO PUBLIC WITH GRANT OPTION;
  40.    GRANT SELECT ON v_$process TO PUBLIC WITH GRANT OPTION;
  41.  
  42.  
  43. 4. Set grants only on the view for all your users
  44.  
  45.    GRANT SELECT,INSERT,UPDATE,DELETE ON view_name TO ......
  46.  
  47.  
  48. So they can update your database only in SQL*Forms (if it works on your 
  49. system too ?).
  50.  
  51.                                             GOOD LUCK !!
  52.  
  53. -- 
  54.  
  55. --------------------------------------------------------------------------------
  56. Klaus-Michael Hatzinger                            hatzinger_m@bmwf1f.bmwf.gv.at
  57. Federal Ministry of Science and Research
  58. Computer Center
  59. Vienna, Austria
  60.