This repository has been archived by the owner on Mar 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
/
const.go
114 lines (89 loc) · 3.19 KB
/
const.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
package consts
import "time"
//TODO change this
//TRASA_VERSION is current version of TRASA
const TRASA_VERSION = "2020.7.2"
const (
ChangePassword = "changepassword"
)
type EntityConst string
const (
//Entities
ENTITY_USER EntityConst = "ENTITY_USER"
ENTITY_APP EntityConst = "ENTITY_APP"
ENTITY_APP_USER_MAP EntityConst = "ENTITY_APP_USER_MAP"
ENTITY_GROUP EntityConst = "ENTITY_GROUP"
ENTITY_APP_GROUP_MAP EntityConst = "ENTITY_APP_GROUP_MAP"
ENTITY_USER_GROUP_MAP EntityConst = "ENTITY_USER_GROUP_MAP"
ENTITY_USERGROUP_APP EntityConst = "ENTITY_USERGROUP_APP"
ENTITY_USERGROUP_APPGROUP_MAP EntityConst = "ENTITY_USERGROUP_APPGROUP_MAP"
ENTITY_USER_DEVICE EntityConst = "ENTITY_USER_DEVICE"
// Scopes
ALL_USER = "ALL_USER"
ALL_ORGADMINS = "ALL_ORGADMINS"
ALL_NORMALUSERS = "ALL_NORMALUSERS"
ALL_SERVICES = "ALL_SERVICES"
ALL_GROUPS = "ALL_GROUPS"
ALL_USERGROUPS = "ALL_USERGROUPS"
ALL_SERVICEGROUPS = "ALL_SERVICEGROUPS"
ALL_SSHSERVICES = "ALL_SSHSERVICES"
ALL_RDPSERVICES = "ALL_RDPSERVICES"
ALL_HTTPSERVICES = "ALL_HTTPSERVICES"
ALL_DATABASESERVICES = "ALL_DATABASESERVICES"
ORG = "ORG"
DOMAIN = "DOMAIN"
// Passwords
ADMIN_FORGOT_PASSWORD = "ADMIN_FORGOT_PASSWORD"
// Security
SUSPICIOUS_LOGIN = "SUSPICIOUS_LOGIN"
// System
SYSTEM = "SYSTEM"
LOW_SYSTEM_RESOURCE = "LOW_SYSTEM_RESOURCE"
)
const (
KEY_DOAPI = "KEY_DOAPI"
KEY_LDAP = "KEY_LDAP"
KEY_SCIM = "KEY_SCIM"
KEY_SMTP = "KEY_SMTP"
)
type EmailType string
const (
EMAIL_ADHOC EmailType = "EMAIL_ADHOC"
EMAIL_DYNAMIC_ACCESS EmailType = "EMAIL_DYNAMIC_ACCESS"
EMAIL_SECURITY_ALERT EmailType = "EMAIL_SECURITY_ALERT"
EMAIL_USER_CRUD EmailType = "EMAIL_USER_CRUD"
EMAIL_ERR_REPORT EmailType = "EMAIL_ERR_REPORT"
)
const (
EMAIL_SMTP EmailType = "EMAIL_SMTP"
EMAIL_MAILGUN EmailType = "EMAIL_MAILGUN"
)
type VerifyTokenIntent string
const (
VERIFY_TOKEN_CHANGEPASS VerifyTokenIntent = "VERIFY_TOKEN_CHANGEPASS"
VERIFY_TOKEN_TFA VerifyTokenIntent = "VERIFY_TOKEN_TFA"
)
type TokenExpiryTime int
const (
TOKEN_EXPIRY_CHANGEPASS time.Duration = time.Second * 900 // 15 MINUTES
TOKEN_EXPIRY_SIGNUP time.Duration = time.Second * 90000 // 25 HOURS
)
const (
AUTH_RESP_NOTIF_LICENSE = "AUTH_RESP_NOTIF_LICENSE"
AUTH_RESP_ENROL_DEVICE = "AUTH_RESP_ENROL_DEVICE"
AUTH_RESP_TFA_REQUIRED = "AUTH_RESP_TFA_REQUIRED"
AUTH_RESP_TFA_DH_REQUIRED = "AUTH_RESP_TFA_DH_REQUIRED"
AUTH_RESP_SELECT_ORG = "AUTH_RESP_SELECT_ORG"
AUTH_RESP_CHANGE_PASS = "AUTH_RESP_CHANGE_PASS" // for authenticated session
AUTH_RESP_RESET_PASS = "AUTH_RESP_RESET_PASS" // for resets due to policy direction or default passwords.
AUTH_RESP_FORGOT_PASS = "AUTH_RESP_FORGOT_PASS" // forgot password
)
const (
AUTH_REQ_DASH_LOGIN = "AUTH_REQ_DASH_LOGIN"
AUTH_REQ_CHANGE_PASS = "AUTH_REQ_CHANGE_PASS"
AUTH_REQ_ENROL_DEVICE = "AUTH_REQ_ENROL_DEVICE"
AUTH_REQ_FORGOT_PASS = "AUTH_REQ_FORGOT_PASS"
AUTH_HTTP_ACCESS_PROXY = "AUTH_HTTP_ACCESS_PROXY"
AUTH_REQ_TFA_DH = "AUTH_REQ_TFA_DH"
)
const DEFAULT_ROOT_PASSWORD = "changeme"