mask specific columns in azure postgresql database

Balaji Rajandran 6 Reputation points
2021-08-16T13:38:09.663+00:00

Hi,

We have a requirement to mask some of the columns in a table (Fox ex: IP Address, SSN )etc. We cant find any helpful information on how to mask columns in postgresql table. Pls. guide.

Azure Database for PostgreSQL
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Oury Ba-MSFT 20,911 Reputation points Microsoft Employee Moderator
    2021-08-16T22:26:42.057+00:00

    Hi @Balaji Rajandran Thank you posting your question. You can possibly prevent access to these columns using column level permissions Or create a view PostgreSQL: Documentation: 9.2: CREATE VIEW.

    Regards,
    Oury


  2. Balaji Rajandran 6 Reputation points
    2021-08-17T15:08:08.273+00:00

    Hi,

    Thanks for your reply. We cant apply column level permission at the database side. We are looking for a solution as masking text in columns such as SSN, IP Address etc. From the front end, we will share plain text, but at the database we wanted to store the information like ..**.75 as an ip address, but at the same time admin should be able to see full text. This functionality is available in SQL server, but not able to get the solution in postgresql.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.