michaeljmarshall opened a new pull request #11988:
URL: https://github.com/apache/pulsar/pull/11988


   ### Motivation
   
   When reviewing https://github.com/apache/pulsar/pull/11931, I noticed that 
the `audience` field on the `ClientCredentialsExchangeRequest` is not optional, 
but it should be. Only some Identity Providers require this field. Auth0 is one 
such provider. Azure AD, for example, does not require this field. Thus, we 
shouldn't require the field.
   
   ### Modifications
   
   * Modify `buildClientCredentialsBody` to only add `audience` when it is non 
empty and non null. Note that previously, the `audience` field was not allowed 
to be empty or null. Thus, only setting it on the `bodyMap` when it is non 
empty and non null will result in backwards compatible changes for all clients.
   * Modify `buildClientCredentialsBody` to reduce code duplication in tests
   * Updated documentation
   * Updated 2 tests and added another to ensure coverage
   
   ### Verifying this change
   
   Added new test and modified two existing tests.
   
   ### Does this pull request potentially affect one of the following parts:
   
   It modifies the public api in that it allows for the `audience` field to now 
be null or the empty string. In both cases, the field will not be sent to the 
Identity Provider. This not a breaking change.
   
   ### Documentation
   I updated the latest docs. If this change gets cherry picked to `branch-2.8` 
or `branch-2.7`, we will need to update the docs for those versions.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to