Skip to content

Adding CredentialsProvider, deprecating PasswordProvider #9351

@jihoonson

Description

@jihoonson

Motivation

We are using PasswordProvider to secure user passwords in various places. However, it doesn't secure the user name (or account whatever).

Proposed changes

This proposal is to add a new class CredentialsProvider. Similar to PasswordProvider, the CredentialsProvider provides various ways to get the user credential, but both user name and password.

public interface CredentialsProvider
{
  Map<String, String> getCredentials();
}

Rationale

Since the PasswordProvider has one method of getPassword(), we are already using two different PasswordProviders to secure both user name and password in some places. AWSCredentialsConfig is an example:

public class AWSCredentialsConfig
{
  @JsonProperty
  private PasswordProvider accessKey = new DefaultPasswordProvider("");

  @JsonProperty
  private PasswordProvider secretKey = new DefaultPasswordProvider("");
...

This is not good for user experience because they generally prefer to secure their account and password in the same way.

Operational impact

The PasswordProvider will be deprecated in favor of the new CredentialsProvider. This would deprecate some configurations as well, but they will be still supported in a couple of next releases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions