# Reference for the teleport\_saml\_connector Terraform data-source

This page describes the supported values of the `teleport_saml_connector` data source of the Teleport Terraform provider.

## Schema

### Required

- `spec` (Attributes) Spec is an SAML connector specification. (see [below for nested schema](#nested-schema-for-spec))
- `version` (String) Version is the resource version. It must be specified. Supported values are: `v2`.

### Optional

- `metadata` (Attributes) Metadata holds resource metadata. (see [below for nested schema](#nested-schema-for-metadata))
- `sub_kind` (String) SubKind is an optional resource sub kind, used in some resources.

### Nested Schema for `spec`

Required:

- `acs` (String) AssertionConsumerService is a URL for assertion consumer service on the service provider (Teleport's side).
- `attributes_to_roles` (Attributes List) AttributesToRoles is a list of mappings of attribute statements to roles. (see [below for nested schema](#nested-schema-for-specattributes_to_roles))

Optional:

- `allow_idp_initiated` (Boolean) AllowIDPInitiated is a flag that indicates if the connector can be used for IdP-initiated logins.
- `assertion_key_pair` (Attributes) EncryptionKeyPair is a key pair used for decrypting SAML assertions. (see [below for nested schema](#nested-schema-for-specassertion_key_pair))
- `audience` (String) Audience uniquely identifies our service provider.
- `cert` (String, Sensitive) Cert is the identity provider certificate PEM. IDP signs `<Response>` responses using this certificate.
- `client_redirect_settings` (Attributes) ClientRedirectSettings defines which client redirect URLs are allowed for non-browser SSO logins other than the standard localhost ones. (see [below for nested schema](#nested-schema-for-specclient_redirect_settings))
- `display` (String) Display controls how this connector is displayed.
- `entity_descriptor` (String, Sensitive) EntityDescriptor is XML with descriptor. It can be used to supply configuration parameters in one XML file rather than supplying them in the individual elements.
- `entity_descriptor_url` (String) EntityDescriptorURL is a URL that supplies a configuration XML.
- `force_authn` (Number) ForceAuthn specified whether re-authentication should be forced on login. UNSPECIFIED is treated as NO.
- `include_subject` (Boolean) IncludeSubject is a flag that indicates whether the Subject element is included in the SAML authentication request. Defaults to false. Note: Some IdPs will reject requests that contain a Subject.
- `issuer` (String) Issuer is the identity provider issuer.
- `mfa` (Attributes) MFASettings contains settings to enable SSO MFA checks through this auth connector. (see [below for nested schema](#nested-schema-for-specmfa))
- `preferred_request_binding` (String) PreferredRequestBinding is a preferred SAML request binding method. Value must be either "http-post" or "http-redirect". In general, the SAML identity provider lists request binding methods it supports. And the SAML service provider uses one of the IdP supported request binding method that it prefers. But we never honored request binding value provided by the IdP and always used http-redirect binding as a default. Setting up PreferredRequestBinding value lets us preserve existing auth connector behavior and only use http-post binding if it is explicitly configured.
- `provider` (String) Provider is the external identity provider.
- `service_provider_issuer` (String) ServiceProviderIssuer is the issuer of the service provider (Teleport).
- `signing_key_pair` (Attributes) SigningKeyPair is an x509 key pair used to sign AuthnRequest. (see [below for nested schema](#nested-schema-for-specsigning_key_pair))
- `single_logout_url` (String) SingleLogoutURL is the SAML Single log-out URL to initiate SAML SLO (single log-out). If this is not provided, SLO is disabled.
- `sso` (String) SSO is the URL of the identity provider's SSO service.
- `user_matchers` (List of String) UserMatchers is a set of glob patterns to narrow down which username(s) this auth connector should match for identifier-first login.

### Nested Schema for `spec.attributes_to_roles`

Optional:

- `name` (String) Name is an attribute statement name.
- `roles` (List of String) Roles is a list of static teleport roles to map to.
- `value` (String) Value is an attribute statement value to match.

### Nested Schema for `spec.assertion_key_pair`

Optional:

- `cert` (String) Cert is a PEM-encoded x509 certificate.
- `private_key` (String, Sensitive) PrivateKey is a PEM encoded x509 private key.

### Nested Schema for `spec.client_redirect_settings`

Optional:

- `allowed_https_hostnames` (List of String) a list of hostnames allowed for https client redirect URLs
- `insecure_allowed_cidr_ranges` (List of String) a list of CIDRs allowed for HTTP or HTTPS client redirect URLs

### Nested Schema for `spec.mfa`

Optional:

- `cert` (String) Cert is the identity provider certificate PEM. IDP signs `<Response>` responses using this certificate.
- `enabled` (Boolean) Enabled specified whether this SAML connector supports MFA checks. Defaults to false.
- `entity_descriptor` (String) EntityDescriptor is XML with descriptor. It can be used to supply configuration parameters in one XML file rather than supplying them in the individual elements. Usually set from EntityDescriptorUrl.
- `entity_descriptor_url` (String) EntityDescriptorUrl is a URL that supplies a configuration XML.
- `force_authn` (Number) ForceAuthn specified whether re-authentication should be forced for MFA checks. UNSPECIFIED is treated as YES to always re-authentication for MFA checks. This should only be set to NO if the IdP is setup to perform MFA checks on top of active user sessions.
- `issuer` (String) Issuer is the identity provider issuer. Usually set from EntityDescriptor.
- `sso` (String) SSO is the URL of the identity provider's SSO service. Usually set from EntityDescriptor.

### Nested Schema for `spec.signing_key_pair`

Optional:

- `cert` (String) Cert is a PEM-encoded x509 certificate.
- `private_key` (String, Sensitive) PrivateKey is a PEM encoded x509 private key.

### Nested Schema for `metadata`

Required:

- `name` (String) Name is an object name

Optional:

- `description` (String) Description is object description
- `expires` (String) Expires is a global expiry time header can be set on any resource in the system.
- `labels` (Map of String) Labels is a set of labels
