IdentityProviderArgs

data class IdentityProviderArgs(val acceptsPromptNoneForwardFromClient: Output<Boolean>? = null, val addReadTokenRoleOnCreate: Output<Boolean>? = null, val alias: Output<String>? = null, val authenticateByDefault: Output<Boolean>? = null, val authorizationUrl: Output<String>? = null, val backchannelSupported: Output<Boolean>? = null, val clientId: Output<String>? = null, val clientSecret: Output<String>? = null, val defaultScopes: Output<String>? = null, val disableUserInfo: Output<Boolean>? = null, val displayName: Output<String>? = null, val enabled: Output<Boolean>? = null, val extraConfig: Output<Map<String, String>>? = null, val firstBrokerLoginFlowAlias: Output<String>? = null, val guiOrder: Output<String>? = null, val hideOnLoginPage: Output<Boolean>? = null, val issuer: Output<String>? = null, val jwksUrl: Output<String>? = null, val linkOnly: Output<Boolean>? = null, val loginHint: Output<String>? = null, val logoutUrl: Output<String>? = null, val postBrokerLoginFlowAlias: Output<String>? = null, val providerId: Output<String>? = null, val realm: Output<String>? = null, val storeToken: Output<Boolean>? = null, val syncMode: Output<String>? = null, val tokenUrl: Output<String>? = null, val trustEmail: Output<Boolean>? = null, val uiLocales: Output<Boolean>? = null, val userInfoUrl: Output<String>? = null, val validateSignature: Output<Boolean>? = null) : ConvertibleToJava<IdentityProviderArgs>

