WebAppAuthSettingsArgs

data class WebAppAuthSettingsArgs(val aadClaimsAuthorization: Output<String>? = null, val additionalLoginParams: Output<List<String>>? = null, val allowedAudiences: Output<List<String>>? = null, val allowedExternalRedirectUrls: Output<List<String>>? = null, val authFilePath: Output<String>? = null, val clientId: Output<String>? = null, val clientSecret: Output<String>? = null, val clientSecretCertificateThumbprint: Output<String>? = null, val clientSecretSettingName: Output<String>? = null, val configVersion: Output<String>? = null, val defaultProvider: Output<BuiltInAuthenticationProvider>? = null, val enabled: Output<Boolean>? = null, val facebookAppId: Output<String>? = null, val facebookAppSecret: Output<String>? = null, val facebookAppSecretSettingName: Output<String>? = null, val facebookOAuthScopes: Output<List<String>>? = null, val gitHubClientId: Output<String>? = null, val gitHubClientSecret: Output<String>? = null, val gitHubClientSecretSettingName: Output<String>? = null, val gitHubOAuthScopes: Output<List<String>>? = null, val googleClientId: Output<String>? = null, val googleClientSecret: Output<String>? = null, val googleClientSecretSettingName: Output<String>? = null, val googleOAuthScopes: Output<List<String>>? = null, val isAuthFromFile: Output<String>? = null, val issuer: Output<String>? = null, val kind: Output<String>? = null, val microsoftAccountClientId: Output<String>? = null, val microsoftAccountClientSecret: Output<String>? = null, val microsoftAccountClientSecretSettingName: Output<String>? = null, val microsoftAccountOAuthScopes: Output<List<String>>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val runtimeVersion: Output<String>? = null, val tokenRefreshExtensionHours: Output<Double>? = null, val tokenStoreEnabled: Output<Boolean>? = null, val twitterConsumerKey: Output<String>? = null, val twitterConsumerSecret: Output<String>? = null, val twitterConsumerSecretSettingName: Output<String>? = null, val unauthenticatedClientAction: Output<UnauthenticatedClientAction>? = null, val validateIssuer: Output<Boolean>? = null) : ConvertibleToJava<WebAppAuthSettingsArgs>

