/
auth_actions.yaml
208 lines (153 loc) · 5.92 KB
/
auth_actions.yaml
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# List of security/audit events and errors that we need to log
resource: system:auth
service: auth
# Default sensitivity for actions
defaultActionSeverity: notice
# default severity for errors
defaultErrorSeverity: alert
import:
- github.com/cortezaproject/corteza-server/system/types
props:
- name: email
- name: provider
- name: credentials
type: "*types.Credentials"
fields: [ kind, label, ID ]
- name: role
type: "*types.Role"
fields: [ handle, name, ID ]
- name: user
type: "*types.User"
fields: [ handle, name, ID, email, suspendedAt, deletedAt ]
actions:
- action: authenticate
log: "successfully authenticated with {{credentials.kind}}"
- action: issueToken
log: "token '{{credentials.kind}}' issued"
- action: validateToken
log: "token '{{credentials.kind}}' validated"
- action: changePassword
log: "password changed"
- action: internalSignup
log: "{{user.email}} signed-up"
- action: confirmEmail
log: "email {{user.email}} confirmed"
- action: externalSignup
log: "{{user.email}} signed-up after successful external authentication via {{credentials.kind}}"
- action: sendEmailConfirmationToken
log: "confirmation notification sent to {{email}}"
- action: sendPasswordResetToken
log: "password reset token sent to {{email}}"
- action: exchangePasswordResetToken
log: "password reset token exchanged"
- action: generatePasswordCreateToken
log: "password create token generated for {{email}}"
- action: autoPromote
log: "auto-promoted to {{role}}"
- action: updateCredentials
log: "credentials {{credentials.kind}} updated"
- action: createCredentials
log: "new credentials {{credentials.kind}} created"
- action: impersonate
log: "impersonating {{user}}"
- action: totpConfigure
log: "time-based one-time-password for {{user}} configured"
- action: totpRemove
log: "time-based one-time-password for {{user}} removed"
- action: totpValidate
log: "time-based one-time-password for {{user}} validated"
- action: emailOtpVerify
log: "email one-time-password for {{user}} verified"
- action: accessTokensRemoved
log: "access tokens for {{user}} removed"
errors:
- error: invalidCredentials
message: "invalid username and password combination"
log: "{{email}} failed to authenticate with {{credentials.kind}}"
severity: warning
- error: invalidEmailFormat
message: "invalid email"
- error: invalidHandle
message: "invalid handle"
- error: failedForUnknownUser
maskedWith: invalidCredentials
log: "unknown user {{email}} tried to log-in with {{credentials.kind}}"
severity: warning
- error: failedForDeletedUser
maskedWith: invalidCredentials
log: "deleted user {{user}} tried to log-in with {{credentials.kind}}"
severity: warning
- error: failedForSuspendedUser
maskedWith: invalidCredentials
log: "suspended user {{user}} tried to log-in with {{credentials.kind}}"
severity: warning
- error: failedForSystemUser
maskedWith: invalidCredentials
log: "system user {{user}} tried to log-in with {{credentials.kind}}"
severity: warning
- error: failedUnconfirmedEmail
message: "system requires confirmed email before logging in"
log: "failed to log-in with with unconfirmed email"
- error: internalLoginDisabledByConfig
message: "internal login (username/password) is disabled"
- error: internalSignupDisabledByConfig
message: "internal sign-up (username/password) is disabled"
- error: passwordChangeFailedForUnknownUser
message: "failed to change password for the unknown user"
- error: passwodResetFailedOldPasswordCheckFailed
message: "failed to change password, old password does not match"
- error: passwordCreateFailedForUnknownUser
message: "failed to create password for the unknown user"
- error: passwordResetDisabledByConfig
message: "password reset is disabled"
- error: passwordCreateDisabledByConfig
message: "password create is disabled"
- error: passwordNotSecure
message: "provided password is not secure; use longer password with more special characters"
- error: externalDisabledByConfig
message: "external authentication (using external authentication provider) is disabled"
log: "external authentication is disabled"
severity: warning
- error: profileWithoutValidEmail
message: "external authentication provider returned profile without valid email"
log: "external authentication provider {{credentials.kind}} returned profile without valid email"
severity: warning
- error: credentialsLinkedToInvalidUser
message: "credentials {{credentials.kind}} linked to disabled or deleted user {{user}}"
severity: warning
- error: invalidToken
message: "invalid token"
severity: warning
- error: notAllowedToImpersonate
message: "not allowed to impersonate this user"
severity: warning
- error: notAllowedToRemoveTOTP
message: "not allowed to remove TOTP"
severity: warning
- error: unconfiguredTOTP
message: "TOTP not configured"
severity: warning
- error: notAllowedToConfigureTOTP
message: "not allowed to configure TOTP"
severity: warning
- error: enforcedMFAWithTOTP
message: "TOTP is enforced and cannot be disabled"
severity: warning
- error: invalidTOTP
message: "invalid code"
severity: warning
- error: disabledMFAWithTOTP
message: "multi factor authentication with TOTP is disabled"
severity: warning
- error: disabledMFAWithEmailOTP
message: "multi factor authentication with email OTP is disabled"
severity: warning
- error: enforcedMFAWithEmailOTP
message: "OTP over email is enforced and cannot be disabled"
severity: warning
- error: invalidEmailOTP
message: "invalid code"
severity: warning
- error: maxUserLimitReached
message: "you have reached your user limit, contact your Corteza administrator"
severity: warning