Benutzer-Werkzeuge

Webseiten-Werkzeuge


dba:passwort_in_psql_schuetzen

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
dba:passwort_in_psql_schuetzen [2016/05/19 20:15] – [Vorbereitung] gpipperrdba:passwort_in_psql_schuetzen [2016/05/20 15:11] – [Passwörter und ähnliche Schlüssel in PL/SQL Packages schützen] gpipperr
Zeile 27: Zeile 27:
  
 Zusätzlicher Schutz: Zusätzlicher Schutz:
-  * Das zu schützende Package liegt in einem gesonderten Schema=> 12c Möglichkeit nützen das nur das Package explizit auf die eine Routine zu granten die das Package dann auch benötigt, nicht an den eigentlichen Applikationsuser.+  * Das zu schützende Package liegt in einem gesonderten Schema 
 +  * => 12c Möglichkeit nützen das nur das Package explizit auf die eine Routine zu granten die das Package dann auch benötigt, nicht an den eigentlichen Applikationsuser 
 +  * => 12c Feature "accessible by" ausnützen (d.h. die Routine kann nur in diesem Package verwandt werden!)
  
  
Zeile 37: Zeile 39:
  
 Bezgl. Scripting siehe auch diesen Ideen dazu [[dba:passwort_schuetzen|Datenbank User Passwörter  in Shell und SQL Skripten]] und um in einen Linux Script das Password zu verschlüsseln, siehe auch [[linux:bash_script_snippets#password_in_config_file_verschluesselt_ablegen|Bash Snippets - Passwörter in Configurationen verschlüsseln]]. Bezgl. Scripting siehe auch diesen Ideen dazu [[dba:passwort_schuetzen|Datenbank User Passwörter  in Shell und SQL Skripten]] und um in einen Linux Script das Password zu verschlüsseln, siehe auch [[linux:bash_script_snippets#password_in_config_file_verschluesselt_ablegen|Bash Snippets - Passwörter in Configurationen verschlüsseln]].
- 
  
 ==== Eine PL/SQL Lösung=== ==== Eine PL/SQL Lösung===
Zeile 53: Zeile 54:
 Die Spezifikation: Die Spezifikation:
 <code plsql encrypt_util_spec.sql> <code plsql encrypt_util_spec.sql>
- 
 create or replace package encrypt_util create or replace package encrypt_util
 as as
- 
    crypt_value_error EXCEPTION;    crypt_value_error EXCEPTION;
    PRAGMA exception_init(crypt_value_error, -06502);    PRAGMA exception_init(crypt_value_error, -06502);
Zeile 64: Zeile 63:
        
        
- --+ ----------------------------------------------------------------------- +  --+ ----------------------------------------------------------------------- 
- -- encrypt text +  -- encrypt text 
- --+ ----------------------------------------------------------------------- +  --+ ----------------------------------------------------------------------- 
- function encrypt (p_plaintext varchar2) +  function encrypt (p_plaintext varchar2) 
- return raw +    return raw 
- deterministic;+    deterministic;
  
 +  --+ -----------------------------------------------------------------------
 +  -- decrypt text
 +  --+ -----------------------------------------------------------------------
 +  function decrypt (p_encryptedtext raw)
 +    return varchar2
 +    deterministic;
  
- --+ ----------------------------------------------------------------------- +  --+ ----------------------------------------------------------------------- 
- --          -decrypt text +  -- store passwords in to a object 
- --+ ----------------------------------------------------------------------- +  --+ ----------------------------------------------------------------------- 
- function decrypt (p_encryptedtext raw) +  procedure storepwd (p_pwd varchar2 
- return varchar2 +              , p_slot number 
- deterministic;+              , p_store varchar2 default 'OBJECT' 
 +              , p_private_key varchar2 default 'NO' 
 +            );
  
 +  --+ -----------------------------------------------------------------------
 +  -- get User password
 +  --+ -----------------------------------------------------------------------
 +  function getuserpwd (p_slot number,p_private_key varchar2 default 'NO')
 +    return varchar2;
  
- 
- --+ ----------------------------------------------------------------------- 
- -- store passwords in to a object 
- --+ ----------------------------------------------------------------------- 
- 
- procedure storepwd (p_pwd varchar2 
- , p_slot number 
- , p_store varchar2 default 'OBJECT' 
-                            , p_private_key varchar2 default 'NO' 
- ); 
- 
- --+ ----------------------------------------------------------------------- 
- -- get User password 
- --+ ----------------------------------------------------------------------- 
- function getuserpwd (p_slot number,p_private_key varchar2 default 'NO') 
- return varchar2; 
 end encrypt_util; end encrypt_util;
 / /
Zeile 105: Zeile 101:
 create or replace package body encrypt_util create or replace package body encrypt_util
 as as
- --+ ---------------------------------------------------------------------------- +  --+ ---------------------------------------------------------------------------- 
- -- thankt to: +  -- thankt to: 
- -- see http://www.oracleflash.com/41/Encrypt-or-Decrypt-sensitive-data-using-PLSQL---DBMS_CRYPTO.html +  -- see http://www.oracleflash.com/41/Encrypt-or-Decrypt-sensitive-data-using-PLSQL---DBMS_CRYPTO.html 
- --+ --------------------------------------------------------------------------+  --+ -------------------------------------------------------------------------- 
 +  g_crypt_clear_key         varchar2 (256) := ''; 
 +  g_encryption_key          raw (32) := '';
  
  
- g_crypt_clear_key varchar2 (256) := '';+  --+ ---------------------------------------------------------------------------- 
 +  -- ENCRYPT_DES is the encryption algorithem. 
 +  -- Data Encryption Standard. Block cipher. 
 +  -- Uses key length of 56 bits. 
 +  -- 
 +  -- CHAIN_CBC Cipher Block Chaining. Plaintext is XORed with the previous ciphertext 
 +  -- block before it is encrypted. 
 +  -- 
 +  -- PAD_PKCS5 Provides padding which complies with the PKCS #5: Password-Based 
 +  -- Cryptography Standard 
 +  --+ ---------------------------------------------------------------------------- 
 +  g_encryption_type         pls_integer := dbms_crypto.encrypt_des + dbms_crypto.chain_cbc + dbms_crypto.pad_pkcs5;
  
- g_encryption_key raw (32) := '';+  --+ ---------------------------------------------------------------------------- 
 +  --  encrypt a text 
 +  --+ ---------------------------------------------------------------------------- 
 +  function encrypt (p_plaintext varchar2) 
 +    return raw 
 +    deterministic 
 +  is 
 +    encrypted_raw            raw (2000)
 +  begin 
 +    encrypted_raw := 
 +      dbms_crypto.encrypt (src  => utl_raw.cast_to_raw (p_plaintext) 
 +                   , typ  => g_encryption_type 
 +                   , key  => g_encryption_key 
 +                    ); 
 +    return encrypted_raw; 
 +  end encrypt;
  
  
- --+ ---------------------------------------------------------------------------- +  --+ ---------------------------------------------------------------------------- 
- -- ENCRYPT_DES is the encryption algorithem. +  --  decrypt a text 
- -- Data Encryption Standard. Block cipher. +  --+ ---------------------------------------------------------------------------- 
- -- Uses key length of 56 bits. +  function decrypt (p_encryptedtext raw) 
- -- +    return varchar2 
- -- CHAIN_CBC Cipher Block Chaining. Plaintext is XORed with the previous ciphertext +    deterministic 
- -- block before it is encrypted. +  is 
- -- +    decrypted_raw            raw (2000); 
- -- PAD_PKCS5 Provides padding which complies with the PKCS #5: Password-Based +  begin 
- -- Cryptography Standard +    decrypted_raw := 
- --+ ---------------------------------------------------------------------------- +      dbms_crypto.decrypt (src  => p_encryptedtext 
- g_encryption_type pls_integer := dbms_crypto.encrypt_des + dbms_crypto.chain_cbc + dbms_crypto.pad_pkcs5;+                   , typ  => g_encryption_type 
 +                   , key  => g_encryption_key 
 +                    ); 
 +    return (utl_raw.cast_to_varchar2 (decrypted_raw)); 
 +  end decrypt;
  
- --+ ---------------------------------------------------------------------------- 
- --  encrypt a text 
- --+ ---------------------------------------------------------------------------- 
  
- function encrypt (p_plaintext varchar2) +  --+ ---------------------------------------------------------------------------- 
- return raw +  --  clean string from whitespaces to avoid sql injection 
- deterministic +  --+ ---------------------------------------------------------------------------- 
- is +  function cleantext (p_text varchar2) 
- encrypted_raw raw (2000); +    return varchar2 
- begin +  is 
- encrypted_raw := +    v_text                varchar2 (32000); 
- dbms_crypto.encrypt (src => utl_raw.cast_to_raw (p_plaintext) +  begin 
-  typ => g_encryption_type +    v_text := replace (p_text, chr (10), ''); 
-  key => g_encryption_key +    v_text := replace (v_textchr (13), ''); 
-   ); +    v_text :replace (v_text, ' ', ''); 
- return encrypted_raw+    v_text := regexp_replace (v_text , '[[:space:]]' , ''); 
- end encrypt;+    return v_text
 +  end cleantext;
  
 +  --+ ----------------------------------------------------------------------------
 +  -- get a key from the local db enviroment
 +  -- The encryption key for DES algorithem, should be 8 bytes or more.
 +  --+ ----------------------------------------------------------------------------
 +  function getkeyfromlocal(p_private_key varchar2 default null)
 +    return varchar2
 +  is
 +    v_obj_id1              varchar2 (12) := '00000';
 +    v_obj_id2              varchar2 (12) := '00000';
 +    v_key                 varchar2 (2000) := 'PWD';
 +  begin
 +    -- get some ids from default objects, that not chaning so often .-)
 +    select to_char (object_id)
 +      into v_obj_id1
 +      from user_objects
 +     where object_name = 'ENCRYPT_UTIL'
 +         and object_type = 'PACKAGE BODY';
  
- --+ ---------------------------------------------------------------------------- +    select to_char (sum (object_id)
- --  decrypt a text +      into v_obj_id2 
- --+ ---------------------------------------------------------------------------- +      from all_objects 
- function decrypt (p_encryptedtext raw+     where object_name 'DBMS_STANDARD' 
- return varchar2 +         and owner in ('SYS''PUBLIC');
- deterministic +
- is +
- decrypted_raw raw (2000); +
- begin +
- decrypted_raw :+
- dbms_crypto.decrypt (src => p_encryptedtext +
-  typ => g_encryption_type +
- , key => g_encryption_key +
-   )+
- return (utl_raw.cast_to_varchar2 (decrypted_raw)); +
- end decrypt;+
  
- +    v_key := 
- --+ ---------------------------------------------------------------------------- +        initcap (sys_context ('USERENV','CURRENT_SCHEMA')) 
- --  clean string from whitespaces to avoid sql injection +      || '#' 
- --+ ---------------------------------------------------------------------------- +      || lower (sys_context ('USERENV', 'CURRENT_SCHEMAID')) 
- function cleantext (p_text varchar2) +      || '*' 
- return varchar2 +      || nvl (v_obj_id1, '00000'
- is +      || '$' 
- v_text varchar2 (32000); +      || initcap (sys_context ('USERENV', 'DB_NAME')) 
- begin +      || '+' 
- v_text := +      || nvl (v_obj_id2, '00000');
- replace (p_text +
- , chr (10) +
- , '' +
-   ); +
- v_text := +
- replace (v_text +
- , chr (13) +
- , '' +
-   ); +
- v_text := +
- replace (v_text +
- , ' ' +
- , '' +
-   ); +
- v_text := +
- regexp_replace (v_text +
-   , '[[:space:]]' +
-   , '' +
- ); +
- +
- return v_text; +
- end cleantext; +
- +
- +
- --+ ---------------------------------------------------------------------------- +
- -- get a key from the local db enviroment +
- -- The encryption key for DES algorithem, should be 8 bytes or more. +
- --+ ---------------------------------------------------------------------------- +
- function getkeyfromlocal(p_private_key varchar2 default null) +
- return varchar2 +
- is +
- v_obj_id1 varchar2 (12) := '00000'; +
- v_obj_id2 varchar2 (12) := '00000'; +
- v_key varchar2 (2000) := 'PWD'; +
- begin +
- -- get some ids from default objects, that not chaning so often .-) +
- select to_char (object_id) +
-   into v_obj_id1 +
-   from user_objects +
- where object_name = 'ENCRYPT_UTIL' +
- and object_type = 'PACKAGE BODY'; +
- +
- select to_char (sum (object_id)) +
-   into v_obj_id2 +
-   from all_objects +
- where object_name = 'DBMS_STANDARD' +
- and owner in ('SYS', 'PUBLIC'); +
- +
- v_key := +
- initcap (sys_context ('USERENV','CURRENT_SCHEMA')) +
- || '#' +
- || lower (sys_context ('USERENV', 'CURRENT_SCHEMAID')) +
- || '*' +
- || nvl (v_obj_id1, '00000'+
- || '$' +
- || initcap (sys_context ('USERENV', 'DB_NAME')) +
- || '+' +
- || nvl (v_obj_id2, '00000');+
                          
-         if    p_private_key is not null then +    if    p_private_key is not null then 
-            v_key := p_private_key||v_key; +        v_key := p_private_key||v_key; 
-         end if;+    end if;
  
- return substr(v_key,0,32);+    return substr(v_key,0,32);
                  
- end getkeyfromlocal;+  end getkeyfromlocal;
  
  
- --+ ---------------------------------------------------------------------------- +  --+ ---------------------------------------------------------------------------- 
- -- store passwords in to a object +  -- store passwords in to a object 
- -- need create function right +  -- need create function right 
- -- grant create procedure to <package_owner> +  -- grant create procedure to <package_owner> 
- -- grant create type to <package_owner>+  -- grant create type to <package_owner>
     -- debug exec encrypt_util.storepwd('ABCDE',1,'FUNCTION','1234')     -- debug exec encrypt_util.storepwd('ABCDE',1,'FUNCTION','1234')
- --+ ----------------------------------------------------------------------------+  --+ ----------------------------------------------------------------------------
  
- procedure storepwd (p_pwd varchar2 +  procedure storepwd (p_pwd varchar2 
- , p_slot number +              , p_slot number 
- , p_store varchar2 default 'OBJECT'+              , p_store varchar2 default 'OBJECT'
                             , p_private_key varchar2 default 'NO'                             , p_private_key varchar2 default 'NO'
-  +               
- is +  is 
- cursor c_read_type +    cursor c_read_type 
- is +    is 
- select text +      select text 
-   from user_source +        from user_source 
-  where name = 'PWD_WALLET' +       where name = 'PWD_WALLET' 
-  and type = 'TYPE BODY';+           and type = 'TYPE BODY';
  
- v_f_template varchar2 (2000) +    v_f_template            varchar2 (2000) 
- := 'create or replace function getSecretUserPwd##Slot## return raw is begin return (''##CRYPT_KEY##''); end;';+      := 'create or replace function getSecretUserPwd##Slot## return raw is begin return (''##CRYPT_KEY##''); end;';
  
- v_o_template_s  varchar2 (4000) +    v_o_template_s           varchar2 (4000) 
- := 'CREATE or replace TYPE pwd_wallet AS OBJECT (+      := 'CREATE or replace TYPE pwd_wallet AS OBJECT (
                                                   password varchar2(56)                                                   password varchar2(56)
                                                   ,MEMBER FUNCTION getUserPWD1 RETURN raw                                                   ,MEMBER FUNCTION getUserPWD1 RETURN raw
Zeile 277: Zeile 251:
                                                 )';                                                 )';
  
- v_o_template_b  varchar2 (4000) +    v_o_template_b           varchar2 (4000) 
- := 'CREATE or replace  TYPE BODY pwd_wallet AS +      := 'CREATE or replace  TYPE BODY pwd_wallet AS 
                                         MEMBER                                          MEMBER 
                                         FUNCTION getUserPWD1 RETURN raw                                          FUNCTION getUserPWD1 RETURN raw 
Zeile 312: Zeile 286:
                                     ';                                     ';
  
- v_template varchar2 (32000) := ''; +    v_template            varchar2 (32000) := ''; 
- v_key  varchar2 (2000); +    v_key                 varchar2 (2000); 
- v_slot varchar2 (2); +    v_slot                varchar2 (2); 
- v_count pls_integer; +    v_count               pls_integer; 
- begin+  begin
            
-      -- set your private key to harden the safe+     -- set your private key to harden the safe 
 +    if p_private_key != 'NO' then 
 +        g_crypt_clear_key := getkeyfromlocal(p_private_key); 
 +    else  
 +       g_crypt_clear_key := getkeyfromlocal;         
 +    end if;
              
-      if p_private_key != 'NO' then +    --dbms_output.put_line ('-- Info :: set New Key ::'||g_crypt_clear_key); 
-         g_crypt_clear_key := getkeyfromlocal(p_private_key); +    g_encryption_key := utl_raw.cast_to_raw (g_crypt_clear_key);
-      else  +
-        g_crypt_clear_key := getkeyfromlocal;         +
-      end if; +
-       +
-      --dbms_output.put_line ('-- Info :: set New Key ::'||g_crypt_clear_key); +
-       +
-      g_encryption_key := utl_raw.cast_to_raw (g_crypt_clear_key);+
              
- -- prevent for SQLInjection +    -- prevent for SQLInjection 
- v_key := cleantext (p_text => p_pwd); +    v_key := cleantext (p_text => p_pwd); 
- v_slot := cleantext (p_text => to_char (p_slot));+    v_slot := cleantext (p_text => to_char (p_slot));
  
 +    dbms_output.put_line ('--Info :: store in Slot : ' || v_slot || ' PWD :: ' || v_key);
  
- dbms_output.put_line ('--Info :: store in Slot : ' || v_slot || PWD :: ' || v_key);+    if p_store = 'FUNCTION' 
 +    then 
 +      v_template :=replace (v_f_template , '##CRYPT_KEY##, (encrypt (v_key)) );
  
 +      v_template :=replace (v_template, '##Slot##', v_slot);
 +    elsif p_store = 'TABLE'
 +    then
 +      null;
 +    -- implement here your setup table to store the pwd
 +    --
 +    elsif p_store = 'OBJECT'
 +    then
 +      select count (*)
 +        into v_count
 +        from user_types
 +       where type_name = 'PWD_WALLET';
  
- if p_store = 'FUNCTION' +      if v_count < 1 
- then +      then 
- v_template := +        -- create the object spec 
- replace (v_f_template +        execute immediate v_o_template_s;
- , '##CRYPT_KEY##' +
- , (encrypt (v_key)) +
-   );+
  
- v_template := +        v_template :=replace (v_o_template_b , '##CRYPT_KEY' || v_slot || '##', (encrypt (v_key))); 
- replace (v_template +      else 
-  , '##Slot##' +        -- get the code of the object 
-  v_slot +        -- check if object exists 
-   ); +        v_template := 'create or replace ';
- elsif p_store = 'TABLE' +
- then +
- null; +
- -- implement here your setup table to store the pwd +
- -- +
- elsif p_store = 'OBJECT' +
- then +
- select count (*) +
-   into v_count +
-   from user_types +
- where type_name = 'PWD_WALLET';+
  
- if v_count < 1 +        for rec in c_read_type 
- then +        loop 
- -- create the object spec +          if instr (rec.text 
- execute immediate v_o_template_s; +                , 'Slot' || v_slot 
- +                ) > 1 
- v_template := +          then 
- replace (v_o_template_b +            -- correct line 
- , '##CRYPT_KEY' || v_slot || '##' +            v_template := 
- , (encrypt (v_key)) +                v_template 
-   ); +              || regexp_replace (rec.text 
- else +                          , '[RETURN (''].*['');]' 
- -- get the code of the object +                          , 'RETURN (''' || (encrypt (v_key)) || ''');' 
- -- check if object exists +                          ); 
- v_template := 'create or replace '; +          else 
- +            v_template := v_template || rec.text; 
- for rec in c_read_type +          end if; 
- loop +        end loop; 
- if instr (rec.text +      end if; 
-   , 'Slot' || v_slot +    end if;
- ) > 1 +
- then +
- -- correct line +
- v_template := +
- v_template +
- || regexp_replace (rec.text +
-   , '[RETURN (''].*['');]' +
-   , 'RETURN (''' || (encrypt (v_key)) || ''');' +
- ); +
- else +
- v_template := v_template || rec.text; +
- end if; +
- end loop; +
- end if; +
- end if;+
  
- --dbms_output.put_line('--Info :: try to execute : '|| v_template);+    --dbms_output.put_line('--Info :: try to execute : '|| v_template);
  
- execute immediate v_template; +    execute immediate v_template; 
- end storepwd;+  end storepwd;
  
- --+ ----------------------------------------------------------------------- +  --+ ----------------------------------------------------------------------- 
- -- get User password+  -- get User password
     -- select encrypt_util.getuserpwd(2) from dual;     -- select encrypt_util.getuserpwd(2) from dual;
- --+ -----------------------------------------------------------------------+  --+ -----------------------------------------------------------------------
  
- function getuserpwd (p_slot number, p_private_key varchar2 default 'NO'+  function getuserpwd (p_slot number, p_private_key varchar2 default 'NO'
- return varchar2 +    return varchar2 
- is +  is 
- v_count pls_integer;+    v_count                pls_integer;
  
- v_template_0 varchar2 (2000) := 'declare+    v_template_0            varchar2 (2000) := 'declare
         v_pwd pwd_wallet;         v_pwd pwd_wallet;
         begin         begin
Zeile 420: Zeile 378:
         end;         end;
         ';         ';
- v_template_f varchar2 (2000) := ' begin+    v_template_f            varchar2 (2000) := ' begin
           :val:=encrypt_util.decrypt(getSecretUserPwd##Slot##);           :val:=encrypt_util.decrypt(getSecretUserPwd##Slot##);
         end;         end;
         ';         ';
  
- v_pwd  varchar2 (2000); +    v_pwd                 varchar2 (2000); 
- v_slot varchar2 (2); +    v_slot                varchar2 (2); 
- v_template varchar2 (2000); +    v_template              varchar2 (2000); 
- begin+  begin
          
         -- set your private key to harden the safe               -- set your private key to harden the safe      
Zeile 441: Zeile 399:
         g_encryption_key := utl_raw.cast_to_raw (g_crypt_clear_key);         g_encryption_key := utl_raw.cast_to_raw (g_crypt_clear_key);
              
- v_slot := cleantext (p_text => to_char (p_slot));+    v_slot := cleantext (p_text => to_char (p_slot));
  
- -- if object exitst use object +    -- if object exitst use object 
- select count (*) +    select count (*) 
-   into v_count +      into v_count 
-   from user_types +      from user_types 
-  where type_name = 'PWD_WALLET';+     where type_name = 'PWD_WALLET';
  
- if v_count > 0 +    if v_count > 0 
- then +    then 
- v_template := +      v_template :=replace (v_template_0 , '##Slot##' , v_slot); 
- replace (v_template_0 +    else 
-  , '##Slot##' +      -- must be a function or a table 
-  , v_slot +      select count (*) 
-   ); +        into v_count 
- else +        from user_objects 
- -- must be a function or a table +       where object_name = upper ('getSecretUserPwd' || v_slot);
- select count (*) +
-   into v_count +
-   from user_objects +
-  where object_name = upper ('getSecretUserPwd' || v_slot);+
  
- if v_count > 0 +      if v_count > 0 
- then +      then 
- v_template := +        v_template :=replace (v_template_f, '##Slot##', v_slot); 
- replace (v_template_f +      else 
-  , '##Slot##' +        -- implment your table data store here 
-  , v_slot +        raise_application_error (-20001 
-   ); +                        , 'No PWD Function found for the slot::' || v_slot 
- else +                        ); 
- -- implment your table data store here +      end if; 
- raise_application_error (-20001 +    end if;
-   , 'No PWD Function found for the slot::' || v_slot +
- ); +
- end if; +
- end if;+
  
- begin +    begin 
- execute immediate v_template using out v_pwd; +      execute immediate v_template using out v_pwd; 
- exception +    exception 
- when crypt_key_error then+      when crypt_key_error then
                  v_pwd := 'NO_PWD_KEY_WRONG_SLOT' || v_slot;                  v_pwd := 'NO_PWD_KEY_WRONG_SLOT' || v_slot;
                  dbms_output.put_line ('-- Error :: KEY Error for PWD in Slot ' || v_slot || ' set! Error: '||SQLERRM);                  dbms_output.put_line ('-- Error :: KEY Error for PWD in Slot ' || v_slot || ' set! Error: '||SQLERRM);
Zeile 489: Zeile 439:
                 dbms_output.put_line ('-- Error :: No PWD in Slot ' || v_slot || ' set! Error:'||SQLERRM);                 dbms_output.put_line ('-- Error :: No PWD in Slot ' || v_slot || ' set! Error:'||SQLERRM);
             when others             when others
- then +      then 
- raise_application_error (-20000, 'Error read pwd from pwd_wallet:: Error' || SQLERRM); +        raise_application_error (-20000, 'Error read pwd from pwd_wallet:: Error' || SQLERRM); 
- end;+    end;
  
- return v_pwd; +    return v_pwd; 
- end getuserpwd;+  end getuserpwd;
 begin begin
    g_crypt_clear_key := getkeyfromlocal;       g_crypt_clear_key := getkeyfromlocal;   
Zeile 538: Zeile 488:
  
  
-<note important>Wie immer Sie das auch umsetzen, keine Klarschrift Passwörter in PL/SQL Code!</note+<note important>Wie immer Sie das auch umsetzen, keine Klarschrift Passwörter in PL/SQL Code!</note>
  
  
dba/passwort_in_psql_schuetzen.txt · Zuletzt geändert: 2016/05/20 15:20 von gpipperr