Call: +44 (0)1904 557620 Call
Forum

Welcome, Guest. Please Login.
Apr 23rd, 2024, 12:25pm
News: Welcome to Pete Finnigan's Oracle security forum
Home | Help | Search | Members | Login
   Pete Finnigan's Oracle Security Forum
   Oracle Security
   Oracle Security
(Moderator: Pete Finnigan)
   securing database link
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Send Topic | Print
   Author  Topic: securing database link  (Read 2572 times)
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
securing database link
« on: Nov 27th, 2008, 3:45pm »
Quote | Modify

Hi,
I'm stuck with one problem for two days now, and looking for any possible help.
I have two databses, lets call them A and B. A is insecure. There should be a database link beetwen them so that users of database A can acces the information from database B. I would not like to store any passwords to database B in database A. The password should be passed with every single query. Moreover, I can not use the 'current_user authentication' as long as this option assumes usernames and passwords are the same.  
 
Is it possible? If so, can anyone let me know what to do? I would be greatful for any help.
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: securing database link
« Reply #1 on: Nov 27th, 2008, 10:19pm »
Quote | Modify

"There should be a database link between them so that users of database A can access the information from database B."
What is the end-to-end situation ? Are they accessing database A directly through SQL or is there an application ? What do you mean when you say that "A is insecure" ?
1) usernames/passwords for database A are well known or easily 'cracked'
2) database accounts in database A are highly privileged (eg SELECT_CATALOG_ROLE, SELECT ANY..).
3) the underlying data files, or backups/extracts, for database A are stored in an easily accessible location
 
The first option is to drive from the secure database B to the less secure database.  
 
Alternatively, since database A can't be trusted, I'd look at an application that supports concurrent connections to different databases. The application would have to 'simulate' joins between database objects on the different databases.
 
The only alternative I can think of is some web service style connection with userid and passwords as parameters. While the userids/passwords aren't stored in datafiles (which would address item 3 above), in 11g some bind variable information is exposed in v$sql so passwords passed in as bind variables may not be secure (and they are less secure if exposed as literals). Pre-11g, some trace events can expose bind variables too. So it is much less secure in regards to item 2.
 
 
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: securing database link
« Reply #2 on: Dec 2nd, 2008, 3:39am »
Quote | Modify

Another option is to define the database link, in the insecure database A, with a valid userid/password (for database B).  
 
For example, define a userid in B, such as LIMITED_DBLINK, with limited privileges, preferably, just Create Session and select on a limited set of views.
 
Define a VPD policy in B which requires the connection of LIMITED_DBLINK to originate from database A.  (Perhaps obtain the IP_ADDRESS via SYS_CONTEXT.)
 
But if your database A is insecure, then perhaps the IP_ADDRESS could be hacked.  (Not my area of expertise). It depends upon your level of tolerance.  If this solution sounds like too much risk, then Pete's ideas of a push from the secure database is best, or, alternatively, as he suggests, handle the query in a section of application logic which can be trusted with knowledge of B credentials.
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: securing database link
« Reply #3 on: Dec 18th, 2008, 12:15pm »
Quote | Modify

Hi,
In the end-to-end situation we have j2ee application which makes transfers between those two databases. What do I mean by saying A is insecure? usernames and passwords are easy to be cracked.  
 
The web service style connection seems to be interesting. Is there any way to parametrize the queries in pre-11g? I mean passing credentials with query.
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: securing database link
« Reply #4 on: Dec 28th, 2008, 12:17am »
Quote | Modify

"Is there any way to parametrize the queries in pre-11g? I mean passing credentials with query. "
In theory you can have a PL/SQL function returning a table or collection type, and query it with
 
"select * from table(func(:user,:pass))"
 
But complex data types don't work across DB links so I don't think it would help here, and as I mentioned before, bind variables aren't particularly secure.
 
"In the end-to-end situation we have j2ee application which makes transfers between those two databases. "
I'd have that application make two separate connections, one to each database. Or connect to the more secure and push to the less secure.
 
What do I mean by saying A is insecure? usernames and passwords are easy to be cracked.  
 
The web service style connection seems to be interesting.
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pages: 1  Reply | Notify of replies | Send Topic | Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board
  • PFCLScan PFCLScan

    Simply connect PFCLScan to your Oracle database and it will automatically discover the security issues that could make your Oracle database vulnerable to attack and to the potential loss of your data.

  • PFCL Obfuscate PFCLObfuscate

    PFCLObfuscate is the only tool available that can automatically add license controls to your PL/SQL code. PFCLObfuscate protects your Intellectual Property invested in your PL/SQL database code.

  • PFCLCode PFCLCode

    PFCLCode is a tool to allow you to analyse your PL/SQL code for many different types of security issues. PFCLCode gives you a detailed review and reports and includes a powerful colour syntax highlighting code editor

  • PFCLForensics PFCLForensics

    PFCLForensics is the only tool available to allow you to do a detailed live response of a breached Oracle database and to then go on and do a detailed forensic analysis of the data gathered.

  • Products We resell PFCLReselling

    PeteFinnigan.com Limited has partnered with a small number of relevant companies to resell their products where they enhance or compliment what we do

  • PFCLATK PFCLATK

    PFCLATK is a toolkit that allows detailed pre-defined policy driven audit trails for your Oracle database. The toolkit also provides for a centralised audit trail and centralised activity reporting

  • PFCLCookie PFCLCookie

    PFCLCookie is a useful tool to use to audit your websites for tracking cookies. Scan websites in a natural way using powerful browser driven scanner

  • PFCL Training PFCLTraining

    PFCLTraining is a set of expert training classes for you, aimed at teaching how to audit your own Oracle database, design audit trails, secure code in PL/SQL and secure and lock down your Oracle database.

  • PFCL Services PFCLServices

    Choose PFCLServices to add PeteFinnigan.com Ltd to your team for your Oracle Security needs. We are experts in performing detailed security audits, data security design work and policy creation

  • PFCLConsulting PFCLConsulting

    Choose PFCLConsulting to ask PeteFinnigan.com Limited to set up and use our products on your behalf

  • PFCLCustom PFCLCustom

    All of our software products can be customised at a number of levels. Choose this to see how our products can be part of your products and services

  • PFCLCloud PFCLCloud

    Private cloud, public cloud, hybrid cloud or no cloud. Learn how all of our services, trainings and products will work in the cloud

  • PFCLUserRights PFCLUserRights

    PFCLUserRights allows you to create a very detailed view of database users rights. The focus of the reports is to allow you to decide what privileges and accounts to keep and which to remove.

  • PFCLSTK PFCLSTK

    PFCLSTK is a toolkit application that allows you to provide database security easily to an existing database. PFCLSTK is a policy driven toolkit of PL/SQL that creates your security

  • PFCLSFTK PFCLSFTK

    PFCLSFTK is a toolkit that solves the problem of securing third party applications written in PL/SQL. It does this by creating a thin layer between the application and database and this traps SQL Injection attempts. This is a static firewall.

  • PFCLSEO PFCLSEO

    PFCLSEO is a web scanner based on the PFCLScan technology so that a user can easily scan a website for technical SEO issues