Sample Header Ad - 728x90

PostgreSQL's PGP_SYM_ENCRYPT log security

1 vote
1 answer
912 views
In one of our project, I tried to use PostgreSQL's security extension pgcrypto. I found that is function, PGP_SYM_ENCRYPT is quite handy. Using this function enable me to query encrypted data with LIKE %keyword%, BETWEEN etc, which I can not achieve if I use programming language such as Java or PHP to encrypt the data then insert it into the database. However, I found an issue. Once I execute queries with PGP_SYM_ENCRYPT new line in the log file is written. Interestingly, the log is including the password in PLAIN! Of course, IMO, this is unacceptable. I want to secure my password, in the same time I also want to log any change (INSERT, UPDATE, DELETE) into my database. Is there any way to **hide** this password information from the log file?
Asked by Amri Shodiq (11 rep)
Feb 19, 2019, 06:23 AM
Last activity: Feb 14, 2025, 03:07 PM