Information
Problem
If you switch from using OAuth configuration to Basic configuration, the next time kfutil login will prompt that the preferred AuthType is oauth when the last configuration was actually using basic. Continuing through the rest of the login setup will switch configuration over to oauth and erase all basic credentials.
Reproduction Steps
- Login with OAuth as the auth type.
- Login again and choose Basic as your auth type
- Enter username, password, etc.
- Check the config file,
~/.keyfactor/command_config.json.
- Observe that
client_id, client_secret, username, password are populated and that the auth_type is basic.
- Run the login command again
- When Auth Type is prompted, it now says
oauth as the default value instead of basic. Keep it as oauth for this login flow, and complete the rest of the login with the defaults.
- Check the config file,
~/.keyfactor/command_config.json again
- Observe that all the
basic credentials are now absent from the config file, and the auth_type is oauth.
Expected Results
- The login step should default auth type to
basic if that's what the value was in the config file.
- Basic credentials are preserved in the config file even if the auth type is switched to
oauth.
Actual Results
- The login step incorrectly defaults to
oauth
- Basic credentials are removed from the config file if switched to
oauth.
Information
Problem
If you switch from using OAuth configuration to Basic configuration, the next time
kfutil loginwill prompt that the preferred AuthType isoauthwhen the last configuration was actually usingbasic. Continuing through the rest of the login setup will switch configuration over tooauthand erase allbasiccredentials.Reproduction Steps
~/.keyfactor/command_config.json.client_id,client_secret,username,passwordare populated and that theauth_typeisbasic.oauthas the default value instead ofbasic. Keep it asoauthfor this login flow, and complete the rest of the login with the defaults.~/.keyfactor/command_config.jsonagainbasiccredentials are now absent from the config file, and theauth_typeisoauth.Expected Results
basicif that's what the value was in the config file.oauth.Actual Results
oauthoauth.