-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Initial credential creation show after as rather a value (#1476)
* Fixes when a credential is created, an audit_event is generated. It should display a hash of the credential body and include the initial label as you can see in the updated event below and after the created event in this image. --------- Co-authored-by: Taylor Downs <[email protected]> Co-authored-by: Stuart Corbishley <[email protected]>
- Loading branch information
1 parent
0140930
commit ec394c1
Showing
20 changed files
with
517 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
defmodule Lightning.Workflows.WebhookAuthMethodAudit do | ||
@moduledoc """ | ||
Model for storing changes to WebhookAuthMethod | ||
""" | ||
use Lightning.Auditing.Audit, | ||
repo: Lightning.Repo, | ||
item: "webhook_auth_method", | ||
events: [ | ||
"created", | ||
"updated", | ||
"added_to_trigger", | ||
"removed_from_trigger", | ||
"deleted" | ||
] | ||
|
||
@impl true | ||
def update_changes(changes) when is_map(changes) do | ||
Enum.into(changes, %{}, fn | ||
{key, val} when key in [:username, :password, :api_key] -> | ||
{:ok, encrypted_val} = Lightning.Encrypted.Binary.dump(val) | ||
{key, Base.encode64(encrypted_val)} | ||
|
||
other -> | ||
other | ||
end) | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.