Skip to main content
Solved

Systemcaller shows password information in logfile

  • February 7, 2025
  • 5 replies
  • 51 views

tva
Contributor
Forum|alt.badge.img+12
  • Contributor

Some workspace of us is using ogr2ogr to move data from one postgres db towards another (more performant then setting up a FDW in postgres itself and more performant then FME for doing the data move).

Calling this via the system caller shows all information in the log file (including password information). Is there a way to avoid this more recent then this post: 

 

 

Best answer by nordpil

How about calling ogr2ogr through python instead of SystemCaller?

(i.e. python subprocess)

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

nordpil
Supporter
Forum|alt.badge.img+10
  • Supporter
  • Best Answer
  • February 10, 2025

How about calling ogr2ogr through python instead of SystemCaller?

(i.e. python subprocess)


nordpil
Supporter
Forum|alt.badge.img+10
  • Supporter
  • February 10, 2025

...or have the passwords in environment varaibles?


tva
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • February 10, 2025

Thanks for the suggestions.

 

Password is rotating and is put in a key vault that I need to fetch, so making it more difficult to put it as environment variable + did a quick test and it still shows in the log.

 

Converted it to pythoncaller and there it doesn’t show in the logs.


tva
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • February 11, 2025
nordpil wrote:

How about calling ogr2ogr through python instead of SystemCaller?

(i.e. python subprocess)

Though struggeling with the correct command to make it work when I have the whole ogr2ogr command created upfront via attribute manager (because there are some conditionals involved). So using python caller isn’t as handy as the systemcaller.


nordpil
Supporter
Forum|alt.badge.img+10
  • Supporter
  • February 12, 2025

You may be able to set an environment variable in a step before the systemcaller (again in Python) and then including that environment variable in the systemcaller. Haven’t tested that, it may be that the environment is not inherited...


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings