Skip to content

Removed null check for username password for client credentials type.#353

Open
vikasrathee-cs wants to merge 1 commit intodevelopfrom
client_creds
Open

Removed null check for username password for client credentials type.#353
vikasrathee-cs wants to merge 1 commit intodevelopfrom
client_creds

Conversation

@vikasrathee-cs
Copy link
Contributor

@vikasrathee-cs vikasrathee-cs commented Mar 19, 2026

Removed null check for username password for client credentials type.

For grant type client_credentials, username and password can be null.

Copy link
Contributor

@itsankit-google itsankit-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is okay to remove null check because it is not required in certain cases.

But we should also add validation for the type when these configs are required.

@vikasrathee-cs
Copy link
Contributor Author

it is okay to remove null check because it is not required in certain cases.

But we should also add validation for the type when these configs are required.

As of now, there is no explicit variable defined which calculates whether user is supporting password grant or client_creds. Based on the values, if user name and password are null, it will fallback to client creds automatically. This was done to support DTS use case I guess.

@itsankit-google
Copy link
Contributor

it is okay to remove null check because it is not required in certain cases.
But we should also add validation for the type when these configs are required.

As of now, there is no explicit variable defined which calculates whether user is supporting password grant or client_creds. Based on the values, if user name and password are null, it will fallback to client creds automatically. This was done to support DTS use case I guess.

As discussed offline, this way we will not be able to maintain the extensibility of CDF plugin's ability to support multiple auth types.

We can add a AuthenticationType similar to google-cloud plugins to correctly fix this.

We can also hide certain fields in CDF Plugin UI based on authenticationType.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants