nexus.SecuritySaml
Explore with Pulumi AI
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:
- Idp
Metadata string - SAML Identity Provider Metadata XML
- Username
Attribute string - IdP field mappings for username
- Email
Attribute string - IdP field mappings for user's email address
- Entity
Id string - Entity ID URI
- First
Name stringAttribute - IdP field mappings for user's given name
- Groups
Attribute string - IdP field mappings for user's groups
- Last
Name stringAttribute - IdP field mappings for user's family name
- Validate
Assertion boolSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- Validate
Response boolSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
- Idp
Metadata string - SAML Identity Provider Metadata XML
- Username
Attribute string - IdP field mappings for username
- Email
Attribute string - IdP field mappings for user's email address
- Entity
Id string - Entity ID URI
- First
Name stringAttribute - IdP field mappings for user's given name
- Groups
Attribute string - IdP field mappings for user's groups
- Last
Name stringAttribute - IdP field mappings for user's family name
- Validate
Assertion boolSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- Validate
Response boolSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
- idp
Metadata String - SAML Identity Provider Metadata XML
- username
Attribute String - IdP field mappings for username
- email
Attribute String - IdP field mappings for user's email address
- entity
Id String - Entity ID URI
- first
Name StringAttribute - IdP field mappings for user's given name
- groups
Attribute String - IdP field mappings for user's groups
- last
Name StringAttribute - IdP field mappings for user's family name
- validate
Assertion BooleanSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- validate
Response BooleanSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
- idp
Metadata string - SAML Identity Provider Metadata XML
- username
Attribute string - IdP field mappings for username
- email
Attribute string - IdP field mappings for user's email address
- entity
Id string - Entity ID URI
- first
Name stringAttribute - IdP field mappings for user's given name
- groups
Attribute string - IdP field mappings for user's groups
- last
Name stringAttribute - IdP field mappings for user's family name
- validate
Assertion booleanSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- validate
Response booleanSignature - 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_ strattribute - IdP field mappings for user's given name
- groups_
attribute str - IdP field mappings for user's groups
- last_
name_ strattribute - IdP field mappings for user's family name
- validate_
assertion_ boolsignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- validate_
response_ boolsignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
- idp
Metadata String - SAML Identity Provider Metadata XML
- username
Attribute String - IdP field mappings for username
- email
Attribute String - IdP field mappings for user's email address
- entity
Id String - Entity ID URI
- first
Name StringAttribute - IdP field mappings for user's given name
- groups
Attribute String - IdP field mappings for user's groups
- last
Name StringAttribute - IdP field mappings for user's family name
- validate
Assertion BooleanSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- validate
Response BooleanSignature - 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.
- Email
Attribute string - IdP field mappings for user's email address
- Entity
Id string - Entity ID URI
- First
Name stringAttribute - IdP field mappings for user's given name
- Groups
Attribute string - IdP field mappings for user's groups
- Idp
Metadata string - SAML Identity Provider Metadata XML
- Last
Name stringAttribute - IdP field mappings for user's family name
- Username
Attribute string - IdP field mappings for username
- Validate
Assertion boolSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- Validate
Response boolSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
- Email
Attribute string - IdP field mappings for user's email address
- Entity
Id string - Entity ID URI
- First
Name stringAttribute - IdP field mappings for user's given name
- Groups
Attribute string - IdP field mappings for user's groups
- Idp
Metadata string - SAML Identity Provider Metadata XML
- Last
Name stringAttribute - IdP field mappings for user's family name
- Username
Attribute string - IdP field mappings for username
- Validate
Assertion boolSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- Validate
Response boolSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
- email
Attribute String - IdP field mappings for user's email address
- entity
Id String - Entity ID URI
- first
Name StringAttribute - IdP field mappings for user's given name
- groups
Attribute String - IdP field mappings for user's groups
- idp
Metadata String - SAML Identity Provider Metadata XML
- last
Name StringAttribute - IdP field mappings for user's family name
- username
Attribute String - IdP field mappings for username
- validate
Assertion BooleanSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- validate
Response BooleanSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
- email
Attribute string - IdP field mappings for user's email address
- entity
Id string - Entity ID URI
- first
Name stringAttribute - IdP field mappings for user's given name
- groups
Attribute string - IdP field mappings for user's groups
- idp
Metadata string - SAML Identity Provider Metadata XML
- last
Name stringAttribute - IdP field mappings for user's family name
- username
Attribute string - IdP field mappings for username
- validate
Assertion booleanSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- validate
Response booleanSignature - 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_ strattribute - 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_ strattribute - IdP field mappings for user's family name
- username_
attribute str - IdP field mappings for username
- validate_
assertion_ boolsignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- validate_
response_ boolsignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the response.
- email
Attribute String - IdP field mappings for user's email address
- entity
Id String - Entity ID URI
- first
Name StringAttribute - IdP field mappings for user's given name
- groups
Attribute String - IdP field mappings for user's groups
- idp
Metadata String - SAML Identity Provider Metadata XML
- last
Name StringAttribute - IdP field mappings for user's family name
- username
Attribute String - IdP field mappings for username
- validate
Assertion BooleanSignature - By default, if a signing key is found in the IdP metadata, then NXRM will attempt to validate signatures on the assertions.
- validate
Response BooleanSignature - 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.