@pulumi/keycloak 5.3.0 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributeImporterIdentityProviderMapper.d.ts +45 -63
- package/attributeImporterIdentityProviderMapper.js +24 -33
- package/attributeImporterIdentityProviderMapper.js.map +1 -1
- package/attributeToRoleIdentityMapper.d.ts +14 -6
- package/attributeToRoleIdentityMapper.js +14 -6
- package/attributeToRoleIdentityMapper.js.map +1 -1
- package/authentication/bindings.d.ts +3 -3
- package/authentication/bindings.js +3 -3
- package/authentication/execution.d.ts +8 -4
- package/authentication/execution.js +8 -4
- package/authentication/execution.js.map +1 -1
- package/authentication/executionConfig.d.ts +10 -2
- package/authentication/executionConfig.js +10 -2
- package/authentication/executionConfig.js.map +1 -1
- package/authentication/flow.d.ts +14 -2
- package/authentication/flow.js +14 -2
- package/authentication/flow.js.map +1 -1
- package/authentication/subflow.d.ts +16 -2
- package/authentication/subflow.js +16 -2
- package/authentication/subflow.js.map +1 -1
- package/customIdentityProviderMapping.d.ts +12 -5
- package/customIdentityProviderMapping.js +12 -5
- package/customIdentityProviderMapping.js.map +1 -1
- package/customUserFederation.d.ts +48 -48
- package/customUserFederation.js +24 -12
- package/customUserFederation.js.map +1 -1
- package/defaultGroups.d.ts +19 -26
- package/defaultGroups.js +19 -8
- package/defaultGroups.js.map +1 -1
- package/defaultRoles.d.ts +12 -3
- package/defaultRoles.js +12 -3
- package/defaultRoles.js.map +1 -1
- package/genericClientProtocolMapper.d.ts +36 -34
- package/genericClientProtocolMapper.js +21 -10
- package/genericClientProtocolMapper.js.map +1 -1
- package/genericClientRoleMapper.d.ts +42 -15
- package/genericClientRoleMapper.js +42 -15
- package/genericClientRoleMapper.js.map +1 -1
- package/genericProtocolMapper.d.ts +9 -4
- package/genericProtocolMapper.js +9 -4
- package/genericProtocolMapper.js.map +1 -1
- package/genericRoleMapper.d.ts +42 -15
- package/genericRoleMapper.js +42 -15
- package/genericRoleMapper.js.map +1 -1
- package/getClientDescriptionConverter.d.ts +50 -50
- package/getClientDescriptionConverter.js +50 -50
- package/getGroup.d.ts +4 -62
- package/getGroup.js +4 -50
- package/getGroup.js.map +1 -1
- package/getRealm.d.ts +36 -10
- package/getRealm.js +36 -4
- package/getRealm.js.map +1 -1
- package/getRealmKeys.d.ts +8 -28
- package/getRealmKeys.js +8 -4
- package/getRealmKeys.js.map +1 -1
- package/getRole.d.ts +4 -65
- package/getRole.js +4 -44
- package/getRole.js.map +1 -1
- package/getUser.d.ts +2 -0
- package/getUser.js +2 -0
- package/getUser.js.map +1 -1
- package/getUserRealmRoles.d.ts +4 -0
- package/getUserRealmRoles.js +4 -0
- package/getUserRealmRoles.js.map +1 -1
- package/group.d.ts +37 -57
- package/group.js +37 -15
- package/group.js.map +1 -1
- package/groupMemberships.d.ts +28 -43
- package/groupMemberships.js +28 -16
- package/groupMemberships.js.map +1 -1
- package/groupPermissions.d.ts +13 -0
- package/groupPermissions.js +13 -0
- package/groupPermissions.js.map +1 -1
- package/groupRoles.d.ts +35 -90
- package/groupRoles.js +35 -54
- package/groupRoles.js.map +1 -1
- package/hardcodedAttributeIdentityProviderMapper.d.ts +4 -3
- package/hardcodedAttributeIdentityProviderMapper.js +4 -3
- package/hardcodedAttributeIdentityProviderMapper.js.map +1 -1
- package/hardcodedRoleIdentityMapper.d.ts +6 -4
- package/hardcodedRoleIdentityMapper.js +6 -4
- package/hardcodedRoleIdentityMapper.js.map +1 -1
- package/identityProviderTokenExchangeScopePermission.d.ts +13 -6
- package/identityProviderTokenExchangeScopePermission.js +13 -6
- package/identityProviderTokenExchangeScopePermission.js.map +1 -1
- package/ldap/customMapper.d.ts +14 -6
- package/ldap/customMapper.js +14 -6
- package/ldap/customMapper.js.map +1 -1
- package/ldap/fullNameMapper.d.ts +35 -48
- package/ldap/fullNameMapper.js +26 -12
- package/ldap/fullNameMapper.js.map +1 -1
- package/ldap/groupMapper.d.ts +47 -156
- package/ldap/groupMapper.js +38 -12
- package/ldap/groupMapper.js.map +1 -1
- package/ldap/hardcodedAttributeMapper.d.ts +12 -4
- package/ldap/hardcodedAttributeMapper.js +12 -4
- package/ldap/hardcodedAttributeMapper.js.map +1 -1
- package/ldap/hardcodedGroupMapper.d.ts +16 -5
- package/ldap/hardcodedGroupMapper.js +16 -5
- package/ldap/hardcodedGroupMapper.js.map +1 -1
- package/ldap/hardcodedRoleMapper.d.ts +31 -66
- package/ldap/hardcodedRoleMapper.js +19 -54
- package/ldap/hardcodedRoleMapper.js.map +1 -1
- package/ldap/msadLdsUserAccountControlMapper.d.ts +12 -4
- package/ldap/msadLdsUserAccountControlMapper.js +12 -4
- package/ldap/msadLdsUserAccountControlMapper.js.map +1 -1
- package/ldap/msadUserAccountControlMapper.d.ts +29 -27
- package/ldap/msadUserAccountControlMapper.js +20 -9
- package/ldap/msadUserAccountControlMapper.js.map +1 -1
- package/ldap/roleMapper.d.ts +12 -4
- package/ldap/roleMapper.js +12 -4
- package/ldap/roleMapper.js.map +1 -1
- package/ldap/userAttributeMapper.d.ts +54 -39
- package/ldap/userAttributeMapper.js +24 -9
- package/ldap/userAttributeMapper.js.map +1 -1
- package/ldap/userFederation.d.ts +117 -88
- package/ldap/userFederation.js +45 -13
- package/ldap/userFederation.js.map +1 -1
- package/oidc/googleIdentityProvider.d.ts +8 -4
- package/oidc/googleIdentityProvider.js +8 -4
- package/oidc/googleIdentityProvider.js.map +1 -1
- package/oidc/identityProvider.d.ts +7 -3
- package/oidc/identityProvider.js +7 -3
- package/oidc/identityProvider.js.map +1 -1
- package/openid/audienceProtocolMapper.d.ts +62 -43
- package/openid/audienceProtocolMapper.js +38 -19
- package/openid/audienceProtocolMapper.js.map +1 -1
- package/openid/audienceResolveProtocolMapper.d.ts +22 -7
- package/openid/audienceResolveProtocolMapper.js +22 -7
- package/openid/audienceResolveProtocolMapper.js.map +1 -1
- package/openid/audienceResolveProtocolMappter.d.ts +22 -7
- package/openid/audienceResolveProtocolMappter.js +22 -7
- package/openid/audienceResolveProtocolMappter.js.map +1 -1
- package/openid/client.d.ts +45 -429
- package/openid/client.js +45 -12
- package/openid/client.js.map +1 -1
- package/openid/clientAuthorizationPermission.d.ts +6 -2
- package/openid/clientAuthorizationPermission.js +6 -2
- package/openid/clientAuthorizationPermission.js.map +1 -1
- package/openid/clientDefaultScopes.d.ts +16 -31
- package/openid/clientDefaultScopes.js +16 -4
- package/openid/clientDefaultScopes.js.map +1 -1
- package/openid/clientOptionalScopes.d.ts +16 -32
- package/openid/clientOptionalScopes.js +16 -5
- package/openid/clientOptionalScopes.js.map +1 -1
- package/openid/clientPolicy.d.ts +5 -3
- package/openid/clientPolicy.js +5 -3
- package/openid/clientPolicy.js.map +1 -1
- package/openid/clientScope.d.ts +25 -66
- package/openid/clientScope.js +25 -12
- package/openid/clientScope.js.map +1 -1
- package/openid/clientServiceAccountRealmRole.d.ts +12 -4
- package/openid/clientServiceAccountRealmRole.js +12 -4
- package/openid/clientServiceAccountRealmRole.js.map +1 -1
- package/openid/clientServiceAccountRole.d.ts +14 -5
- package/openid/clientServiceAccountRole.js +14 -5
- package/openid/clientServiceAccountRole.js.map +1 -1
- package/openid/fullNameProtocolMapper.d.ts +49 -59
- package/openid/fullNameProtocolMapper.js +37 -20
- package/openid/fullNameProtocolMapper.js.map +1 -1
- package/openid/getClient.d.ts +30 -14
- package/openid/getClient.js +30 -2
- package/openid/getClient.js.map +1 -1
- package/openid/getClientAuthorizationPolicy.d.ts +8 -2
- package/openid/getClientAuthorizationPolicy.js +8 -2
- package/openid/getClientAuthorizationPolicy.js.map +1 -1
- package/openid/getClientScope.d.ts +4 -2
- package/openid/getClientScope.js +4 -2
- package/openid/getClientScope.js.map +1 -1
- package/openid/getClientServiceAccountUser.d.ts +4 -2
- package/openid/getClientServiceAccountUser.js +4 -2
- package/openid/getClientServiceAccountUser.js.map +1 -1
- package/openid/groupMembershipProtocolMapper.d.ts +51 -77
- package/openid/groupMembershipProtocolMapper.js +39 -20
- package/openid/groupMembershipProtocolMapper.js.map +1 -1
- package/openid/hardcodedClaimProtocolMapper.d.ts +64 -62
- package/openid/hardcodedClaimProtocolMapper.js +40 -20
- package/openid/hardcodedClaimProtocolMapper.js.map +1 -1
- package/openid/hardcodedRoleProtocolMapper.d.ts +56 -43
- package/openid/hardcodedRoleProtocolMapper.js +44 -22
- package/openid/hardcodedRoleProtocolMapper.js.map +1 -1
- package/openid/scriptProtocolMapper.d.ts +23 -7
- package/openid/scriptProtocolMapper.js +23 -7
- package/openid/scriptProtocolMapper.js.map +1 -1
- package/openid/userAttributeProtocolMapper.d.ts +71 -68
- package/openid/userAttributeProtocolMapper.js +41 -20
- package/openid/userAttributeProtocolMapper.js.map +1 -1
- package/openid/userClientRoleProtocolMapper.d.ts +23 -7
- package/openid/userClientRoleProtocolMapper.js +23 -7
- package/openid/userClientRoleProtocolMapper.js.map +1 -1
- package/openid/userPropertyProtocolMapper.d.ts +64 -63
- package/openid/userPropertyProtocolMapper.js +40 -21
- package/openid/userPropertyProtocolMapper.js.map +1 -1
- package/openid/userRealmRoleProtocolMapper.d.ts +71 -59
- package/openid/userRealmRoleProtocolMapper.js +41 -20
- package/openid/userRealmRoleProtocolMapper.js.map +1 -1
- package/openid/userSessionNoteProtocolMapper.d.ts +23 -7
- package/openid/userSessionNoteProtocolMapper.js +23 -7
- package/openid/userSessionNoteProtocolMapper.js.map +1 -1
- package/package.json +1 -1
- package/realm.d.ts +30 -509
- package/realm.js +0 -83
- package/realm.js.map +1 -1
- package/realmEvents.d.ts +15 -71
- package/realmEvents.js +15 -8
- package/realmEvents.js.map +1 -1
- package/realmKeystoreAesGenerated.d.ts +8 -3
- package/realmKeystoreAesGenerated.js +8 -3
- package/realmKeystoreAesGenerated.js.map +1 -1
- package/realmKeystoreEcdsaGenerated.d.ts +8 -3
- package/realmKeystoreEcdsaGenerated.js +8 -3
- package/realmKeystoreEcdsaGenerated.js.map +1 -1
- package/realmKeystoreHmacGenerated.d.ts +8 -3
- package/realmKeystoreHmacGenerated.js +8 -3
- package/realmKeystoreHmacGenerated.js.map +1 -1
- package/realmKeystoreJavaGenerated.d.ts +8 -3
- package/realmKeystoreJavaGenerated.js +8 -3
- package/realmKeystoreJavaGenerated.js.map +1 -1
- package/realmKeystoreRsa.d.ts +6 -2
- package/realmKeystoreRsa.js +6 -2
- package/realmKeystoreRsa.js.map +1 -1
- package/realmKeystoreRsaGenerated.d.ts +8 -3
- package/realmKeystoreRsaGenerated.js +8 -3
- package/realmKeystoreRsaGenerated.js.map +1 -1
- package/realmUserProfile.d.ts +1 -1
- package/realmUserProfile.js +1 -1
- package/requiredAction.d.ts +8 -3
- package/requiredAction.js +8 -3
- package/requiredAction.js.map +1 -1
- package/role.d.ts +57 -110
- package/role.js +57 -56
- package/role.js.map +1 -1
- package/saml/client.d.ts +9 -344
- package/saml/client.js +9 -29
- package/saml/client.js.map +1 -1
- package/saml/clientDefaultScope.d.ts +0 -33
- package/saml/clientDefaultScope.js +0 -33
- package/saml/clientDefaultScope.js.map +1 -1
- package/saml/clientScope.d.ts +10 -3
- package/saml/clientScope.js +10 -3
- package/saml/clientScope.js.map +1 -1
- package/saml/getClient.d.ts +2 -0
- package/saml/getClient.js +2 -0
- package/saml/getClient.js.map +1 -1
- package/saml/getClientInstallationProvider.d.ts +0 -62
- package/saml/getClientInstallationProvider.js +0 -62
- package/saml/getClientInstallationProvider.js.map +1 -1
- package/saml/identityProvider.d.ts +155 -111
- package/saml/identityProvider.js +44 -15
- package/saml/identityProvider.js.map +1 -1
- package/saml/scriptProtocolMapper.d.ts +15 -5
- package/saml/scriptProtocolMapper.js +15 -5
- package/saml/scriptProtocolMapper.js.map +1 -1
- package/saml/userAttributeProtocolMapper.d.ts +32 -91
- package/saml/userAttributeProtocolMapper.js +32 -19
- package/saml/userAttributeProtocolMapper.js.map +1 -1
- package/saml/userPropertyProtocolMapper.d.ts +32 -91
- package/saml/userPropertyProtocolMapper.js +32 -19
- package/saml/userPropertyProtocolMapper.js.map +1 -1
- package/types/input.d.ts +74 -231
- package/types/output.d.ts +44 -255
- package/user.d.ts +26 -104
- package/user.js +26 -14
- package/user.js.map +1 -1
- package/userGroups.d.ts +5 -33
- package/userGroups.js +5 -33
- package/userGroups.js.map +1 -1
- package/userRoles.d.ts +16 -6
- package/userRoles.js +16 -6
- package/userRoles.js.map +1 -1
- package/userTemplateImporterIdentityProviderMapper.d.ts +10 -3
- package/userTemplateImporterIdentityProviderMapper.js +10 -3
- package/userTemplateImporterIdentityProviderMapper.js.map +1 -1
- package/usersPermissions.d.ts +10 -25
- package/usersPermissions.js +10 -25
- package/usersPermissions.js.map +1 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* ## # keycloak.openid.UserPropertyProtocolMapper
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Allows for creating and managing user property protocol mappers within
|
|
6
|
+
* Keycloak.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* User property protocol mappers allow you to map built in properties defined
|
|
9
|
+
* on the Keycloak user interface to a claim in a token. Protocol mappers can be
|
|
10
|
+
* defined for a single client, or they can be defined for a client scope which
|
|
11
|
+
* can be shared between multiple different clients.
|
|
10
12
|
*
|
|
11
|
-
*
|
|
12
|
-
* ### Client)
|
|
13
|
+
* ### Example Usage (Client)
|
|
13
14
|
*
|
|
14
15
|
* ```typescript
|
|
15
16
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -19,21 +20,24 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
19
20
|
* realm: "my-realm",
|
|
20
21
|
* enabled: true,
|
|
21
22
|
* });
|
|
22
|
-
* const openidClient = new keycloak.openid.Client("
|
|
23
|
+
* const openidClient = new keycloak.openid.Client("openid_client", {
|
|
23
24
|
* realmId: realm.id,
|
|
24
|
-
* clientId: "client",
|
|
25
|
+
* clientId: "test-client",
|
|
26
|
+
* name: "test client",
|
|
25
27
|
* enabled: true,
|
|
26
28
|
* accessType: "CONFIDENTIAL",
|
|
27
29
|
* validRedirectUris: ["http://localhost:8080/openid-callback"],
|
|
28
30
|
* });
|
|
29
|
-
* const userPropertyMapper = new keycloak.openid.UserPropertyProtocolMapper("
|
|
31
|
+
* const userPropertyMapper = new keycloak.openid.UserPropertyProtocolMapper("user_property_mapper", {
|
|
30
32
|
* realmId: realm.id,
|
|
31
33
|
* clientId: openidClient.id,
|
|
34
|
+
* name: "test-mapper",
|
|
32
35
|
* userProperty: "email",
|
|
33
36
|
* claimName: "email",
|
|
34
37
|
* });
|
|
35
38
|
* ```
|
|
36
|
-
*
|
|
39
|
+
*
|
|
40
|
+
* ### Example Usage (Client Scope)
|
|
37
41
|
*
|
|
38
42
|
* ```typescript
|
|
39
43
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -43,26 +47,41 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
43
47
|
* realm: "my-realm",
|
|
44
48
|
* enabled: true,
|
|
45
49
|
* });
|
|
46
|
-
* const clientScope = new keycloak.openid.ClientScope("
|
|
47
|
-
*
|
|
50
|
+
* const clientScope = new keycloak.openid.ClientScope("client_scope", {
|
|
51
|
+
* realmId: realm.id,
|
|
52
|
+
* name: "test-client-scope",
|
|
53
|
+
* });
|
|
54
|
+
* const userPropertyMapper = new keycloak.openid.UserPropertyProtocolMapper("user_property_mapper", {
|
|
48
55
|
* realmId: realm.id,
|
|
49
56
|
* clientScopeId: clientScope.id,
|
|
57
|
+
* name: "test-mapper",
|
|
50
58
|
* userProperty: "email",
|
|
51
59
|
* claimName: "email",
|
|
52
60
|
* });
|
|
53
61
|
* ```
|
|
54
62
|
*
|
|
55
|
-
*
|
|
63
|
+
* ### Argument Reference
|
|
56
64
|
*
|
|
57
|
-
*
|
|
65
|
+
* The following arguments are supported:
|
|
58
66
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
67
|
+
* - `realmId` - (Required) The realm this protocol mapper exists within.
|
|
68
|
+
* - `clientId` - (Required if `clientScopeId` is not specified) The client this protocol mapper is attached to.
|
|
69
|
+
* - `clientScopeId` - (Required if `clientId` is not specified) The client scope this protocol mapper is attached to.
|
|
70
|
+
* - `name` - (Required) The display name of this protocol mapper in the GUI.
|
|
71
|
+
* - `userProperty` - (Required) The built in user property (such as email) to map a claim for.
|
|
72
|
+
* - `claimName` - (Required) The name of the claim to insert into a token.
|
|
73
|
+
* - `claimValueType` - (Optional) The claim type used when serializing JSON tokens. Can be one of `String`, `long`, `int`, or `boolean`. Defaults to `String`.
|
|
74
|
+
* - `addToIdToken` - (Optional) Indicates if the property should be added as a claim to the id token. Defaults to `true`.
|
|
75
|
+
* - `addToAccessToken` - (Optional) Indicates if the property should be added as a claim to the access token. Defaults to `true`.
|
|
76
|
+
* - `addToUserinfo` - (Optional) Indicates if the property should be added as a claim to the UserInfo response body. Defaults to `true`.
|
|
62
77
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
78
|
+
* ### Import
|
|
79
|
+
*
|
|
80
|
+
* Protocol mappers can be imported using one of the following formats:
|
|
81
|
+
* - Client: `{{realm_id}}/client/{{client_keycloak_id}}/{{protocol_mapper_id}}`
|
|
82
|
+
* - Client Scope: `{{realm_id}}/client-scope/{{client_scope_keycloak_id}}/{{protocol_mapper_id}}`
|
|
83
|
+
*
|
|
84
|
+
* Example:
|
|
66
85
|
*/
|
|
67
86
|
export declare class UserPropertyProtocolMapper extends pulumi.CustomResource {
|
|
68
87
|
/**
|
|
@@ -81,44 +100,38 @@ export declare class UserPropertyProtocolMapper extends pulumi.CustomResource {
|
|
|
81
100
|
*/
|
|
82
101
|
static isInstance(obj: any): obj is UserPropertyProtocolMapper;
|
|
83
102
|
/**
|
|
84
|
-
* Indicates if the property should be
|
|
103
|
+
* Indicates if the property should be a claim in the access token.
|
|
85
104
|
*/
|
|
86
105
|
readonly addToAccessToken: pulumi.Output<boolean | undefined>;
|
|
87
106
|
/**
|
|
88
|
-
* Indicates if the property should be
|
|
107
|
+
* Indicates if the property should be a claim in the id token.
|
|
89
108
|
*/
|
|
90
109
|
readonly addToIdToken: pulumi.Output<boolean | undefined>;
|
|
91
110
|
/**
|
|
92
|
-
* Indicates if the property should
|
|
111
|
+
* Indicates if the property should appear in the userinfo response body.
|
|
93
112
|
*/
|
|
94
113
|
readonly addToUserinfo: pulumi.Output<boolean | undefined>;
|
|
95
|
-
/**
|
|
96
|
-
* The name of the claim to insert into a token.
|
|
97
|
-
*/
|
|
98
114
|
readonly claimName: pulumi.Output<string>;
|
|
99
115
|
/**
|
|
100
|
-
*
|
|
116
|
+
* Claim type used when serializing tokens.
|
|
101
117
|
*/
|
|
102
118
|
readonly claimValueType: pulumi.Output<string | undefined>;
|
|
103
119
|
/**
|
|
104
|
-
* The
|
|
120
|
+
* The mapper's associated client. Cannot be used at the same time as client_scope_id.
|
|
105
121
|
*/
|
|
106
122
|
readonly clientId: pulumi.Output<string | undefined>;
|
|
107
123
|
/**
|
|
108
|
-
* The
|
|
124
|
+
* The mapper's associated client scope. Cannot be used at the same time as client_id.
|
|
109
125
|
*/
|
|
110
126
|
readonly clientScopeId: pulumi.Output<string | undefined>;
|
|
111
127
|
/**
|
|
112
|
-
*
|
|
128
|
+
* A human-friendly name that will appear in the Keycloak console.
|
|
113
129
|
*/
|
|
114
130
|
readonly name: pulumi.Output<string>;
|
|
115
131
|
/**
|
|
116
|
-
* The realm
|
|
132
|
+
* The realm id where the associated client or client scope exists.
|
|
117
133
|
*/
|
|
118
134
|
readonly realmId: pulumi.Output<string>;
|
|
119
|
-
/**
|
|
120
|
-
* The built in user property (such as email) to map a claim for.
|
|
121
|
-
*/
|
|
122
135
|
readonly userProperty: pulumi.Output<string>;
|
|
123
136
|
/**
|
|
124
137
|
* Create a UserPropertyProtocolMapper resource with the given unique name, arguments, and options.
|
|
@@ -134,44 +147,38 @@ export declare class UserPropertyProtocolMapper extends pulumi.CustomResource {
|
|
|
134
147
|
*/
|
|
135
148
|
export interface UserPropertyProtocolMapperState {
|
|
136
149
|
/**
|
|
137
|
-
* Indicates if the property should be
|
|
150
|
+
* Indicates if the property should be a claim in the access token.
|
|
138
151
|
*/
|
|
139
152
|
addToAccessToken?: pulumi.Input<boolean>;
|
|
140
153
|
/**
|
|
141
|
-
* Indicates if the property should be
|
|
154
|
+
* Indicates if the property should be a claim in the id token.
|
|
142
155
|
*/
|
|
143
156
|
addToIdToken?: pulumi.Input<boolean>;
|
|
144
157
|
/**
|
|
145
|
-
* Indicates if the property should
|
|
158
|
+
* Indicates if the property should appear in the userinfo response body.
|
|
146
159
|
*/
|
|
147
160
|
addToUserinfo?: pulumi.Input<boolean>;
|
|
148
|
-
/**
|
|
149
|
-
* The name of the claim to insert into a token.
|
|
150
|
-
*/
|
|
151
161
|
claimName?: pulumi.Input<string>;
|
|
152
162
|
/**
|
|
153
|
-
*
|
|
163
|
+
* Claim type used when serializing tokens.
|
|
154
164
|
*/
|
|
155
165
|
claimValueType?: pulumi.Input<string>;
|
|
156
166
|
/**
|
|
157
|
-
* The
|
|
167
|
+
* The mapper's associated client. Cannot be used at the same time as client_scope_id.
|
|
158
168
|
*/
|
|
159
169
|
clientId?: pulumi.Input<string>;
|
|
160
170
|
/**
|
|
161
|
-
* The
|
|
171
|
+
* The mapper's associated client scope. Cannot be used at the same time as client_id.
|
|
162
172
|
*/
|
|
163
173
|
clientScopeId?: pulumi.Input<string>;
|
|
164
174
|
/**
|
|
165
|
-
*
|
|
175
|
+
* A human-friendly name that will appear in the Keycloak console.
|
|
166
176
|
*/
|
|
167
177
|
name?: pulumi.Input<string>;
|
|
168
178
|
/**
|
|
169
|
-
* The realm
|
|
179
|
+
* The realm id where the associated client or client scope exists.
|
|
170
180
|
*/
|
|
171
181
|
realmId?: pulumi.Input<string>;
|
|
172
|
-
/**
|
|
173
|
-
* The built in user property (such as email) to map a claim for.
|
|
174
|
-
*/
|
|
175
182
|
userProperty?: pulumi.Input<string>;
|
|
176
183
|
}
|
|
177
184
|
/**
|
|
@@ -179,43 +186,37 @@ export interface UserPropertyProtocolMapperState {
|
|
|
179
186
|
*/
|
|
180
187
|
export interface UserPropertyProtocolMapperArgs {
|
|
181
188
|
/**
|
|
182
|
-
* Indicates if the property should be
|
|
189
|
+
* Indicates if the property should be a claim in the access token.
|
|
183
190
|
*/
|
|
184
191
|
addToAccessToken?: pulumi.Input<boolean>;
|
|
185
192
|
/**
|
|
186
|
-
* Indicates if the property should be
|
|
193
|
+
* Indicates if the property should be a claim in the id token.
|
|
187
194
|
*/
|
|
188
195
|
addToIdToken?: pulumi.Input<boolean>;
|
|
189
196
|
/**
|
|
190
|
-
* Indicates if the property should
|
|
197
|
+
* Indicates if the property should appear in the userinfo response body.
|
|
191
198
|
*/
|
|
192
199
|
addToUserinfo?: pulumi.Input<boolean>;
|
|
193
|
-
/**
|
|
194
|
-
* The name of the claim to insert into a token.
|
|
195
|
-
*/
|
|
196
200
|
claimName: pulumi.Input<string>;
|
|
197
201
|
/**
|
|
198
|
-
*
|
|
202
|
+
* Claim type used when serializing tokens.
|
|
199
203
|
*/
|
|
200
204
|
claimValueType?: pulumi.Input<string>;
|
|
201
205
|
/**
|
|
202
|
-
* The
|
|
206
|
+
* The mapper's associated client. Cannot be used at the same time as client_scope_id.
|
|
203
207
|
*/
|
|
204
208
|
clientId?: pulumi.Input<string>;
|
|
205
209
|
/**
|
|
206
|
-
* The
|
|
210
|
+
* The mapper's associated client scope. Cannot be used at the same time as client_id.
|
|
207
211
|
*/
|
|
208
212
|
clientScopeId?: pulumi.Input<string>;
|
|
209
213
|
/**
|
|
210
|
-
*
|
|
214
|
+
* A human-friendly name that will appear in the Keycloak console.
|
|
211
215
|
*/
|
|
212
216
|
name?: pulumi.Input<string>;
|
|
213
217
|
/**
|
|
214
|
-
* The realm
|
|
218
|
+
* The realm id where the associated client or client scope exists.
|
|
215
219
|
*/
|
|
216
220
|
realmId: pulumi.Input<string>;
|
|
217
|
-
/**
|
|
218
|
-
* The built in user property (such as email) to map a claim for.
|
|
219
|
-
*/
|
|
220
221
|
userProperty: pulumi.Input<string>;
|
|
221
222
|
}
|
|
@@ -6,16 +6,17 @@ exports.UserPropertyProtocolMapper = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("../utilities");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* ## # keycloak.openid.UserPropertyProtocolMapper
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Allows for creating and managing user property protocol mappers within
|
|
12
|
+
* Keycloak.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* User property protocol mappers allow you to map built in properties defined
|
|
15
|
+
* on the Keycloak user interface to a claim in a token. Protocol mappers can be
|
|
16
|
+
* defined for a single client, or they can be defined for a client scope which
|
|
17
|
+
* can be shared between multiple different clients.
|
|
16
18
|
*
|
|
17
|
-
*
|
|
18
|
-
* ### Client)
|
|
19
|
+
* ### Example Usage (Client)
|
|
19
20
|
*
|
|
20
21
|
* ```typescript
|
|
21
22
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -25,21 +26,24 @@ const utilities = require("../utilities");
|
|
|
25
26
|
* realm: "my-realm",
|
|
26
27
|
* enabled: true,
|
|
27
28
|
* });
|
|
28
|
-
* const openidClient = new keycloak.openid.Client("
|
|
29
|
+
* const openidClient = new keycloak.openid.Client("openid_client", {
|
|
29
30
|
* realmId: realm.id,
|
|
30
|
-
* clientId: "client",
|
|
31
|
+
* clientId: "test-client",
|
|
32
|
+
* name: "test client",
|
|
31
33
|
* enabled: true,
|
|
32
34
|
* accessType: "CONFIDENTIAL",
|
|
33
35
|
* validRedirectUris: ["http://localhost:8080/openid-callback"],
|
|
34
36
|
* });
|
|
35
|
-
* const userPropertyMapper = new keycloak.openid.UserPropertyProtocolMapper("
|
|
37
|
+
* const userPropertyMapper = new keycloak.openid.UserPropertyProtocolMapper("user_property_mapper", {
|
|
36
38
|
* realmId: realm.id,
|
|
37
39
|
* clientId: openidClient.id,
|
|
40
|
+
* name: "test-mapper",
|
|
38
41
|
* userProperty: "email",
|
|
39
42
|
* claimName: "email",
|
|
40
43
|
* });
|
|
41
44
|
* ```
|
|
42
|
-
*
|
|
45
|
+
*
|
|
46
|
+
* ### Example Usage (Client Scope)
|
|
43
47
|
*
|
|
44
48
|
* ```typescript
|
|
45
49
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -49,26 +53,41 @@ const utilities = require("../utilities");
|
|
|
49
53
|
* realm: "my-realm",
|
|
50
54
|
* enabled: true,
|
|
51
55
|
* });
|
|
52
|
-
* const clientScope = new keycloak.openid.ClientScope("
|
|
53
|
-
*
|
|
56
|
+
* const clientScope = new keycloak.openid.ClientScope("client_scope", {
|
|
57
|
+
* realmId: realm.id,
|
|
58
|
+
* name: "test-client-scope",
|
|
59
|
+
* });
|
|
60
|
+
* const userPropertyMapper = new keycloak.openid.UserPropertyProtocolMapper("user_property_mapper", {
|
|
54
61
|
* realmId: realm.id,
|
|
55
62
|
* clientScopeId: clientScope.id,
|
|
63
|
+
* name: "test-mapper",
|
|
56
64
|
* userProperty: "email",
|
|
57
65
|
* claimName: "email",
|
|
58
66
|
* });
|
|
59
67
|
* ```
|
|
60
68
|
*
|
|
61
|
-
*
|
|
69
|
+
* ### Argument Reference
|
|
62
70
|
*
|
|
63
|
-
*
|
|
71
|
+
* The following arguments are supported:
|
|
64
72
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
73
|
+
* - `realmId` - (Required) The realm this protocol mapper exists within.
|
|
74
|
+
* - `clientId` - (Required if `clientScopeId` is not specified) The client this protocol mapper is attached to.
|
|
75
|
+
* - `clientScopeId` - (Required if `clientId` is not specified) The client scope this protocol mapper is attached to.
|
|
76
|
+
* - `name` - (Required) The display name of this protocol mapper in the GUI.
|
|
77
|
+
* - `userProperty` - (Required) The built in user property (such as email) to map a claim for.
|
|
78
|
+
* - `claimName` - (Required) The name of the claim to insert into a token.
|
|
79
|
+
* - `claimValueType` - (Optional) The claim type used when serializing JSON tokens. Can be one of `String`, `long`, `int`, or `boolean`. Defaults to `String`.
|
|
80
|
+
* - `addToIdToken` - (Optional) Indicates if the property should be added as a claim to the id token. Defaults to `true`.
|
|
81
|
+
* - `addToAccessToken` - (Optional) Indicates if the property should be added as a claim to the access token. Defaults to `true`.
|
|
82
|
+
* - `addToUserinfo` - (Optional) Indicates if the property should be added as a claim to the UserInfo response body. Defaults to `true`.
|
|
68
83
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
84
|
+
* ### Import
|
|
85
|
+
*
|
|
86
|
+
* Protocol mappers can be imported using one of the following formats:
|
|
87
|
+
* - Client: `{{realm_id}}/client/{{client_keycloak_id}}/{{protocol_mapper_id}}`
|
|
88
|
+
* - Client Scope: `{{realm_id}}/client-scope/{{client_scope_keycloak_id}}/{{protocol_mapper_id}}`
|
|
89
|
+
*
|
|
90
|
+
* Example:
|
|
72
91
|
*/
|
|
73
92
|
class UserPropertyProtocolMapper extends pulumi.CustomResource {
|
|
74
93
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userPropertyProtocolMapper.js","sourceRoot":"","sources":["../../openid/userPropertyProtocolMapper.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C
|
|
1
|
+
{"version":3,"file":"userPropertyProtocolMapper.js","sourceRoot":"","sources":["../../openid/userPropertyProtocolMapper.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AACH,MAAa,0BAA2B,SAAQ,MAAM,CAAC,cAAc;IAC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