Question

Availability of password user parameters in Python

  • 2 November 2022
  • 3 replies
  • 9 views

Badge +5

We have a number of workspaces developed in older versions of FME that use various database connection parameters (e.g. database name, username, password etc). In some of these workspaces we do post processing (e.g. building indexes), usually via shutdown python scripts or pythoncallers and access these parameters in python using FME macro values.

 

I've tried running one of these workspaces today in FME 2021 (2021.0.2 - build 21321) and the python scripts no longer seem to be able to access the "password" parameters and python reports a KeyError.

 

If I try to test by creating a new pythoncaller in the workspace, I cannot see the "password" parameters in the list of user parameters, so I assume this may be a deliberate change?

 

Any ideas if this is a bug or a deliberate change by Safe in FME 2021? I can't find any info on that change, so if it's deliberate, it would have been nice to know about this so we could update our workspaces.

 

John


3 replies

Badge +6

@john_gis4bus​ Hi John, thanks for your question! It sounds like you are running into the same issue that another Community member encountered with a switch from FME 2020 (password parameter available) to FME 2021 (password parameter no longer an option). Have a look at this user's question, where they describe how they converted their older Password user parameter into an attribute, and then passed the attribute to the PythonCaller. This workflow may work for your use case, too!

Badge +5

Hi @natalieatsafe​ 

Unfortunately that suggestion only works for workspaces where we have used PythonCallers. For those that use python shutdown scripts, that approach won't work and the only work around I have so far is to change the user parameter to text (not password). However, that's not ideal as there's no masking of the password.

 

Can you confirm that this was a deliberate change in FME 2021, what the reasoning was (I assume security) and where it was documented?

Badge +6

Hi @john_gis4bus​ , I can confirm that this removal of the Password user parameter was deliberate, and as you suspected was related to security concerns. However, due to customer feedback the Password user parameter was returned in FME Desktop 2021.1. I actually just opened up my FME 2021.2.0.1 (b21789) and can confirm that the Password user parameter is present as an option in the Parameter Manager. If you're able to upgrade your FME to at least FME 2021.1, you should be able to once again make use of the Password user parameter.

Reply