This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
559-endpoint-log-events - Adds middleware for calling analytics events for each endpoint #622
Merged
Merged
Changes from 28 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
2a4dd72
559-endpoint-log-events draft middleware for calling analytics events…
eastandwestwind aa9dde6
use true source instead of boolean
eastandwestwind a97f1d0
adds fides source to front end api calls
eastandwestwind da6e363
remove comment
eastandwestwind 6efda7b
Merge branch 'main' of github.com:ethyca/fidesops into 559-endpoint-l…
eastandwestwind 5bf8937
adds enums
eastandwestwind f57d6df
adds http middleware, hard-code dev mode in docker-compose
eastandwestwind 3810e85
adds missing source header to login of admin-ui
eastandwestwind 358ad7c
fix conflicts after latest pull
eastandwestwind 70633a9
fix additional front-end admin ui API calls after latest pull
eastandwestwind 4e950c7
pull lates, fix conflicts
eastandwestwind e385ebd
fix circular imports
eastandwestwind 3d0480d
fix build issues in admin ui
eastandwestwind d768f13
mypy return type
eastandwestwind ca8c37e
set dev mode to false in graph test
eastandwestwind 8d2c3e8
pull latest, fix conflicts
eastandwestwind 26ce57e
unintended eslint change
eastandwestwind 1b1af46
adds dev mode false to additional tests
eastandwestwind 4c661c9
turn dev mode on for test_manual_task
eastandwestwind f3baadf
adds dev mode false to test_execution
eastandwestwind 1cac354
pull latest, fix conflicts
eastandwestwind 8f9d1e2
prettier
eastandwestwind 53f414e
adds unit test for middleware, removes dev mode checks
eastandwestwind e95ca1d
remove some tests for now, formatting
eastandwestwind 362acd1
pull latest, fix conflicts
eastandwestwind 0397684
bump fideslog version, move main.py test to existing file, add str re…
eastandwestwind c5e7143
pull latest, fix conflicts
eastandwestwind 0a8f94b
prevents AnalyticsEvent from being called if analytics opt out is true
eastandwestwind 1ec7db7
bump fideslog version, add docstrings, refactor local host method, ad…
eastandwestwind 8adf0e6
format
eastandwestwind a07880a
isort
eastandwestwind 209c971
unused import
eastandwestwind 8cda76a
hostname is optional type
eastandwestwind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,11 @@ | ||
/** | ||
* Adds common headers to all api calls to fidesops | ||
*/ | ||
export function addCommonHeaders(headers: Headers, token: string | null) { | ||
headers.set("Access-Control-Allow-Origin", "*"); | ||
headers.set("X-Fides-Source", "fidesops-admin-ui"); | ||
if (token) { | ||
headers.set("authorization", `Bearer ${token}`); | ||
} | ||
return headers; | ||
} |
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 @@ | ||
export {}; |
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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
from enum import Enum | ||
|
||
|
||
class EVENT(str, Enum): | ||
class Event(str, Enum): | ||
"""Enum to hold analytics event names""" | ||
|
||
server_start = "server_start" | ||
endpoint_call = "endpoint_call" | ||
|
||
|
||
class ExtraData(str, Enum): | ||
"""Enum to hold keys for extra data""" | ||
|
||
fides_source = "fides_source" |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows us to directly export function here- https://github.com/ethyca/fidesops/pull/622/files#diff-adfcb02b29653b385133da876800f29f50b8c5bc39875695ebdf2324c63525f7R4
We also have other instances throughout admin-ui where we don't use default exports, so I'm unsure why this wasn't caught before.