-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathschema_password_policy.go
158 lines (156 loc) · 3.81 KB
/
schema_password_policy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
package main
import "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
func passwordPolicyFields() map[string]*schema.Schema {
s := map[string]*schema.Schema{
"account_id_min_word_length": {
Type: schema.TypeInt,
Optional: true,
Description: "Char length that disallow account ID fragments",
Default: -1,
},
"account_name_min_word_length": {
Type: schema.TypeInt,
Optional: true,
Description: "Char length that disallow display name fragments",
Default: -1,
},
"connected_services": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: passwordPolicyConnectedServicesFields(),
},
},
"date_created": {
Type: schema.TypeString,
Computed: true,
},
"default_policy": {
Type: schema.TypeBool,
Optional: true,
Description: "Is the password policy default policy?",
},
"description": {
Type: schema.TypeString,
Optional: true,
Description: "Password policy description",
},
"enable_password_expiration": {
Type: schema.TypeBool,
Optional: true,
},
"first_expiration_reminder": {
Type: schema.TypeInt,
Optional: true,
},
"last_updated": {
Type: schema.TypeString,
Computed: true,
},
"max_length": {
Type: schema.TypeInt,
Optional: true,
Description: "password max length",
},
"max_repeated_chars": {
Type: schema.TypeInt,
Optional: true,
},
"min_alpha": {
Type: schema.TypeInt,
Optional: true,
Description: "minimum letters in password",
},
"min_character_types": {
Type: schema.TypeInt,
Optional: true,
Default: -1,
},
"min_length": {
Type: schema.TypeInt,
Optional: true,
Description: "minimum password length",
},
"min_lower": {
Type: schema.TypeInt,
Optional: true,
Description: "minimum number of lowercase characters in password",
},
"min_numeric": {
Type: schema.TypeInt,
Optional: true,
Description: "minimum number in password",
},
"min_special": {
Type: schema.TypeInt,
Optional: true,
Description: "minimum number of special characters in password",
},
"min_upper": {
Type: schema.TypeInt,
Optional: true,
Description: "minimum number of uppercase characters in password",
},
"name": {
Type: schema.TypeString,
ForceNew: true,
Required: true,
Description: "Password policy name",
},
"password_expiration": {
Type: schema.TypeInt,
Optional: true,
Default: 90,
},
"require_strong_auth_off_network": {
Type: schema.TypeBool,
Optional: true,
},
"require_strong_auth_untrusted_geographies": {
Type: schema.TypeBool,
Optional: true,
},
"require_strong_authn": {
Type: schema.TypeBool,
Optional: true,
},
"use_account_attributes": {
Type: schema.TypeBool,
Optional: true,
Description: "Prevent use of account attributes?",
},
"use_dictionary": {
Type: schema.TypeBool,
Optional: true,
Description: "Prevent use of words in this site's password dictionary?",
},
"use_history": {
Type: schema.TypeInt,
Optional: true,
},
"use_identity_attributes": {
Type: schema.TypeBool,
Optional: true,
Description: "Prevent use of identity attributes?",
},
"validate_against_account_id": {
Type: schema.TypeBool,
Optional: true,
Description: "Disallow account ID fragments?",
},
"validate_against_account_name": {
Type: schema.TypeBool,
Optional: true,
Description: "Disallow account name fragments?",
},
"source_ids": {
Type: schema.TypeList,
Optional: true,
Description: "List of sources",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
}
return s
}