credentials-binding-plugin icon indicating copy to clipboard operation
credentials-binding-plugin copied to clipboard

Write SSH keys in default encoding

Open ricedavida opened this issue 4 years ago • 5 comments

The code change will take, if provided, the user property setting of an ssh key's file encoding, and it will set it on the remote agent's computer. If left unset, it will use the default of UTF-8.

This feature is needed for edge systems that don't use UTF-8 natively, like zOS(the mainframe). So, to allow the ssh keyfiles to be generated correctly, we can specify the encoding type.

This has been manually tested on a jenkins/zOS, and works as intended.

ricedavida avatar Jul 23 '21 16:07 ricedavida

Can this not just be set to ASCII?

jglick avatar Oct 18 '21 14:10 jglick

Unfortunately, no. zOS natively uses IBM-1047 (EBCDIC) code pages. This seems to be the only way that this could be addressed for that operating system.

ricedavida avatar Oct 18 '21 14:10 ricedavida

So then the correct fix should be to use the agent JVM’s default encoding? Which would usually be UTF-8, occasionally some ASCII superset on Windows machines for example, and EBCDIC on z/OS?

jglick avatar Oct 18 '21 16:10 jglick

BTW what will the impact be on z/OS of https://github.com/openjdk/jdk/pull/4733 whenever that is ported?

jglick avatar Oct 21 '21 16:10 jglick

sorry, I am in the process of validating this now, and will clean up the pull request once everything is validated.

ricedavida avatar Oct 21 '21 17:10 ricedavida