Skip to content

Commit

Permalink
add what was changed to SAML connector update audit events
Browse files Browse the repository at this point in the history
  • Loading branch information
capnspacehook committed Mar 29, 2024
1 parent 307ac7d commit 9253aec
Show file tree
Hide file tree
Showing 6 changed files with 1,898 additions and 1,132 deletions.
31 changes: 31 additions & 0 deletions api/proto/teleport/legacy/types/events/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,23 @@ message AccessListMemberMetadata {
repeated AccessListMember Members = 2 [(gogoproto.jsontag) = "members,omitempty"];
}

// DiffChangelog is a list of changes from one version of a resource to another.
message DiffChangelog {
repeated DiffChange Changes = 1 [(gogoproto.jsontag) = "changes"];
}

// DiffChange is a change of one field from one version of a resource to another.
message DiffChange {
// Type is the type of change.
string Type = 1 [(gogoproto.jsontag) = "type"];
// Path is the path to the field that was changed.
string Path = 2 [(gogoproto.jsontag) = "path"];
// From is the value before the change.
string From = 3 [(gogoproto.jsontag) = "from"];
// To is the value after the change.
string To = 4 [(gogoproto.jsontag) = "to"];
}

// AccessListMember is metadata surrounding an individual access list member.
message AccessListMember {
// JoinedOn is the date that the member joined.
Expand Down Expand Up @@ -2467,6 +2484,13 @@ message SAMLConnectorCreate {
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// Changes are the changes between the existing and new SAML connector
DiffChangelog Changes = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}

// SAMLConnectorUpdate fires when SAML connector is updated.
Expand All @@ -2491,6 +2515,13 @@ message SAMLConnectorUpdate {
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// Changes are the changes between the existing and new SAML connector
DiffChangelog Changes = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}

// SAMLConnectorDelete fires when SAML connector is deleted.
Expand Down
Loading

0 comments on commit 9253aec

Please sign in to comment.