mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix: Hide Forward OAuth Identity toggle when azure auth is enabled (#71640)
Hide Forward OAuth Identity toggle when azure auth is enabled
This commit is contained in:
parent
b089281255
commit
31d3f7fd83
@ -148,6 +148,12 @@ export const DataSourceHttpSettings = (props: HttpSettingsProps) => {
|
||||
const azureAuthEnabled: boolean =
|
||||
(azureAuthSettings?.azureAuthSupported && azureAuthSettings.getAzureAuthEnabled(dataSourceConfig)) || false;
|
||||
|
||||
// Azure Authentication doesn't work correctly when Forward OAuth Identity is enabled.
|
||||
// The Authorization header that has been set by the ApplyAzureAuth middleware gets overwritten
|
||||
// with the Authorization header set by the OAuthTokenMiddleware.
|
||||
dataSourceConfig.jsonData.oauthPassThru = azureAuthEnabled ? false : dataSourceConfig.jsonData.oauthPassThru;
|
||||
const shouldShowForwardOAuthIdentityOption = azureAuthEnabled ? false : showForwardOAuthIdentityOption;
|
||||
|
||||
return (
|
||||
<div className="gf-form-group">
|
||||
<>
|
||||
@ -295,7 +301,7 @@ export const DataSourceHttpSettings = (props: HttpSettingsProps) => {
|
||||
<HttpProxySettings
|
||||
dataSourceConfig={dataSourceConfig}
|
||||
onChange={(jsonData) => onSettingsChange({ jsonData })}
|
||||
showForwardOAuthIdentityOption={showForwardOAuthIdentityOption}
|
||||
showForwardOAuthIdentityOption={shouldShowForwardOAuthIdentityOption}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user