Skip to content

Commit

Permalink
Update documentation. Fix schema
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisnellis committed Dec 11, 2024
1 parent 8bb1a7d commit 3f650c2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
21 changes: 21 additions & 0 deletions docs/resources/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,15 @@ resource "auth0_connection" "okta" {
"family_name" : "$${context.tokenset.family_name}"
})
}
authentication_methods {
passkey {
enabled = true
}
password {
enabled = true
}
}
}
}
```
Expand Down Expand Up @@ -680,6 +689,7 @@ Optional:
- `configuration` (Map of String, Sensitive) A case-sensitive map of key value pairs used as configuration variables for the `custom_script`.
- `connection_settings` (Block List, Max: 1) Proof Key for Code Exchange (PKCE) configuration settings for an OIDC or Okta Workforce connection. (see [below for nested schema](#nestedblock--options--connection_settings))
- `custom_scripts` (Map of String) A map of scripts used to integrate with a custom database.
- `authentication_methods` (Block List, Max: 1) Enables and disables authentication methods including passwords and passkeys (see [below for nested schema](#nestedblock--authentication-methods))
- `debug` (Boolean) When enabled, additional debug information will be generated.
- `decryption_key` (Block List, Max: 1) The key used to decrypt encrypted responses from the connection. Uses the `key` and `cert` properties to provide the private key and certificate respectively. (see [below for nested schema](#nestedblock--options--decryption_key))
- `digest_algorithm` (String) Sign Request Algorithm Digest.
Expand Down Expand Up @@ -770,6 +780,17 @@ Optional:
- `attributes` (String) This property is an object containing mapping information that allows Auth0 to interpret incoming claims from the IdP. Mapping information must be provided as key/value pairs.
- `userinfo_scope` (String) This property defines the scopes that Auth0 sends to the IdP’s UserInfo endpoint when requested.

<a id="nestedblock--authentication-methods"></a>
Required:

- `password` (Block List, Max: 1) Enables or disables password authentication (see [below for nested schema](#nestedblock--authentication-method))
- `passkey` (Block List, Max: 1) Enables or disables passkey authentication (see [below for nested schema](#nestedblock--authentication-method))


<a id="nestedblock--authentication-method"></a>
Required:

- `enabled` (Boolean) Enables the authentication method

<a id="nestedblock--options--attributes"></a>
### Nested Schema for `options.attributes`
Expand Down
36 changes: 10 additions & 26 deletions internal/auth0/connection/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,6 @@ var resourceSchema = map[string]*schema.Schema{
"options": optionsSchema,
}

var authMethodEnabled = map[string]*schema.Schema{
"enabled": {
Type: schema.TypeBool,
Optional: false,
Description: "Whether the authentication method is enabled or not"
}
}

var authMethods = map[string]*schema.Schema{
"password": {
Type: schema.authMethodEnabled,
Optional: false,
Description: "Controls if password authentication is enabled for this connection"
},
"passkey": {
Type: schema.authMethodEnabled,
Optional: false,
Description: "Controls if passkey authentication is enabled for this connection. See"
}
}


var optionsSchema = &schema.Schema{
Type: schema.TypeList,
Computed: true,
Expand Down Expand Up @@ -275,9 +253,16 @@ var optionsSchema = &schema.Schema{
Description: "A map of scripts used to integrate with a custom database.",
},
"authentication_methods": {
Type: schema.authMethods,
Optional: true,
Description: "Enables and disables authentication methods for this database",
Type: schema.TypeMap,
Required: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"enabled": {
Type: schema.TypeBool,
Required: true,
},
},
},
},
"scripts": {
Type: schema.TypeMap,
Expand Down Expand Up @@ -1129,4 +1114,3 @@ var optionsSchema = &schema.Schema{
},
},
}

0 comments on commit 3f650c2

Please sign in to comment.