Notes:
This module makes it possible to run scripts written using Oracle's PL/SQL
Web Toolkit under Apache. This code is copyright Svante Sörmark,
svinto@ita.chalmers.se, and distributable under the same terms as Apache.
Available from http://www.ita.chalmers.se/~svinto/
REQUIREMENTS:
============
Apache 1.3.6
mod_perl 1.20
DBI
DBD::Oracle
CGI
Oracle PL/SQL Web Toolkit, any version should work. Tested with 1.1, 3.0 and
4,0. Check owa.initialize to find the version-number.
INSTALLATION
============
Unpack the file in a place where mod_perl can find it. I use
<apache-root>/lib/perl. The file contains owa/core.pm and owa/auth.pm.
ows/core.pm is (surprise!) the core of the module. ows/auth.pm is used for
providing some special authentication methods.
Next you need to edit your httpd.conf. Here is a sample configuration where
the database user and password is provided. Use this for applications that use
their own authentication-mechanisms, or that don't need any authenticaton.
<Location ...> can be anything you like.
<Location /ows/*>
SetHandler perl-script
PerlHandler ows::core
PerlSetVar DAD oas_public/secret@oracle1
</Location>
Next, a configuration where all users have to log in using their Oracle
user-id and password, and applications are executed under their schema in the
database. This means that they need execute permissions on the application,
proper synonyms set up and "create session" priveliges.
<Location /ows_db_auth/*>
SetHandler perl-script
PerlHandler ows::core
AuthName ows_db_auth
AuthType Basic
PerlAuthenHandler ows::auth_handler
Require valid-user
PerlSetVar DB_AUTH true
PerlSetVar DB oracle1
</Location>
The final metod is authentication using a custom database function that takes
the username and password as arguments and then returns zero for success and
non-zero for failure. the format of the DB_PROC_AUTH variable is:
<schema>.<function>:<oracle-userid>/<password>@<oracle-sid>. After successful
authentication, this information is used to execute the application.
<Location /ows_db_proc_auth/*>
SetHandler perl-script
PerlHandler ows::core
AuthName db_proc_auth
AuthType Basic
PerlAuthenHandler ows::auth
Require valid-user
PerlSetVar DB_PROC_AUTH y500.authen:oas_public/secret@oracle1
</Location>
BUGS
====
Probably lots.
- Headers get screwed up sometimes. I don't kow if this is my fault, Oracle's
or mod_perl's fault.
TODO
====
Contributions aare welcome!
- Invent a cool-sounding name :)
- Invent a name-space that fits into the CPAN-world.
- Authorization scheme not implemented.
- Protection realm not implemented.
- owa_util.ident_array and owa_image.point apparently need some other form
of input data. Not implemented.
- No transaction support. I've never used it, so it would be a bit hard for
me to implement it...
Changes:
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use