Allows for creating and managing OIDC Identity Providers within Keycloak. OIDC (OpenID Connect) identity providers allows users to authenticate through a third party system using the OIDC standard.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";
const realm = new keycloak.Realm("realm", {
realm: "my-realm",
enabled: true,
});
const realmIdentityProvider = new keycloak.oidc.IdentityProvider("realm_identity_provider", {
realm: realm.id,
alias: "my-idp",
authorizationUrl: "https://authorizationurl.com",
clientId: "clientID",
clientSecret: "clientSecret",
tokenUrl: "https://tokenurl.com",
extraConfig: {
clientAuthMethod: "client_secret_post",
},
});
import pulumi
import pulumi_keycloak as keycloak
realm = keycloak.Realm("realm",
realm="my-realm",
enabled=True)
realm_identity_provider = keycloak.oidc.IdentityProvider("realm_identity_provider",
realm=realm.id,
alias="my-idp",
authorization_url="https://authorizationurl.com",
client_id="clientID",
client_secret="clientSecret",
token_url="https://tokenurl.com",
extra_config={
"clientAuthMethod": "client_secret_post",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Keycloak = Pulumi.Keycloak;
return await Deployment.RunAsync(() =>
{
var realm = new Keycloak.Realm("realm", new()
{
RealmName = "my-realm",
Enabled = true,
});
var realmIdentityProvider = new Keycloak.Oidc.IdentityProvider("realm_identity_provider", new()
{
Realm = realm.Id,
Alias = "my-idp",
AuthorizationUrl = "https://authorizationurl.com",
ClientId = "clientID",
ClientSecret = "clientSecret",
TokenUrl = "https://tokenurl.com",
ExtraConfig =
{
{ "clientAuthMethod", "client_secret_post" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak"
"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak/oidc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
realm, err := keycloak.NewRealm(ctx, "realm", &keycloak.RealmArgs{
Realm: pulumi.String("my-realm"),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = oidc.NewIdentityProvider(ctx, "realm_identity_provider", &oidc.IdentityProviderArgs{
Realm: realm.ID(),
Alias: pulumi.String("my-idp"),
AuthorizationUrl: pulumi.String("https://authorizationurl.com"),
ClientId: pulumi.String("clientID"),
ClientSecret: pulumi.String("clientSecret"),
TokenUrl: pulumi.String("https://tokenurl.com"),
ExtraConfig: pulumi.StringMap{
"clientAuthMethod": pulumi.String("client_secret_post"),
},
})
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.keycloak.Realm;
import com.pulumi.keycloak.RealmArgs;
import com.pulumi.keycloak.oidc.IdentityProvider;
import com.pulumi.keycloak.oidc.IdentityProviderArgs;
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 realm = new Realm("realm", RealmArgs.builder()
.realm("my-realm")
.enabled(true)
.build());
var realmIdentityProvider = new IdentityProvider("realmIdentityProvider", IdentityProviderArgs.builder()
.realm(realm.id())
.alias("my-idp")
.authorizationUrl("https://authorizationurl.com")
.clientId("clientID")
.clientSecret("clientSecret")
.tokenUrl("https://tokenurl.com")
.extraConfig(Map.of("clientAuthMethod", "client_secret_post"))
.build());
}
}
resources:
realm:
type: keycloak:Realm
properties:
realm: my-realm
enabled: true
realmIdentityProvider:
type: keycloak:oidc:IdentityProvider
name: realm_identity_provider
properties:
realm: ${realm.id}
alias: my-idp
authorizationUrl: https://authorizationurl.com
clientId: clientID
clientSecret: clientSecret
tokenUrl: https://tokenurl.com
extraConfig:
clientAuthMethod: client_secret_post

Import

Identity providers can be imported using the format {{realm_id}}/{{idp_alias}}, where idp_alias is the identity provider alias. Example: bash

$ pulumi import keycloak:oidc/identityProvider:IdentityProvider realm_identity_provider my-realm/my-idp

Constructors

Link copied to clipboard
constructor(acceptsPromptNoneForwardFromClient: Output<Boolean>? = null, addReadTokenRoleOnCreate: Output<Boolean>? = null, alias: Output<String>? = null, authenticateByDefault: Output<Boolean>? = null, authorizationUrl: Output<String>? = null, backchannelSupported: Output<Boolean>? = null, clientId: Output<String>? = null, clientSecret: Output<String>? = null, defaultScopes: Output<String>? = null, disableUserInfo: Output<Boolean>? = null, displayName: Output<String>? = null, enabled: Output<Boolean>? = null, extraConfig: Output<Map<String, String>>? = null, firstBrokerLoginFlowAlias: Output<String>? = null, guiOrder: Output<String>? = null, hideOnLoginPage: Output<Boolean>? = null, issuer: Output<String>? = null, jwksUrl: Output<String>? = null, linkOnly: Output<Boolean>? = null, loginHint: Output<String>? = null, logoutUrl: Output<String>? = null, postBrokerLoginFlowAlias: Output<String>? = null, providerId: Output<String>? = null, realm: Output<String>? = null, storeToken: Output<Boolean>? = null, syncMode: Output<String>? = null, tokenUrl: Output<String>? = null, trustEmail: Output<Boolean>? = null, uiLocales: Output<Boolean>? = null, userInfoUrl: Output<String>? = null, validateSignature: Output<Boolean>? = null)

Properties

Link copied to clipboard

When true, the IDP will accept forwarded authentication requests that contain the prompt=none query parameter. Defaults to false.

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

When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.

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

The alias uniquely identifies an identity provider and it is also used to build the redirect uri.

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

Enable/disable authenticate users by default.

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

The Authorization Url.

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

Does the external IDP support backchannel logout? Defaults to true.

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

The client or client identifier registered within the identity provider.

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

The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.

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

The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to openid.

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

When true, disables the usage of the user info service to obtain additional user information. Defaults to false.

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

Display name for the identity provider in the GUI.

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

When true, users will be able to log in to this realm using this identity provider. Defaults to true.

Link copied to clipboard
val extraConfig: Output<Map<String, String>>? = null
Link copied to clipboard
val firstBrokerLoginFlowAlias: Output<String>? = null

The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.

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

A number defining the order of this identity provider in the GUI.

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

When true, this provider will be hidden on the login page, and is only accessible when requested explicitly. Defaults to false.

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

The issuer identifier for the issuer of the response. If not provided, no validation will be performed.

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

JSON Web Key Set URL.

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

When true, users cannot login using this provider, but their existing accounts will be linked when possible. Defaults to false.

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

Pass login hint to identity provider.

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

The Logout URL is the end session endpoint to use to logout user from external identity provider.

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

The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.

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

The ID of the identity provider to use. Defaults to oidc, which should be used unless you have extended Keycloak and provided your own implementation.

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

The name of the realm. This is unique across Keycloak.

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

When true, tokens will be stored after authenticating users. Defaults to true.

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

The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.

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

The Token URL.

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

When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.

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

Pass current locale to identity provider. Defaults to false.

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

User Info URL.

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

Enable/disable signature validation of external IDP signatures. Defaults to false.

Functions

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