Open lazystone opened 1 year ago
We use Azure AD to generate tokens and passing the client_id/client_secret in Authorization header doesn't work with Azure AD.
Related to #6125?
I am facing the same issue with Azure B2C as token provider. Client id and client secret need to be passed in the body. See: Azure B2C - Obtain an access token
Related to #6125?
It's in the description.
Also ran into issue with Azure B2C token. Right now we cannot use Swagger for Client-Credentials because Microsoft only accepts the ClientId/Secret in POST body instead of Authorization header.
I understand the RFC docs state
The authorization server MUST support the HTTP Basic authentication scheme for authenticating clients that were issued a client password.
The problem is that it makes it impossible to work with any 3rd-parties that don't maintain that strict adherence to the RFC, and often we as developers don't have a choice in the matter. In this case, the provider isn't some small one-man shop, it's Microsoft.
It's perfectly logical that a tool would strictly adhere to the RFC by default but these types of options are essential to work in the exception cases or we're left with no recourse.
Any movement on this?
Duplicate of #6125 but with more details.
According to https://datatracker.ietf.org/doc/html/rfc6749#section-2.3
That is actually implemented in OpenID for confidential clients: https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication
So, OpenID considers client authentication method as a MUST and does not allow alternatives, RFC does not say anything on that matter, so my bet is that OpenID follows a standard here.
Problem is that many Clients are generated with
client_secret_post
authentication method and DO NOT supportclient_secret_basic
(my guess just because parameters in body are easier for developers), and the same client credentials can't be used in Swagger UI then.Workaround here would be to generate separate clients, but that defies the whole purpose of Swagger UI when it's being used for investigations or troubleshooting.
It would be super nice if Swagger UI could support credentials in a body, since it's actually a part of specification and in reality used by widely used tools like OpenID.
P.S.: Unlike #6220 I suggest to make it an UI fix only - there is no need to make any changes in OpenApi specification itself, since it's not possible to know what kind of client will be used.
Instead it could be a simple checkbox in the UI specifying how to pass credentials(header or body).