Configuration settings for the Azure App Service Authentication / Authorization feature. Uses Azure REST API version 2024-04-01. In version 2.x of the Azure Native provider, it used API version 2022-09-01. Other available API versions: 2016-08-01, 2018-02-01, 2018-11-01, 2019-08-01, 2020-06-01, 2020-09-01, 2020-10-01, 2020-12-01, 2021-01-01, 2021-01-15, 2021-02-01, 2021-03-01, 2022-03-01, 2022-09-01, 2023-01-01, 2023-12-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native web [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Update Auth Settings

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webAppAuthSettings = new AzureNative.Web.WebAppAuthSettings("webAppAuthSettings", new()
{
AllowedExternalRedirectUrls = new[]
{
"sitef6141.customdomain.net",
"sitef6141.customdomain.info",
},
ClientId = "42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com",
DefaultProvider = AzureNative.Web.BuiltInAuthenticationProvider.Google,
Enabled = true,
Name = "sitef6141",
ResourceGroupName = "testrg123",
RuntimeVersion = "~1",
TokenRefreshExtensionHours = 120,
TokenStoreEnabled = true,
UnauthenticatedClientAction = AzureNative.Web.UnauthenticatedClientAction.RedirectToLoginPage,
});
});
package main
import (
web "github.com/pulumi/pulumi-azure-native-sdk/web/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := web.NewWebAppAuthSettings(ctx, "webAppAuthSettings", &web.WebAppAuthSettingsArgs{
AllowedExternalRedirectUrls: pulumi.StringArray{
pulumi.String("sitef6141.customdomain.net"),
pulumi.String("sitef6141.customdomain.info"),
},
ClientId: pulumi.String("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com"),
DefaultProvider: web.BuiltInAuthenticationProviderGoogle,
Enabled: pulumi.Bool(true),
Name: pulumi.String("sitef6141"),
ResourceGroupName: pulumi.String("testrg123"),
RuntimeVersion: pulumi.String("~1"),
TokenRefreshExtensionHours: pulumi.Float64(120),
TokenStoreEnabled: pulumi.Bool(true),
UnauthenticatedClientAction: web.UnauthenticatedClientActionRedirectToLoginPage,
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.web.WebAppAuthSettings;
import com.pulumi.azurenative.web.WebAppAuthSettingsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var webAppAuthSettings = new WebAppAuthSettings("webAppAuthSettings", WebAppAuthSettingsArgs.builder()
.allowedExternalRedirectUrls(
"sitef6141.customdomain.net",
"sitef6141.customdomain.info")
.clientId("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com")
.defaultProvider("Google")
.enabled(true)
.name("sitef6141")
.resourceGroupName("testrg123")
.runtimeVersion("~1")
.tokenRefreshExtensionHours(120.0)
.tokenStoreEnabled(true)
.unauthenticatedClientAction("RedirectToLoginPage")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:web:WebAppAuthSettings authsettings /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings

Constructors

Link copied to clipboard
constructor(aadClaimsAuthorization: Output<String>? = null, additionalLoginParams: Output<List<String>>? = null, allowedAudiences: Output<List<String>>? = null, allowedExternalRedirectUrls: Output<List<String>>? = null, authFilePath: Output<String>? = null, clientId: Output<String>? = null, clientSecret: Output<String>? = null, clientSecretCertificateThumbprint: Output<String>? = null, clientSecretSettingName: Output<String>? = null, configVersion: Output<String>? = null, defaultProvider: Output<BuiltInAuthenticationProvider>? = null, enabled: Output<Boolean>? = null, facebookAppId: Output<String>? = null, facebookAppSecret: Output<String>? = null, facebookAppSecretSettingName: Output<String>? = null, facebookOAuthScopes: Output<List<String>>? = null, gitHubClientId: Output<String>? = null, gitHubClientSecret: Output<String>? = null, gitHubClientSecretSettingName: Output<String>? = null, gitHubOAuthScopes: Output<List<String>>? = null, googleClientId: Output<String>? = null, googleClientSecret: Output<String>? = null, googleClientSecretSettingName: Output<String>? = null, googleOAuthScopes: Output<List<String>>? = null, isAuthFromFile: Output<String>? = null, issuer: Output<String>? = null, kind: Output<String>? = null, microsoftAccountClientId: Output<String>? = null, microsoftAccountClientSecret: Output<String>? = null, microsoftAccountClientSecretSettingName: Output<String>? = null, microsoftAccountOAuthScopes: Output<List<String>>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, runtimeVersion: Output<String>? = null, tokenRefreshExtensionHours: Output<Double>? = null, tokenStoreEnabled: Output<Boolean>? = null, twitterConsumerKey: Output<String>? = null, twitterConsumerSecret: Output<String>? = null, twitterConsumerSecretSettingName: Output<String>? = null, unauthenticatedClientAction: Output<UnauthenticatedClientAction>? = null, validateIssuer: Output<Boolean>? = null)

Properties

Link copied to clipboard
val aadClaimsAuthorization: Output<String>? = null

Gets a JSON string containing the Azure AD Acl settings.

Link copied to clipboard
val additionalLoginParams: Output<List<String>>? = null

Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form "key=value".

Link copied to clipboard
val allowedAudiences: Output<List<String>>? = null

Allowed audience values to consider when validating JSON Web Tokens issued by Azure Active Directory. Note that the ClientID value is always considered an allowed audience, regardless of this setting.

Link copied to clipboard

External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting typically only needed by Windows Store application backends. Note that URLs within the current domain are always implicitly allowed.

Link copied to clipboard
val authFilePath: Output<String>? = null

The path of the config file containing auth settings. If the path is relative, base will the site's root directory.

Link copied to clipboard
val clientId: Output<String>? = null

The Client ID of this relying party application, known as the client_id. This setting is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html

Link copied to clipboard
val clientSecret: Output<String>? = null

The Client Secret of this relying party application (in Azure Active Directory, this is also referred to as the Key). This setting is optional. If no client secret is configured, the OpenID Connect implicit auth flow is used to authenticate end users. Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html

Link copied to clipboard

An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also optional.

Link copied to clipboard
val clientSecretSettingName: Output<String>? = null

The app setting name that contains the client secret of the relying party application.

Link copied to clipboard
val configVersion: Output<String>? = null

The ConfigVersion of the Authentication / Authorization feature in use for the current app. The setting in this value can control the behavior of the control plane for Authentication / Authorization.

Link copied to clipboard

The default authentication provider to use when multiple providers are configured. This setting is only needed if multiple providers are configured and the unauthenticated client action is set to "RedirectToLoginPage".

Link copied to clipboard
val enabled: Output<Boolean>? = null

true if the Authentication / Authorization feature is enabled for the current app; otherwise, false.

Link copied to clipboard
val facebookAppId: Output<String>? = null

The App ID of the Facebook app used for login. This setting is required for enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login

Link copied to clipboard
val facebookAppSecret: Output<String>? = null

The App Secret of the Facebook app used for Facebook Login. This setting is required for enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login

Link copied to clipboard

The app setting name that contains the app secret used for Facebook Login.

Link copied to clipboard
val facebookOAuthScopes: Output<List<String>>? = null

The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. This setting is optional. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login

Link copied to clipboard
val gitHubClientId: Output<String>? = null

The Client Id of the GitHub app used for login. This setting is required for enabling Github login

Link copied to clipboard
val gitHubClientSecret: Output<String>? = null

The Client Secret of the GitHub app used for Github Login. This setting is required for enabling Github login.

Link copied to clipboard

The app setting name that contains the client secret of the Github app used for GitHub Login.

Link copied to clipboard
val gitHubOAuthScopes: Output<List<String>>? = null

The OAuth 2.0 scopes that will be requested as part of GitHub Login authentication. This setting is optional

Link copied to clipboard
val googleClientId: Output<String>? = null

The OpenID Connect Client ID for the Google web application. This setting is required for enabling Google Sign-In. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/

Link copied to clipboard
val googleClientSecret: Output<String>? = null

The client secret associated with the Google web application. This setting is required for enabling Google Sign-In. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/

Link copied to clipboard

The app setting name that contains the client secret associated with the Google web application.

Link copied to clipboard
val googleOAuthScopes: Output<List<String>>? = null

The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. This setting is optional. If not specified, "openid", "profile", and "email" are used as default scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/

Link copied to clipboard
val isAuthFromFile: Output<String>? = null

"true" if the auth config settings should be read from a file, "false" otherwise

Link copied to clipboard
val issuer: Output<String>? = null

The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html

Link copied to clipboard
val kind: Output<String>? = null

Kind of resource.

Link copied to clipboard
val microsoftAccountClientId: Output<String>? = null

The OAuth 2.0 client ID that was created for the app used for authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm

Link copied to clipboard

The OAuth 2.0 client secret that was created for the app used for authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm

Link copied to clipboard

The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.

Link copied to clipboard

The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx

Link copied to clipboard
val name: Output<String>? = null

Name of web app.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group to which the resource belongs.

Link copied to clipboard
val runtimeVersion: Output<String>? = null

The RuntimeVersion of the Authentication / Authorization feature in use for the current app. The setting in this value can control the behavior of certain features in the Authentication / Authorization module.

Link copied to clipboard
val tokenRefreshExtensionHours: Output<Double>? = null

The number of hours after session token expiration that a session token can be used to call the token refresh API. The default is 72 hours.

Link copied to clipboard
val tokenStoreEnabled: Output<Boolean>? = null

true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. The default is false.

Link copied to clipboard
val twitterConsumerKey: Output<String>? = null

The OAuth 1.0a consumer key of the Twitter application used for sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in

Link copied to clipboard
val twitterConsumerSecret: Output<String>? = null

The OAuth 1.0a consumer secret of the Twitter application used for sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in

Link copied to clipboard

The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.

Link copied to clipboard

The action to take when an unauthenticated client attempts to access the app.

Link copied to clipboard
val validateIssuer: Output<Boolean>? = null

Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such.

Functions

Link copied to clipboard
open override fun toJava(): WebAppAuthSettingsArgs