0

I have a requirement wherein the oracle database contains packages which have important stored procedures and functions which should not be exposed to the client / customer. The client / customer will be provided with a user account having EXECUTE privilege.

Is there any way in which I can protect the IPR of my package, so that as a owner I should only be able to change the content in the package for future updates.

I tried logging with SYS as SYSDBA and I could see the package and the package body.

I am a newbie to oracle. Please guide me on the steps that I need to take to secure the packages from being copied.

2

I think the only solution to this case is wrap the PL/SQL code.

The WRAP Utility and the DBMS_DDL Package

  • 1
    All DBAs know how to use GOOGLE to find the code to UNWRAP your packages. – Michael Kutz May 15 '18 at 21:00
1

Is there any way in which I can protect the IPR of my package, so that as a owner I should only be able to change the content in the package for future updates.

The only way to protect the IP contents of your package is with a License Agreement or NDA or other legal means.

You can wrap the code (see @LuisSantos answer) to keep out "prying eyes", but you can't keep out a person that know how to use Google.

  • But is there a way in which I can only be the system admin and restrict any other user from being a system admin or granting administrative privileges. If this is possible then I will grant only EXECUTE privileges on the packages. I will be the one doing the installation of oracle and configuring the database. Wrap is a very good suggestion, but since it can also be unwrapped, I would prefer going with roles and privileges. – Rahul W May 16 '18 at 2:34
  • License agreement and NDA will be signed, but in a country like India, they are of very less use. – Rahul W May 16 '18 at 2:39
  • In Oracle, everything belongs to an owner. So, you as the owner of those packages can deposit them into your own schema = you log in with your own user name and create the packages. Then you grant the EXECUTE privilege on those packages only to those users (or roles) that are expected to use them. – Albert Godfrind May 16 '18 at 15:00
  • Note that users with the EXECUTE right will not see the actual source code. They will only see the package header, i.e. the signature of those functions and procedures you expose. – Albert Godfrind May 16 '18 at 15:01
  • Privileged users - i.e. the DBAs (those able to connect AS SYSDBA or those with the SYSTEM password) will be able to see the full source code of the package. You could "wrap" your code i.e. encode the package bodies before you load them. But as said, finding ways to unwrap your code is pretty much trivial. – Albert Godfrind May 16 '18 at 15:09
0

In Oracle, everything belongs to an owner. So, you as the owner of those packages can deposit them into your own schema: you log in with your own user name and create the packages. Then you grant the EXECUTE privilege on those packages only to those users (or roles) that are expected to use them.

Those users with only the EXECUTE right will not see the actual source code. They will only see the package header, i.e. the signature of those functions and procedures you expose.

Privileged users however - i.e. the DBAs (those able to connect AS SYSDBA or those with the SYSTEM password) will be able to see the full source code of the package. You could "wrap" your code i.e. encode the package bodies before you load them. But as said, finding ways to unwrap your code is pretty much trivial.

The bottom line is that there is no absolute foolproof way to protect your code via technical means from privileged users. If you deploy your code in a database operated by your customers, then nothing can prevent a DBA from looking at your code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.