Show / Hide Table of Contents

Class UserPropertyProtocolMapper

# keycloak.saml.UserPropertyProtocolMapper

Allows for creating and managing user property protocol mappers for SAML clients within Keycloak.

SAML user property protocol mappers allow you to map properties of the Keycloak user model to an attribute in a SAML assertion. Protocol mappers can be defined for a single client, or they can be defined for a client scope which can be shared between multiple different clients.

Example Usage (Client)

using Pulumi;
using Keycloak = Pulumi.Keycloak;

class MyStack : Stack
{
public MyStack()
{
    var realm = new Keycloak.Realm("realm", new Keycloak.RealmArgs
    {
        Enabled = true,
        Realm = "my-realm",
    });
    var samlClient = new Keycloak.Saml.Client("samlClient", new Keycloak.Saml.ClientArgs
    {
        ClientId = "test-saml-client",
        RealmId = keycloak_realm.Test.Id,
    });
    var samlUserPropertyMapper = new Keycloak.Saml.UserPropertyProtocolMapper("samlUserPropertyMapper", new Keycloak.Saml.UserPropertyProtocolMapperArgs
    {
        ClientId = samlClient.Id,
        RealmId = keycloak_realm.Test.Id,
        SamlAttributeName = "email",
        SamlAttributeNameFormat = "Unspecified",
        UserProperty = "email",
    });
}

}

Argument Reference

The following arguments are supported:

  • realm_id - (Required) The realm this protocol mapper exists within.
  • client_id - (Required if client_scope_id is not specified) The SAML client this protocol mapper is attached to.
  • client_scope_id - (Required if client_id is not specified) The SAML client scope this protocol mapper is attached to.
  • name - (Required) The display name of this protocol mapper in the GUI.
  • user_property - (Required) The property of the Keycloak user model to map.
  • friendly_name - (Optional) An optional human-friendly name for this attribute.
  • saml_attribute_name - (Required) The name of the SAML attribute.
  • saml_attribute_name_format - (Required) The SAML attribute Name Format. Can be one of Unspecified, Basic, or URI Reference.
Inheritance
System.Object
Resource
CustomResource
UserPropertyProtocolMapper
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Keycloak.Saml
Assembly: Pulumi.Keycloak.dll
Syntax
public class UserPropertyProtocolMapper : CustomResource

Constructors

View Source

UserPropertyProtocolMapper(String, UserPropertyProtocolMapperArgs, CustomResourceOptions)

Create a UserPropertyProtocolMapper resource with the given unique name, arguments, and options.

Declaration
public UserPropertyProtocolMapper(string name, UserPropertyProtocolMapperArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

UserPropertyProtocolMapperArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ClientId

Declaration
public Output<string> ClientId { get; }
Property Value
Type Description
Output<System.String>
View Source

ClientScopeId

Declaration
public Output<string> ClientScopeId { get; }
Property Value
Type Description
Output<System.String>
View Source

FriendlyName

Declaration
public Output<string> FriendlyName { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

RealmId

Declaration
public Output<string> RealmId { get; }
Property Value
Type Description
Output<System.String>
View Source

SamlAttributeName

Declaration
public Output<string> SamlAttributeName { get; }
Property Value
Type Description
Output<System.String>
View Source

SamlAttributeNameFormat

Declaration
public Output<string> SamlAttributeNameFormat { get; }
Property Value
Type Description
Output<System.String>
View Source

UserProperty

Declaration
public Output<string> UserProperty { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, UserPropertyProtocolMapperState, CustomResourceOptions)

Get an existing UserPropertyProtocolMapper resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static UserPropertyProtocolMapper Get(string name, Input<string> id, UserPropertyProtocolMapperState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

UserPropertyProtocolMapperState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
UserPropertyProtocolMapper
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.