1. Packages
  2. Nexus Provider
  3. API Docs
  4. SecuritySaml
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

nexus.SecuritySaml

Explore with Pulumi AI

nexus logo
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

    PRO Feature

    Use this resource to create a Nexus Security SAML configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nexus from "@pulumi/nexus";
    
    const example = new nexus.SecuritySaml("example", {
        emailAttribute: "email",
        entityId: "http://nexus.example/service/rest/v1/security/saml/metadata",
        firstNameAttribute: "firstName",
        groupsAttribute: "groups",
        idpMetadata: "<EntityDescriptor ...>...</EntityDescriptor>",
        lastNameAttribute: "lastName",
        usernameAttribute: "username",
        validateAssertionSignature: true,
        validateResponseSignature: true,
    });
    
    import pulumi
    import pulumi_nexus as nexus
    
    example = nexus.SecuritySaml("example",
        email_attribute="email",
        entity_id="http://nexus.example/service/rest/v1/security/saml/metadata",
        first_name_attribute="firstName",
        groups_attribute="groups",
        idp_metadata="<EntityDescriptor ...>...</EntityDescriptor>",
        last_name_attribute="lastName",
        username_attribute="username",
        validate_assertion_signature=True,
        validate_response_signature=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nexus.NewSecuritySaml(ctx, "example", &nexus.SecuritySamlArgs{
    			EmailAttribute:             pulumi.String("email"),
    			EntityId:                   pulumi.String("http://nexus.example/service/rest/v1/security/saml/metadata"),
    			FirstNameAttribute:         pulumi.String("firstName"),
    			GroupsAttribute:            pulumi.String("groups"),
    			IdpMetadata:                pulumi.String("<EntityDescriptor ...>...</EntityDescriptor>"),
    			LastNameAttribute:          pulumi.String("lastName"),
    			UsernameAttribute:          pulumi.String("username"),
    			ValidateAssertionSignature: pulumi.Bool(true),
    			ValidateResponseSignature:  pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nexus = Pulumi.Nexus;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Nexus.SecuritySaml("example", new()
        {
            EmailAttribute = "email",
            EntityId = "http://nexus.example/service/rest/v1/security/saml/metadata",
            FirstNameAttribute = "firstName",
            GroupsAttribute = "groups",
            IdpMetadata = "<EntityDescriptor ...>...</EntityDescriptor>",
            LastNameAttribute = "lastName",
            UsernameAttribute = "username",
            ValidateAssertionSignature = true,
            ValidateResponseSignature = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nexus.SecuritySaml;
    import com.pulumi.nexus.SecuritySamlArgs;
    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 example = new SecuritySaml("example", SecuritySamlArgs.builder()
                .emailAttribute("email")
                .entityId("http://nexus.example/service/rest/v1/security/saml/metadata")
                .firstNameAttribute("firstName")
                .groupsAttribute("groups")
                .idpMetadata("<EntityDescriptor ...>...</EntityDescriptor>")
                .lastNameAttribute("lastName")
                .usernameAttribute("username")
                .validateAssertionSignature(true)
                .validateResponseSignature(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: nexus:SecuritySaml
        properties:
          emailAttribute: email
          entityId: http://nexus.example/service/rest/v1/security/saml/metadata
          firstNameAttribute: firstName
          groupsAttribute: groups
          idpMetadata: <EntityDescriptor ...>...</EntityDescriptor>
          lastNameAttribute: lastName
          usernameAttribute: username
          validateAssertionSignature: true
          validateResponseSignature: true
    

    Create SecuritySaml Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecuritySaml(name: string, args: SecuritySamlArgs, opts?: CustomResourceOptions);
    @overload
    def SecuritySaml(resource_name: str,
                     args: SecuritySamlArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecuritySaml(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     idp_metadata: Optional[str] = None,
                     username_attribute: Optional[str] = None,
                     email_attribute: Optional[str] = None,
                     entity_id: Optional[str] = None,
                     first_name_attribute: Optional[str] = None,
                     groups_attribute: Optional[str] = None,
                     last_name_attribute: Optional[str] = None,
                     validate_assertion_signature: Optional[bool] = None,
                     validate_response_signature: Optional[bool] = None)
    func NewSecuritySaml(ctx *Context, name string, args SecuritySamlArgs, opts ...ResourceOption) (*SecuritySaml, error)
    public SecuritySaml(string name, SecuritySamlArgs args, CustomResourceOptions? opts = null)
    public SecuritySaml(String name, SecuritySamlArgs args)
    public SecuritySaml(String name, SecuritySamlArgs args, CustomResourceOptions options)
    
    type: nexus:SecuritySaml
    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 SecuritySamlArgs
    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 SecuritySamlArgs
    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 SecuritySamlArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecuritySamlArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecuritySamlArgs
    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 securitySamlResource = new Nexus.SecuritySaml("securitySamlResource", new()
    {
        IdpMetadata = "string",
        UsernameAttribute = "string",
        EmailAttribute = "string",
        EntityId = "string",
        FirstNameAttribute = "string",
        GroupsAttribute = "string",
        LastNameAttribute = "string",
        ValidateAssertionSignature = false,
        ValidateResponseSignature = false,
    });
    
    example, err := nexus.NewSecuritySaml(ctx, "securitySamlResource", &nexus.SecuritySamlArgs{
    	IdpMetadata:                pulumi.String("string"),
    	UsernameAttribute:          pulumi.String("string"),
    	EmailAttribute:             pulumi.String("string"),
    	EntityId:                   pulumi.String("string"),
    	FirstNameAttribute:         pulumi.String("string"),
    	GroupsAttribute:            pulumi.String("string"),
    	LastNameAttribute:          pulumi.String("string"),
    	ValidateAssertionSignature: pulumi.Bool(false),
    	ValidateResponseSignature:  pulumi.Bool(false),
    })
    
    var securitySamlResource = new SecuritySaml("securitySamlResource", SecuritySamlArgs.builder()
        .idpMetadata("string")
        .usernameAttribute("string")
        .emailAttribute("string")
        .entityId("string")
        .firstNameAttribute("string")
        .groupsAttribute("string")
        .lastNameAttribute("string")
        .validateAssertionSignature(false)
        .validateResponseSignature(false)
        .build());
    
    security_saml_resource = nexus.SecuritySaml("securitySamlResource",
        idp_metadata="string",
        username_attribute="string",
        email_attribute="string",
        entity_id="string",
        first_name_attribute="string",
        groups_attribute="string",
        last_name_attribute="string",
        validate_assertion_signature=False,
        validate_response_signature=False)
    
    const securitySamlResource = new nexus.SecuritySaml("securitySamlResource", {
        idpMetadata: "string",
        usernameAttribute: "string",
        emailAttribute: "string",
        entityId: "string",
        firstNameAttribute: "string",
        groupsAttribute: "string",
        lastNameAttribute: "string",
        validateAssertionSignature: false,
        validateResponseSignature: false,
    });
    
    type: nexus:SecuritySaml
    properties:
        emailAttribute: string
        entityId: string
        firstNameAttribute: string
        groupsAttribute: string
        idpMetadata: string
        lastNameAttribute: string
        usernameAttribute: string
        validateAssertionSignature: false
        validateResponseSignature: false
    

    SecuritySaml 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 SecuritySaml resource accepts the following input properties:

    IdpMetadata string
    SAML Identity Provider Metadata XML
    UsernameAttribute string
    IdP field mappings for username
    EmailAttribute string
    IdP field mappings for user's email address
    EntityId string
    Entity ID URI
    FirstNameAttribute string
    IdP field mappings for user's given name
    GroupsAttribute string
    IdP field mappings for user's groups
    LastNameAttribute string
    IdP field mappings for user's family name
    ValidateAssertionSignature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    ValidateResponseSignature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    IdpMetadata string
    SAML Identity Provider Metadata XML
    UsernameAttribute string
    IdP field mappings for username
    EmailAttribute string
    IdP field mappings for user's email address
    EntityId string
    Entity ID URI
    FirstNameAttribute string
    IdP field mappings for user's given name
    GroupsAttribute string
    IdP field mappings for user's groups
    LastNameAttribute string
    IdP field mappings for user's family name
    ValidateAssertionSignature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    ValidateResponseSignature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    idpMetadata String
    SAML Identity Provider Metadata XML
    usernameAttribute String
    IdP field mappings for username
    emailAttribute String
    IdP field mappings for user's email address
    entityId String
    Entity ID URI
    firstNameAttribute String
    IdP field mappings for user's given name
    groupsAttribute String
    IdP field mappings for user's groups
    lastNameAttribute String
    IdP field mappings for user's family name
    validateAssertionSignature Boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    validateResponseSignature Boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    idpMetadata string
    SAML Identity Provider Metadata XML
    usernameAttribute string
    IdP field mappings for username
    emailAttribute string
    IdP field mappings for user's email address
    entityId string
    Entity ID URI
    firstNameAttribute string
    IdP field mappings for user's given name
    groupsAttribute string
    IdP field mappings for user's groups
    lastNameAttribute string
    IdP field mappings for user's family name
    validateAssertionSignature boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    validateResponseSignature boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    idp_metadata str
    SAML Identity Provider Metadata XML
    username_attribute str
    IdP field mappings for username
    email_attribute str
    IdP field mappings for user's email address
    entity_id str
    Entity ID URI
    first_name_attribute str
    IdP field mappings for user's given name
    groups_attribute str
    IdP field mappings for user's groups
    last_name_attribute str
    IdP field mappings for user's family name
    validate_assertion_signature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    validate_response_signature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    idpMetadata String
    SAML Identity Provider Metadata XML
    usernameAttribute String
    IdP field mappings for username
    emailAttribute String
    IdP field mappings for user's email address
    entityId String
    Entity ID URI
    firstNameAttribute String
    IdP field mappings for user's given name
    groupsAttribute String
    IdP field mappings for user's groups
    lastNameAttribute String
    IdP field mappings for user's family name
    validateAssertionSignature Boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    validateResponseSignature Boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecuritySaml resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SecuritySaml Resource

    Get an existing SecuritySaml 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?: SecuritySamlState, opts?: CustomResourceOptions): SecuritySaml
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            email_attribute: Optional[str] = None,
            entity_id: Optional[str] = None,
            first_name_attribute: Optional[str] = None,
            groups_attribute: Optional[str] = None,
            idp_metadata: Optional[str] = None,
            last_name_attribute: Optional[str] = None,
            username_attribute: Optional[str] = None,
            validate_assertion_signature: Optional[bool] = None,
            validate_response_signature: Optional[bool] = None) -> SecuritySaml
    func GetSecuritySaml(ctx *Context, name string, id IDInput, state *SecuritySamlState, opts ...ResourceOption) (*SecuritySaml, error)
    public static SecuritySaml Get(string name, Input<string> id, SecuritySamlState? state, CustomResourceOptions? opts = null)
    public static SecuritySaml get(String name, Output<String> id, SecuritySamlState state, CustomResourceOptions options)
    resources:  _:    type: nexus:SecuritySaml    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.
    The following state arguments are supported:
    EmailAttribute string
    IdP field mappings for user's email address
    EntityId string
    Entity ID URI
    FirstNameAttribute string
    IdP field mappings for user's given name
    GroupsAttribute string
    IdP field mappings for user's groups
    IdpMetadata string
    SAML Identity Provider Metadata XML
    LastNameAttribute string
    IdP field mappings for user's family name
    UsernameAttribute string
    IdP field mappings for username
    ValidateAssertionSignature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    ValidateResponseSignature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    EmailAttribute string
    IdP field mappings for user's email address
    EntityId string
    Entity ID URI
    FirstNameAttribute string
    IdP field mappings for user's given name
    GroupsAttribute string
    IdP field mappings for user's groups
    IdpMetadata string
    SAML Identity Provider Metadata XML
    LastNameAttribute string
    IdP field mappings for user's family name
    UsernameAttribute string
    IdP field mappings for username
    ValidateAssertionSignature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    ValidateResponseSignature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    emailAttribute String
    IdP field mappings for user's email address
    entityId String
    Entity ID URI
    firstNameAttribute String
    IdP field mappings for user's given name
    groupsAttribute String
    IdP field mappings for user's groups
    idpMetadata String
    SAML Identity Provider Metadata XML
    lastNameAttribute String
    IdP field mappings for user's family name
    usernameAttribute String
    IdP field mappings for username
    validateAssertionSignature Boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    validateResponseSignature Boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    emailAttribute string
    IdP field mappings for user's email address
    entityId string
    Entity ID URI
    firstNameAttribute string
    IdP field mappings for user's given name
    groupsAttribute string
    IdP field mappings for user's groups
    idpMetadata string
    SAML Identity Provider Metadata XML
    lastNameAttribute string
    IdP field mappings for user's family name
    usernameAttribute string
    IdP field mappings for username
    validateAssertionSignature boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    validateResponseSignature boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    email_attribute str
    IdP field mappings for user's email address
    entity_id str
    Entity ID URI
    first_name_attribute str
    IdP field mappings for user's given name
    groups_attribute str
    IdP field mappings for user's groups
    idp_metadata str
    SAML Identity Provider Metadata XML
    last_name_attribute str
    IdP field mappings for user's family name
    username_attribute str
    IdP field mappings for username
    validate_assertion_signature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    validate_response_signature bool
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
    emailAttribute String
    IdP field mappings for user's email address
    entityId String
    Entity ID URI
    firstNameAttribute String
    IdP field mappings for user's given name
    groupsAttribute String
    IdP field mappings for user's groups
    idpMetadata String
    SAML Identity Provider Metadata XML
    lastNameAttribute String
    IdP field mappings for user's family name
    usernameAttribute String
    IdP field mappings for username
    validateAssertionSignature Boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
    validateResponseSignature Boolean
    By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.

    Import

    import of saml configuration

    $ pulumi import nexus:index/securitySaml:SecuritySaml example samle
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    nexus datadrivers/terraform-provider-nexus
    License
    Notes
    This Pulumi package is based on the nexus Terraform Provider.
    nexus logo
    nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers