chiradeep / go-nitro

A Golang client to the Citrix ADC API
Apache License 2.0
18 stars 21 forks source link

Mask NITRO username and password request headers #47

Closed giorgos-nikolopoulos closed 3 years ago

giorgos-nikolopoulos commented 3 years ago

Fixes #46

jantytgat commented 3 years ago

Hi @giorgos-nikolopoulos, @chiradeep

Wouldn't it be feasible to provide one (or two) parameters into the NitroClient?

The first parameter controls whether there is output to STDERR or the log, whereas the second parameter controls if the masked headers should be displayed.

This way, we can still activate the SDK output, but it cleans up the output by default. Let the application owner decide whether or not to allow Println and other output.

Edit:

chiradeep commented 3 years ago

@jantytgat it is a good idea. Originally this library was used for the terraform driver exclusively. TF continues to use the built-in log facility (like this library does). Any change to the logging requires some more investigation and testing to make sure that the TF driver remains debuggable.

chiradeep commented 3 years ago

LGTM