Allows for creating and managing GitHub-based OIDC Identity Providers within Keycloak.
OIDC (OpenID Connect) identity providers allows users to authenticate through a third party system using the OIDC standard.
The GitHub variant is specialized for the public GitHub instance (github.com) or GitHub Enterprise deployments.
For example, it will obtain automatically the primary email from the logged in account.
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 github = new keycloak.oidc.GithubIdentityProvider("github", {
realm: realm.id,
clientId: githubIdentityProviderClientId,
clientSecret: githubIdentityProviderClientSecret,
trustEmail: true,
syncMode: "IMPORT",
extraConfig: {
myCustomConfigKey: "myValue",
},
});
import pulumi
import pulumi_keycloak as keycloak
realm = keycloak.Realm("realm",
realm="my-realm",
enabled=True)
github = keycloak.oidc.GithubIdentityProvider("github",
realm=realm.id,
client_id=github_identity_provider_client_id,
client_secret=github_identity_provider_client_secret,
trust_email=True,
sync_mode="IMPORT",
extra_config={
"myCustomConfigKey": "myValue",
})
package main
import (
"github.com/pulumi/pulumi-keycloak/sdk/v6/go/keycloak"
"github.com/pulumi/pulumi-keycloak/sdk/v6/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.NewGithubIdentityProvider(ctx, "github", &oidc.GithubIdentityProviderArgs{
Realm: realm.ID(),
ClientId: pulumi.Any(githubIdentityProviderClientId),
ClientSecret: pulumi.Any(githubIdentityProviderClientSecret),
TrustEmail: pulumi.Bool(true),
SyncMode: pulumi.String("IMPORT"),
ExtraConfig: pulumi.StringMap{
"myCustomConfigKey": pulumi.String("myValue"),
},
})
if err != nil {
return err
}
return nil
})
}
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 github = new Keycloak.Oidc.GithubIdentityProvider("github", new()
{
Realm = realm.Id,
ClientId = githubIdentityProviderClientId,
ClientSecret = githubIdentityProviderClientSecret,
TrustEmail = true,
SyncMode = "IMPORT",
ExtraConfig =
{
{ "myCustomConfigKey", "myValue" },
},
});
});
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.GithubIdentityProvider;
import com.pulumi.keycloak.oidc.GithubIdentityProviderArgs;
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 github = new GithubIdentityProvider("github", GithubIdentityProviderArgs.builder()
.realm(realm.id())
.clientId(githubIdentityProviderClientId)
.clientSecret(githubIdentityProviderClientSecret)
.trustEmail(true)
.syncMode("IMPORT")
.extraConfig(Map.of("myCustomConfigKey", "myValue"))
.build());
}
}
resources:
realm:
type: keycloak:Realm
properties:
realm: my-realm
enabled: true
github:
type: keycloak:oidc:GithubIdentityProvider
properties:
realm: ${realm.id}
clientId: ${githubIdentityProviderClientId}
clientSecret: ${githubIdentityProviderClientSecret}
trustEmail: true
syncMode: IMPORT
extraConfig:
myCustomConfigKey: myValue
Create GithubIdentityProvider Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GithubIdentityProvider(name: string, args: GithubIdentityProviderArgs, opts?: CustomResourceOptions);@overload
def GithubIdentityProvider(resource_name: str,
args: GithubIdentityProviderArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GithubIdentityProvider(resource_name: str,
opts: Optional[ResourceOptions] = None,
client_id: Optional[str] = None,
realm: Optional[str] = None,
client_secret: Optional[str] = None,
github_json_format: Optional[bool] = None,
hide_on_login_page: Optional[bool] = None,
authenticate_by_default: Optional[bool] = None,
api_url: Optional[str] = None,
default_scopes: Optional[str] = None,
display_name: Optional[str] = None,
enabled: Optional[bool] = None,
extra_config: Optional[Mapping[str, str]] = None,
first_broker_login_flow_alias: Optional[str] = None,
add_read_token_role_on_create: Optional[bool] = None,
gui_order: Optional[str] = None,
base_url: Optional[str] = None,
link_only: Optional[bool] = None,
org_domain: Optional[str] = None,
org_redirect_mode_email_matches: Optional[bool] = None,
organization_id: Optional[str] = None,
post_broker_login_flow_alias: Optional[str] = None,
provider_id: Optional[str] = None,
alias: Optional[str] = None,
store_token: Optional[bool] = None,
sync_mode: Optional[str] = None,
trust_email: Optional[bool] = None)func NewGithubIdentityProvider(ctx *Context, name string, args GithubIdentityProviderArgs, opts ...ResourceOption) (*GithubIdentityProvider, error)public GithubIdentityProvider(string name, GithubIdentityProviderArgs args, CustomResourceOptions? opts = null)
public GithubIdentityProvider(String name, GithubIdentityProviderArgs args)
public GithubIdentityProvider(String name, GithubIdentityProviderArgs args, CustomResourceOptions options)
type: keycloak:oidc:GithubIdentityProvider
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GithubIdentityProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args GithubIdentityProviderArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GithubIdentityProviderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GithubIdentityProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GithubIdentityProviderArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var githubIdentityProviderResource = new Keycloak.Oidc.GithubIdentityProvider("githubIdentityProviderResource", new()
{
ClientId = "string",
Realm = "string",
ClientSecret = "string",
GithubJsonFormat = false,
HideOnLoginPage = false,
AuthenticateByDefault = false,
ApiUrl = "string",
DefaultScopes = "string",
DisplayName = "string",
Enabled = false,
ExtraConfig =
{
{ "string", "string" },
},
FirstBrokerLoginFlowAlias = "string",
AddReadTokenRoleOnCreate = false,
GuiOrder = "string",
BaseUrl = "string",
LinkOnly = false,
OrgDomain = "string",
OrgRedirectModeEmailMatches = false,
OrganizationId = "string",
PostBrokerLoginFlowAlias = "string",
ProviderId = "string",
Alias = "string",
StoreToken = false,
SyncMode = "string",
TrustEmail = false,
});
example, err := oidc.NewGithubIdentityProvider(ctx, "githubIdentityProviderResource", &oidc.GithubIdentityProviderArgs{
ClientId: pulumi.String("string"),
Realm: pulumi.String("string"),
ClientSecret: pulumi.String("string"),
GithubJsonFormat: pulumi.Bool(false),
HideOnLoginPage: pulumi.Bool(false),
AuthenticateByDefault: pulumi.Bool(false),
ApiUrl: pulumi.String("string"),
DefaultScopes: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Enabled: pulumi.Bool(false),
ExtraConfig: pulumi.StringMap{
"string": pulumi.String("string"),
},
FirstBrokerLoginFlowAlias: pulumi.String("string"),
AddReadTokenRoleOnCreate: pulumi.Bool(false),
GuiOrder: pulumi.String("string"),
BaseUrl: pulumi.String("string"),
LinkOnly: pulumi.Bool(false),
OrgDomain: pulumi.String("string"),
OrgRedirectModeEmailMatches: pulumi.Bool(false),
OrganizationId: pulumi.String("string"),
PostBrokerLoginFlowAlias: pulumi.String("string"),
ProviderId: pulumi.String("string"),
Alias: pulumi.String("string"),
StoreToken: pulumi.Bool(false),
SyncMode: pulumi.String("string"),
TrustEmail: pulumi.Bool(false),
})
var githubIdentityProviderResource = new GithubIdentityProvider("githubIdentityProviderResource", GithubIdentityProviderArgs.builder()
.clientId("string")
.realm("string")
.clientSecret("string")
.githubJsonFormat(false)
.hideOnLoginPage(false)
.authenticateByDefault(false)
.apiUrl("string")
.defaultScopes("string")
.displayName("string")
.enabled(false)
.extraConfig(Map.of("string", "string"))
.firstBrokerLoginFlowAlias("string")
.addReadTokenRoleOnCreate(false)
.guiOrder("string")
.baseUrl("string")
.linkOnly(false)
.orgDomain("string")
.orgRedirectModeEmailMatches(false)
.organizationId("string")
.postBrokerLoginFlowAlias("string")
.providerId("string")
.alias("string")
.storeToken(false)
.syncMode("string")
.trustEmail(false)
.build());
github_identity_provider_resource = keycloak.oidc.GithubIdentityProvider("githubIdentityProviderResource",
client_id="string",
realm="string",
client_secret="string",
github_json_format=False,
hide_on_login_page=False,
authenticate_by_default=False,
api_url="string",
default_scopes="string",
display_name="string",
enabled=False,
extra_config={
"string": "string",
},
first_broker_login_flow_alias="string",
add_read_token_role_on_create=False,
gui_order="string",
base_url="string",
link_only=False,
org_domain="string",
org_redirect_mode_email_matches=False,
organization_id="string",
post_broker_login_flow_alias="string",
provider_id="string",
alias="string",
store_token=False,
sync_mode="string",
trust_email=False)
const githubIdentityProviderResource = new keycloak.oidc.GithubIdentityProvider("githubIdentityProviderResource", {
clientId: "string",
realm: "string",
clientSecret: "string",
githubJsonFormat: false,
hideOnLoginPage: false,
authenticateByDefault: false,
apiUrl: "string",
defaultScopes: "string",
displayName: "string",
enabled: false,
extraConfig: {
string: "string",
},
firstBrokerLoginFlowAlias: "string",
addReadTokenRoleOnCreate: false,
guiOrder: "string",
baseUrl: "string",
linkOnly: false,
orgDomain: "string",
orgRedirectModeEmailMatches: false,
organizationId: "string",
postBrokerLoginFlowAlias: "string",
providerId: "string",
alias: "string",
storeToken: false,
syncMode: "string",
trustEmail: false,
});
type: keycloak:oidc:GithubIdentityProvider
properties:
addReadTokenRoleOnCreate: false
alias: string
apiUrl: string
authenticateByDefault: false
baseUrl: string
clientId: string
clientSecret: string
defaultScopes: string
displayName: string
enabled: false
extraConfig:
string: string
firstBrokerLoginFlowAlias: string
githubJsonFormat: false
guiOrder: string
hideOnLoginPage: false
linkOnly: false
orgDomain: string
orgRedirectModeEmailMatches: false
organizationId: string
postBrokerLoginFlowAlias: string
providerId: string
realm: string
storeToken: false
syncMode: string
trustEmail: false
GithubIdentityProvider Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GithubIdentityProvider resource accepts the following input properties:
- Client
Id string - The client or client identifier registered within the identity provider.
- Client
Secret string - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- Realm string
- The name of the realm. This is unique across Keycloak.
- Add
Read boolToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - Alias string
- The alias for the GitHub identity provider.
- Api
Url string - The GitHub API URL, defaults to
https://api.github.com. - Authenticate
By boolDefault - Enable/disable authenticate users by default.
- Base
Url string - The GitHub base URL, defaults to
https://github.com - Default
Scopes string - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - Display
Name string - Display name for the GitHub identity provider in the GUI.
- Enabled bool
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - Extra
Config Dictionary<string, string> - First
Broker stringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - Github
Json boolFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - Gui
Order string - A number defining the order of this identity provider in the GUI.
- Hide
On boolLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - Link
Only bool - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - Org
Domain string - Org
Redirect boolMode Email Matches - Organization
Id string - ID of organization with which this identity is linked.
- Post
Broker stringLogin Flow Alias - 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.
- Provider
Id string - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - Store
Token bool - When
true, tokens will be stored after authenticating users. Defaults totrue. - Sync
Mode string - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - Trust
Email bool - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- Client
Id string - The client or client identifier registered within the identity provider.
- Client
Secret string - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- Realm string
- The name of the realm. This is unique across Keycloak.
- Add
Read boolToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - Alias string
- The alias for the GitHub identity provider.
- Api
Url string - The GitHub API URL, defaults to
https://api.github.com. - Authenticate
By boolDefault - Enable/disable authenticate users by default.
- Base
Url string - The GitHub base URL, defaults to
https://github.com - Default
Scopes string - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - Display
Name string - Display name for the GitHub identity provider in the GUI.
- Enabled bool
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - Extra
Config map[string]string - First
Broker stringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - Github
Json boolFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - Gui
Order string - A number defining the order of this identity provider in the GUI.
- Hide
On boolLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - Link
Only bool - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - Org
Domain string - Org
Redirect boolMode Email Matches - Organization
Id string - ID of organization with which this identity is linked.
- Post
Broker stringLogin Flow Alias - 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.
- Provider
Id string - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - Store
Token bool - When
true, tokens will be stored after authenticating users. Defaults totrue. - Sync
Mode string - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - Trust
Email bool - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- client
Id String - The client or client identifier registered within the identity provider.
- client
Secret String - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- realm String
- The name of the realm. This is unique across Keycloak.
- add
Read BooleanToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - alias String
- The alias for the GitHub identity provider.
- api
Url String - The GitHub API URL, defaults to
https://api.github.com. - authenticate
By BooleanDefault - Enable/disable authenticate users by default.
- base
Url String - The GitHub base URL, defaults to
https://github.com - default
Scopes String - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - display
Name String - Display name for the GitHub identity provider in the GUI.
- enabled Boolean
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - extra
Config Map<String,String> - first
Broker StringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - github
Json BooleanFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - gui
Order String - A number defining the order of this identity provider in the GUI.
- hide
On BooleanLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - link
Only Boolean - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - org
Domain String - org
Redirect BooleanMode Email Matches - organization
Id String - ID of organization with which this identity is linked.
- post
Broker StringLogin Flow Alias - 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.
- provider
Id String - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - store
Token Boolean - When
true, tokens will be stored after authenticating users. Defaults totrue. - sync
Mode String - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - trust
Email Boolean - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- client
Id string - The client or client identifier registered within the identity provider.
- client
Secret string - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- realm string
- The name of the realm. This is unique across Keycloak.
- add
Read booleanToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - alias string
- The alias for the GitHub identity provider.
- api
Url string - The GitHub API URL, defaults to
https://api.github.com. - authenticate
By booleanDefault - Enable/disable authenticate users by default.
- base
Url string - The GitHub base URL, defaults to
https://github.com - default
Scopes string - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - display
Name string - Display name for the GitHub identity provider in the GUI.
- enabled boolean
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - extra
Config {[key: string]: string} - first
Broker stringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - github
Json booleanFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - gui
Order string - A number defining the order of this identity provider in the GUI.
- hide
On booleanLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - link
Only boolean - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - org
Domain string - org
Redirect booleanMode Email Matches - organization
Id string - ID of organization with which this identity is linked.
- post
Broker stringLogin Flow Alias - 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.
- provider
Id string - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - store
Token boolean - When
true, tokens will be stored after authenticating users. Defaults totrue. - sync
Mode string - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - trust
Email boolean - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- client_
id str - The client or client identifier registered within the identity provider.
- client_
secret str - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- realm str
- The name of the realm. This is unique across Keycloak.
- add_
read_ booltoken_ role_ on_ create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - alias str
- The alias for the GitHub identity provider.
- api_
url str - The GitHub API URL, defaults to
https://api.github.com. - authenticate_
by_ booldefault - Enable/disable authenticate users by default.
- base_
url str - The GitHub base URL, defaults to
https://github.com - default_
scopes str - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - display_
name str - Display name for the GitHub identity provider in the GUI.
- enabled bool
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - extra_
config Mapping[str, str] - first_
broker_ strlogin_ flow_ alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - github_
json_ boolformat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - gui_
order str - A number defining the order of this identity provider in the GUI.
- hide_
on_ boollogin_ page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - link_
only bool - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - org_
domain str - org_
redirect_ boolmode_ email_ matches - organization_
id str - ID of organization with which this identity is linked.
- post_
broker_ strlogin_ flow_ alias - 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.
- provider_
id str - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - store_
token bool - When
true, tokens will be stored after authenticating users. Defaults totrue. - sync_
mode str - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - trust_
email bool - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- client
Id String - The client or client identifier registered within the identity provider.
- client
Secret String - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- realm String
- The name of the realm. This is unique across Keycloak.
- add
Read BooleanToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - alias String
- The alias for the GitHub identity provider.
- api
Url String - The GitHub API URL, defaults to
https://api.github.com. - authenticate
By BooleanDefault - Enable/disable authenticate users by default.
- base
Url String - The GitHub base URL, defaults to
https://github.com - default
Scopes String - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - display
Name String - Display name for the GitHub identity provider in the GUI.
- enabled Boolean
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - extra
Config Map<String> - first
Broker StringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - github
Json BooleanFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - gui
Order String - A number defining the order of this identity provider in the GUI.
- hide
On BooleanLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - link
Only Boolean - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - org
Domain String - org
Redirect BooleanMode Email Matches - organization
Id String - ID of organization with which this identity is linked.
- post
Broker StringLogin Flow Alias - 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.
- provider
Id String - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - store
Token Boolean - When
true, tokens will be stored after authenticating users. Defaults totrue. - sync
Mode String - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - trust
Email Boolean - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
Outputs
All input properties are implicitly available as output properties. Additionally, the GithubIdentityProvider resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Internal
Id string - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Internal
Id string - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- id String
- The provider-assigned unique ID for this managed resource.
- internal
Id String - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- id string
- The provider-assigned unique ID for this managed resource.
- internal
Id string - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- id str
- The provider-assigned unique ID for this managed resource.
- internal_
id str - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- id String
- The provider-assigned unique ID for this managed resource.
- internal
Id String - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
Look up Existing GithubIdentityProvider Resource
Get an existing GithubIdentityProvider resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GithubIdentityProviderState, opts?: CustomResourceOptions): GithubIdentityProvider@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
add_read_token_role_on_create: Optional[bool] = None,
alias: Optional[str] = None,
api_url: Optional[str] = None,
authenticate_by_default: Optional[bool] = None,
base_url: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
default_scopes: Optional[str] = None,
display_name: Optional[str] = None,
enabled: Optional[bool] = None,
extra_config: Optional[Mapping[str, str]] = None,
first_broker_login_flow_alias: Optional[str] = None,
github_json_format: Optional[bool] = None,
gui_order: Optional[str] = None,
hide_on_login_page: Optional[bool] = None,
internal_id: Optional[str] = None,
link_only: Optional[bool] = None,
org_domain: Optional[str] = None,
org_redirect_mode_email_matches: Optional[bool] = None,
organization_id: Optional[str] = None,
post_broker_login_flow_alias: Optional[str] = None,
provider_id: Optional[str] = None,
realm: Optional[str] = None,
store_token: Optional[bool] = None,
sync_mode: Optional[str] = None,
trust_email: Optional[bool] = None) -> GithubIdentityProviderfunc GetGithubIdentityProvider(ctx *Context, name string, id IDInput, state *GithubIdentityProviderState, opts ...ResourceOption) (*GithubIdentityProvider, error)public static GithubIdentityProvider Get(string name, Input<string> id, GithubIdentityProviderState? state, CustomResourceOptions? opts = null)public static GithubIdentityProvider get(String name, Output<String> id, GithubIdentityProviderState state, CustomResourceOptions options)resources: _: type: keycloak:oidc:GithubIdentityProvider get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Add
Read boolToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - Alias string
- The alias for the GitHub identity provider.
- Api
Url string - The GitHub API URL, defaults to
https://api.github.com. - Authenticate
By boolDefault - Enable/disable authenticate users by default.
- Base
Url string - The GitHub base URL, defaults to
https://github.com - Client
Id string - The client or client identifier registered within the identity provider.
- Client
Secret string - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- Default
Scopes string - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - Display
Name string - Display name for the GitHub identity provider in the GUI.
- Enabled bool
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - Extra
Config Dictionary<string, string> - First
Broker stringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - Github
Json boolFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - Gui
Order string - A number defining the order of this identity provider in the GUI.
- Hide
On boolLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - Internal
Id string - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- Link
Only bool - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - Org
Domain string - Org
Redirect boolMode Email Matches - Organization
Id string - ID of organization with which this identity is linked.
- Post
Broker stringLogin Flow Alias - 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.
- Provider
Id string - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - Realm string
- The name of the realm. This is unique across Keycloak.
- Store
Token bool - When
true, tokens will be stored after authenticating users. Defaults totrue. - Sync
Mode string - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - Trust
Email bool - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- Add
Read boolToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - Alias string
- The alias for the GitHub identity provider.
- Api
Url string - The GitHub API URL, defaults to
https://api.github.com. - Authenticate
By boolDefault - Enable/disable authenticate users by default.
- Base
Url string - The GitHub base URL, defaults to
https://github.com - Client
Id string - The client or client identifier registered within the identity provider.
- Client
Secret string - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- Default
Scopes string - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - Display
Name string - Display name for the GitHub identity provider in the GUI.
- Enabled bool
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - Extra
Config map[string]string - First
Broker stringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - Github
Json boolFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - Gui
Order string - A number defining the order of this identity provider in the GUI.
- Hide
On boolLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - Internal
Id string - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- Link
Only bool - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - Org
Domain string - Org
Redirect boolMode Email Matches - Organization
Id string - ID of organization with which this identity is linked.
- Post
Broker stringLogin Flow Alias - 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.
- Provider
Id string - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - Realm string
- The name of the realm. This is unique across Keycloak.
- Store
Token bool - When
true, tokens will be stored after authenticating users. Defaults totrue. - Sync
Mode string - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - Trust
Email bool - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- add
Read BooleanToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - alias String
- The alias for the GitHub identity provider.
- api
Url String - The GitHub API URL, defaults to
https://api.github.com. - authenticate
By BooleanDefault - Enable/disable authenticate users by default.
- base
Url String - The GitHub base URL, defaults to
https://github.com - client
Id String - The client or client identifier registered within the identity provider.
- client
Secret String - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- default
Scopes String - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - display
Name String - Display name for the GitHub identity provider in the GUI.
- enabled Boolean
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - extra
Config Map<String,String> - first
Broker StringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - github
Json BooleanFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - gui
Order String - A number defining the order of this identity provider in the GUI.
- hide
On BooleanLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - internal
Id String - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- link
Only Boolean - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - org
Domain String - org
Redirect BooleanMode Email Matches - organization
Id String - ID of organization with which this identity is linked.
- post
Broker StringLogin Flow Alias - 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.
- provider
Id String - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - realm String
- The name of the realm. This is unique across Keycloak.
- store
Token Boolean - When
true, tokens will be stored after authenticating users. Defaults totrue. - sync
Mode String - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - trust
Email Boolean - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- add
Read booleanToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - alias string
- The alias for the GitHub identity provider.
- api
Url string - The GitHub API URL, defaults to
https://api.github.com. - authenticate
By booleanDefault - Enable/disable authenticate users by default.
- base
Url string - The GitHub base URL, defaults to
https://github.com - client
Id string - The client or client identifier registered within the identity provider.
- client
Secret string - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- default
Scopes string - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - display
Name string - Display name for the GitHub identity provider in the GUI.
- enabled boolean
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - extra
Config {[key: string]: string} - first
Broker stringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - github
Json booleanFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - gui
Order string - A number defining the order of this identity provider in the GUI.
- hide
On booleanLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - internal
Id string - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- link
Only boolean - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - org
Domain string - org
Redirect booleanMode Email Matches - organization
Id string - ID of organization with which this identity is linked.
- post
Broker stringLogin Flow Alias - 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.
- provider
Id string - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - realm string
- The name of the realm. This is unique across Keycloak.
- store
Token boolean - When
true, tokens will be stored after authenticating users. Defaults totrue. - sync
Mode string - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - trust
Email boolean - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- add_
read_ booltoken_ role_ on_ create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - alias str
- The alias for the GitHub identity provider.
- api_
url str - The GitHub API URL, defaults to
https://api.github.com. - authenticate_
by_ booldefault - Enable/disable authenticate users by default.
- base_
url str - The GitHub base URL, defaults to
https://github.com - client_
id str - The client or client identifier registered within the identity provider.
- client_
secret str - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- default_
scopes str - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - display_
name str - Display name for the GitHub identity provider in the GUI.
- enabled bool
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - extra_
config Mapping[str, str] - first_
broker_ strlogin_ flow_ alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - github_
json_ boolformat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - gui_
order str - A number defining the order of this identity provider in the GUI.
- hide_
on_ boollogin_ page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - internal_
id str - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- link_
only bool - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - org_
domain str - org_
redirect_ boolmode_ email_ matches - organization_
id str - ID of organization with which this identity is linked.
- post_
broker_ strlogin_ flow_ alias - 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.
- provider_
id str - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - realm str
- The name of the realm. This is unique across Keycloak.
- store_
token bool - When
true, tokens will be stored after authenticating users. Defaults totrue. - sync_
mode str - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - trust_
email bool - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
- add
Read BooleanToken Role On Create - When
true, new users will be able to read stored tokens. This will automatically assign thebroker.read-tokenrole. Defaults tofalse. - alias String
- The alias for the GitHub identity provider.
- api
Url String - The GitHub API URL, defaults to
https://api.github.com. - authenticate
By BooleanDefault - Enable/disable authenticate users by default.
- base
Url String - The GitHub base URL, defaults to
https://github.com - client
Id String - The client or client identifier registered within the identity provider.
- client
Secret String - The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
- default
Scopes String - The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to
user:email. - display
Name String - Display name for the GitHub identity provider in the GUI.
- enabled Boolean
- When
true, users will be able to log in to this realm using this identity provider. Defaults totrue. - extra
Config Map<String> - first
Broker StringLogin Flow Alias - The authentication flow to use when users log in for the first time through this identity provider. Defaults to
first broker login. - github
Json BooleanFormat - When
true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults tofalse. - gui
Order String - A number defining the order of this identity provider in the GUI.
- hide
On BooleanLogin Page - When
true, this identity provider will be hidden on the login page. Defaults tofalse. - internal
Id String - (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
- link
Only Boolean - When
true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults tofalse. - org
Domain String - org
Redirect BooleanMode Email Matches - organization
Id String - ID of organization with which this identity is linked.
- post
Broker StringLogin Flow Alias - 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.
- provider
Id String - The ID of the identity provider to use. Defaults to
github, which should be used unless you have extended Keycloak and provided your own implementation. - realm String
- The name of the realm. This is unique across Keycloak.
- store
Token Boolean - When
true, tokens will be stored after authenticating users. Defaults totrue. - sync
Mode String - The default sync mode to use for all mappers attached to this identity provider. Can be once of
IMPORT,FORCE, orLEGACY. - trust
Email Boolean - When
true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults tofalse.
Import
GitHub 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/githubIdentityProvider:GithubIdentityProvider github_identity_provider my-realm/my-github-idp
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Keycloak pulumi/pulumi-keycloak
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
keycloakTerraform Provider.
