feature (events/audit): Add auth info to audit events (#1644)
This commit is contained in:
10 files changed
+205
-30
No files matched your search
@@ -662,7 +662,7 @@ func Test_WriteAudit(t *testing.T) {
|
||||
AuthAccountId: "test_auth_account_id",
|
||||
},
|
||||
GrantsInfo: &event.GrantsInfo{
|
||||
Grants: []event.GrantsPair{
|
||||
Grants: []event.Grant{
|
||||
{
|
||||
Grant: "test_grant",
|
||||
ScopeId: "test_grant_scope_id",
|
||||
|
||||
@@ -25,20 +25,22 @@ type UserInfo struct {
|
||||
}
|
||||
|
||||
type GrantsInfo struct {
|
||||
Grants []GrantsPair `json:"grants_pair,omitempty"`
|
||||
Grants []Grant `json:"grants,omitempty"`
|
||||
}
|
||||
|
||||
type GrantsPair struct {
|
||||
type Grant struct {
|
||||
Grant string `json:"grant,omitempty" class:"public"`
|
||||
ScopeId string `json:"scope_id,omitempty" class:"public"`
|
||||
RoleId string `json:"role_id,omitempty" class:"public"`
|
||||
}
|
||||
|
||||
type Auth struct {
|
||||
AuthTokenId string `json:"auth_token_id" class:"public"`
|
||||
UserInfo *UserInfo `json:"user_info,omitempty"` // boundary field
|
||||
GrantsInfo *GrantsInfo `json:"grants_info,omitempty"`
|
||||
UserEmail string `json:"email,omitempty" class:"sensitive"`
|
||||
UserName string `json:"name,omitempty" class:"sensitive"`
|
||||
DisabledAuthEntirely *bool `json:"disabled_auth_entirely,omitempty" class:"public"`
|
||||
AuthTokenId string `json:"auth_token_id" class:"public"`
|
||||
UserInfo *UserInfo `json:"user_info,omitempty"` // boundary field
|
||||
GrantsInfo *GrantsInfo `json:"grants_info,omitempty"`
|
||||
UserEmail string `json:"email,omitempty" class:"sensitive"`
|
||||
UserName string `json:"name,omitempty" class:"sensitive"`
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
|
||||
Reference in new issue
Block a user