Skip to content

Existing OAuth config overwrites Basic config on next login #270

@irby

Description

@irby

Information

  • KFUtil Version: 1.6.2

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

  1. Login with OAuth as the auth type.
  2. Login again and choose Basic as your auth type
  3. Enter username, password, etc.
  4. Check the config file, ~/.keyfactor/command_config.json.
  5. Observe that client_id, client_secret, username, password are populated and that the auth_type is basic.
  6. Run the login command again
  7. 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.
  8. Check the config file, ~/.keyfactor/command_config.json again
  9. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions