forked from pydio/cells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zapfields.go
192 lines (165 loc) · 4.85 KB
/
zapfields.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
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
/*
* Copyright (c) 2019-2021. Abstrium SAS <team (at) pydio.com>
* This file is part of Pydio Cells.
*
* Pydio Cells is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pydio Cells is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Pydio Cells. If not, see <http://www.gnu.org/licenses/>.
*
* The latest code can be found at <https://pydio.com>.
*/
package common
// Define string used as keys.
const (
KeyMsgId = "MsgId"
KeyTs = "Ts"
KeyNano = "Nano"
KeyLevel = "Level"
KeyLogger = "Logger"
KeyMsg = "Msg"
)
// Known audit message IDs
const (
// Login
AuditLoginSucceed = "1"
AuditLoginFailed = "2"
AuditLoginPolicyDenial = "3"
AuditInvalidJwt = "4"
AuditLockUser = "5"
// Tree events
AuditNodeCreate = "11"
AuditNodeRead = "12"
AuditNodeList = "13"
AuditNodeUpdate = "14"
AuditNodeDelete = "15"
AuditWsCreate = "16"
AuditWsUpdate = "17"
AuditWsDelete = "18"
AuditNodeMovedToBin = "19"
// S3 Objects
AuditObjectGet = "21"
AuditObjectPut = "22"
// Users, Group, Roles
AuditUserCreate = "41"
AuditUserRead = "42"
AuditUserUpdate = "43"
AuditUserDelete = "44"
AuditGroupCreate = "46"
AuditGroupRead = "47"
AuditGroupUpdate = "48"
AuditGroupDelete = "49"
AuditRoleCreate = "51"
AuditRoleRead = "52"
AuditRoleUpdate = "53"
AuditRoleDelete = "54"
// Policies
AuditPolicyGroupStore = "61"
AuditPolicyGroupDelete = "62"
AuditPolicyStore = "63"
AuditPolicyDelete = "64"
// ShareLinks And Cells
AuditCellCreate = "71"
AuditCellRead = "72"
AuditCellUpdate = "73"
AuditCellDelete = "74"
AuditLinkCreate = "75"
AuditLinkRead = "76"
AuditLinkUpdate = "77"
AuditLinkDelete = "78"
)
// Known audit message IDs
const (
KeyContext = "Context"
// Follow a given request between the various services
KeySpanUuid = "SpanUuid"
KeySpanParentUuid = "SpanParentUuid"
KeySpanRootUuid = "SpanRootUuid"
// Group messages for a given high level operation
KeyOperationUuid = "OperationUuid"
KeyOperationLabel = "OperationLabel"
KeyNode = "Node"
KeyNodeUuid = "NodeUuid"
KeyNodePath = "NodePath"
KeyWorkspace = "Workspace"
KeyWorkspaceUuid = "WorkspaceUuid"
KeyWorkspaceScope = "WorkspaceScope"
KeyChangeLog = "ChangeLog"
KeyNodeChangeEvent = "NodeChangeEvent"
KeyVersioningPolicy = "VersioningPolicy"
KeyActivitySubscription = "ActivitySubscription"
KeyActivityStreamRequest = "StreamActivitiesRequest"
KeyActivityPostEvent = "PostActivityEvent"
KeyActivityObject = "ActivityObject"
KeyRole = "Role"
KeyRoleUuid = "RoleUuid"
KeyRoles = "Roles"
KeyProfile = "Profile"
KeyUser = "User"
KeyUsername = "UserName"
KeyUserUuid = "UserUuid"
KeyGroupPath = "GroupPath"
KeyConnector = "Connector"
// Should be ACL and ACLID if we use proto names, changed to stay homogeneous with the other fields
KeyAcl = "Acl"
KeyAclId = "AclId"
// Pydio internal merged representation of all ACLs that a user has access to
KeyAccessList = "AccessList"
KeyPolicyGroup = "PolicyGroup"
KeyPolicyGroupUuid = "PolicyGroupUuid"
KeyPolicy = "Policy"
KeyPolicyId = "PolicyId"
KeyPolicyRequest = "PolicyRequest"
// Scheduler
KeyJob = "Job"
KeyJobId = "JobId"
KeyAction = "Action"
KeyActionId = "ActionId"
KeyTask = "Task"
KeyTaskId = "TaskId"
// Running tasks in scheduler
KeySchedulerJobId = "SchedulerJobUuid"
KeySchedulerTaskId = "SchedulerTaskUuid"
KeySchedulerActionPath = "SchedulerTaskActionPath"
// Cells
KeyCell = "Cell"
KeyCellUuid = "CellUuid"
KeyLink = "ShareLink"
KeyLinkUuid = "ShareLinkUuid"
// Chat
KeyChatRoom = "ChatRoom"
KeyChatListRoomReq = "ChatListRoomRequest"
KeyChatListMsgReq = "ChatListMsgRequest"
KeyChatPostMsgReq = "ChatPostMsgRequest"
)
// Keys for the front end
const (
KeyFrontIp = "FrontIp"
KeyFrontUserid = "UserId"
KeyFrontWksid = "WorkspaceId"
KeyFrontSource = "Source"
KeyFrontPrefix = "Prefix"
KeyFrontMessage = "Message"
KeyFrontNodes = "Nodes"
)
var (
LogEventLabels = map[string]string{
AuditLoginSucceed: "Login succeed",
AuditLoginFailed: "Login failed",
AuditNodeCreate: "Create Node",
AuditNodeRead: "Read Node",
AuditNodeList: "List Node",
AuditNodeUpdate: "Upadate Node",
AuditNodeDelete: "Delete Node",
AuditObjectGet: "Get Object",
AuditObjectPut: "Put Object",
}
)