ostinru commented on PR #124:
URL: https://github.com/apache/cloudberry-pxf/pull/124#issuecomment-5190068675

   I have tests this PR in order to detect any password leakage to 
`pxf_stat_activity`:
   
   ```
   db2=#  CREATE EXTERNAL TABLE ext_big_table_100gb (...)
     LOCATION (
         
'pxf://public.big_table_100gb?PROFILE=Jdbc&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql://pg.example.com:5432/db2&USER=ostinru&PASS=SECRET'
     )
     FORMAT 'CUSTOM' (FORMATTER='pxfwritable_import');
   
   
   postgres=# select * from pxf_stat_activity ;
   -[ RECORD 1 ]-+---------------------------------------------------
   segment_id    | 0
   session_id    | 112562
   command_count | 72
   xid           | 112562-0000000072
   operation     | READ_BRIDGE
   usename       | gpadmin
   server        | default
   profile       | jdbc
   schema_name   | public
   table_name    | ext_big_table_100gb
   data_source   | public.big_table_100gb
   query_start   | 2026-07-31 20:01:50.385+03
   pxf_host      | gp.example.com
   ```
   
   Also, secret in jdbc URL:
   ```
   
pxf://big_table_100gb?PROFILE=Jdbc&JDBC_DRIVER=com.mysql.jdbc.Driver&DB_URL=jdbc:mysql://ostinru:[email protected]:3306/db1
   
   postgres=# select * from pxf_stat_activity ;
   -[ RECORD 1 ]-+---------------------------------------------------
   segment_id    | 1
   session_id    | 153617
   command_count | 16
   xid           | 153617-0000000016
   operation     | READ_BRIDGE
   usename       | gpadmin
   server        | default
   profile       | jdbc
   schema_name   | public
   table_name    | ext_mysql_big_table_100gb
   data_source   | big_table_100gb
   query_start   | 2026-07-31 21:34:39.361+03
   pxf_host      | gp.example.com
   ```
   
   with S3:
   ```
   CREATE EXTERNAL TABLE test_blob_read_with_password (...)
     LOCATION (
         
'pxf://ostinru/topics/cuscom.email.created.v1/2026-05-29/*?PROFILE=s3:parquet&SERVER=ostinru&accesskey=SECRET&secretkey=SECRET'
     )
     FORMAT 'CUSTOM' (FORMATTER='pxfwritable_import');
   
   postgres=# select * from pxf_stat_activity ;
   -[ RECORD 1 ]-+---------------------------------------------------------
   segment_id    | 1
   session_id    | 153617
   command_count | 99
   xid           | 153617-0000000099
   operation     | READ_BRIDGE
   usename       | gpadmin
   server        | ostinru
   profile       | s3:parquet
   schema_name   | public
   table_name    | test_blob_read_with_password
   data_source   | ostinru/topics/cuscom.email.created.v1/2026-05-29/*
   query_start   | 2026-07-31 21:48:03.509+03
   pxf_host      | gp.example.com
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to