Home » SQL & PL/SQL » SQL & PL/SQL » How to Conceal table data like (*****)
How to Conceal table data like (*****) [message #266534] Tue, 11 September 2007 01:55 Go to next message
dbhossain
Messages: 155
Registered: August 2007
Location: Dhaka
Senior Member

Hi Experts,

How do i conceal my specific data in the table.
Example........i have a Table Named: UserList
and have 4 Columns: 1. Name, 2. Date_created. 3. Password.
4. Status.

i want to set all data of "Password" column asterisk marks (*)
so that if anybody query he / she will see the * mark only. if my password is "dhaka" then it will show (*****).

Note: in the Fomrs developer it is possible in the property of the item. but i want to keep it in the database table.

Can any one help me. please



Thank you.

Kamal Hossain
Dhaka

[Updated on: Tue, 11 September 2007 01:56]

Report message to a moderator

Re: How to Conceal table data like (*****) [message #266537 is a reply to message #266534] Tue, 11 September 2007 01:56 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Creating a view over the table.
Re: How to Conceal table data like (*****) [message #266549 is a reply to message #266537] Tue, 11 September 2007 02:11 Go to previous messageGo to next message
dbhossain
Messages: 155
Registered: August 2007
Location: Dhaka
Senior Member

Dear Mr. Arju,

Thank you very much for your early response.
Is there any other way except Creating View?

and if view is the easiest way......can you pls tell me, how i can set the value ****** instead of exact value in the Password Column?


Thak you.

Kamal Hossain
Re: How to Conceal table data like (*****) [message #266556 is a reply to message #266549] Tue, 11 September 2007 02:22 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
This makes no sense.
Tables store data, not the way this data will be used or displayed.
If you don't want your users to see the passwords, either don't grant them access to the table or obfuscate (encrypt) the passwords.
Re: How to Conceal table data like (*****) [message #266560 is a reply to message #266534] Tue, 11 September 2007 02:32 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

@dbhossin, A demo of you requirement. Put as many star as your wish.
SQL>  create view test_view as select eno,decode(sal,'notdeafult','0','***') sal from test ;

View created.

SQL> select * from test_view;

       ENO SAL
---------- ---
         1 ***
         2 ***
         3 ***
         3 ***
         1 ***
        10 ***
        10 ***

7 rows selected.

SQL> select * from test;

       ENO SAL
---------- ----------
         1 low
         2 medium
         3 high
         3 high
         1 low
        10 high
        10 low

7 rows selected.

Re: How to Conceal table data like (*****) [message #266562 is a reply to message #266556] Tue, 11 September 2007 02:35 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I think view is a good and easy way to hide data to users.
You grant access to view and not to table.

Regards
Michel
Re: How to Conceal table data like (*****) [message #266632 is a reply to message #266562] Tue, 11 September 2007 04:42 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Michel Cadot wrote on Tue, 11 September 2007 09:35
I think view is a good and easy way to hide data to users.
You grant access to view and not to table.

Regards
Michel


I disagree.
Storing plain text passwords is a stupid thing to do in the first place. Then granting accesss to this table to users you don't trust is a second no-no. Why would these people need select-privs on the table anyway??
Re: How to Conceal table data like (*****) [message #266673 is a reply to message #266632] Tue, 11 September 2007 06:48 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Quote:

Why would these people need select-privs on the table anyway?



The people don't. But if you have a setup where the application users are not created as oracle user, but only as users in some application-specific way, then the oracle user that is used to connect to the database must have some way to check if the username/password supplied by the user is valid.

And the plain text password storage seemed to have been an excepted method some 'decades' ago. At least judging by the legacy applications I come across that still do it.

Of course the way to go now is to store not the plain-text password but some encrypted or hashed value instead. Like in the example
here
Re: How to Conceal table data like (*****) [message #266729 is a reply to message #266673] Tue, 11 September 2007 08:57 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
ThomasG wrote on Tue, 11 September 2007 13:48
Quote:

Why would these people need select-privs on the table anyway?



The people don't. But if you have a setup where the application users are not created as oracle user, but only as users in some application-specific way, then the oracle user that is used to connect to the database must have some way to check if the username/password supplied by the user is valid.

Then there is still no need for any human to know the password of this oracle user.
Re: How to Conceal table data like (*****) [message #266888 is a reply to message #266560] Tue, 11 September 2007 22:52 Go to previous message
dbhossain
Messages: 155
Registered: August 2007
Location: Dhaka
Senior Member

Dear mr. Arju,

Thank you for your effective and kind reply.

i think you understand deeply my problem and request as weel.

Thank you very much for your co operation.



Best Regards,

Kamal Hossain
Previous Topic: "rows returned" versus "result set"
Next Topic: Finding locking Information
Goto Forum:
  


Current Time: Mon Dec 05 21:14:32 CST 2016

Total time taken to generate the page: 0.09047 seconds