Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#OBS-I165: Dataset audit using user token #242

Merged
merged 290 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
290 commits
Select commit Hold shift + click to select a range
781c8af
#OBS-I116: Dataset create api fixes
JeraldJF Jul 15, 2024
fd74dc1
Merge pull request #204 from Sanketika-Obsrv/v2-apis-create
SanthoshVasabhaktula Jul 15, 2024
4560b71
Merge remote-tracking branch 'origin/v2-apis' into v2-apis-test
JeraldJF Jul 16, 2024
00ac3cb
#OBS-I116: Dataset ingestion spec generation fix
JeraldJF Jul 16, 2024
a12fd98
#OBS-I126: updated swagger documentation
yashashkumar Jul 16, 2024
edc2ca2
#OBS-I126: updated postman collection
yashashkumar Jul 16, 2024
367c843
#OBS-I126: updated postman collection
yashashkumar Jul 16, 2024
d71b680
Merge pull request #205 from Sanketika-Obsrv/swagger-documentation
HarishGangula Jul 16, 2024
efbc3ae
#OBS-I116: fix: entry topic column in datasets model
JeraldJF Jul 16, 2024
aaaaca7
#OBS-I58 feat: Minio cloud store support
HarishGangula Jul 17, 2024
b9d8176
Merge pull request #206 from Sanketika-Obsrv/minio-blob-support
HarishGangula Jul 17, 2024
6c86ba0
#OBS-I126: added dataset read, list, update api's documentation and u…
yashashkumar Jul 17, 2024
98045bd
#OBS-I116: feat: Dataschema api implementation v2
JeraldJF Jul 17, 2024
72b67b5
#OBS-I116: feat: Schema validation fix
JeraldJF Jul 17, 2024
37a1d1f
Merge pull request #208 from Sanketika-Obsrv/v2-apis-dataschema
HarishGangula Jul 18, 2024
9703899
#OBS-I126: swagger doc updated
yashashkumar Jul 18, 2024
012a068
Merge remote-tracking branch 'origin/v2-apis' into v2-apis-test-case
JeraldJF Jul 19, 2024
90f049f
Merge remote-tracking branch 'origin/v2-apis-test' into v2-apis-test-…
JeraldJF Jul 19, 2024
80ac93d
#OBS-I116: Dataset update api test cases
JeraldJF Jul 20, 2024
8d284ec
#OBS-I116: fix: linting fixes
JeraldJF Jul 20, 2024
0e1b392
#OBS-I116: lint fixes
JeraldJF Jul 21, 2024
d206d87
#OBS-I116: Dataset status transition test cases
JeraldJF Jul 21, 2024
da4928c
#OBS-I126 : added multiple requests example
yashashkumar Jul 22, 2024
2c6baa1
#OBS-I126 : updated order
yashashkumar Jul 22, 2024
636c7dd
#OBS-I126 : updated server url
yashashkumar Jul 22, 2024
e5b5900
Merge pull request #207 from Sanketika-Obsrv/swagger-documentation
HarishGangula Jul 22, 2024
c8ef5e1
#OBS-I21: feat: dataset publish changes for connectors
SurabhiAngadi Jul 22, 2024
7be5998
Merge pull request #202 from Sanketika-Obsrv/v2-apis-test
SanthoshVasabhaktula Jul 23, 2024
f85cccc
Merge remote-tracking branch 'origin/v2-apis' into v2-apis-test-case
JeraldJF Jul 23, 2024
7ab6a4a
Merge branch 'v2-apis' into #l1-Dataset-Health
HarishGangula Jul 24, 2024
761c837
#OBS-I1 updated Dataset Health API code
HarishGangula Jul 24, 2024
2b3c57b
#OBS-I116: Dataset CRUD api fixes
JeraldJF Jul 24, 2024
7114031
#OBS-I116: fix: error codes fix
JeraldJF Jul 24, 2024
3da2fd4
#OBS-I1 Refactored as per new changes
HarishGangula Jul 24, 2024
2e021b3
Merge pull request #209 from Sanketika-Obsrv/v2-apis-fix
SanthoshVasabhaktula Jul 24, 2024
104d238
#OBS-I101: Update the publish API for the v2 APIs
SanthoshVasabhaktula Jul 24, 2024
6417927
OBS-I101: Update the publish API for the v2 APIs
SanthoshVasabhaktula Jul 24, 2024
abc4ad2
#OBS-I101: fix db models
ravismula Jul 24, 2024
f088bb0
#OBS-I115: Remove the v1 unused API code and restructure the folders
SanthoshVasabhaktula Jul 24, 2024
3668cdd
Merge branch 'v2-apis' of github.com:Sanketika-Obsrv/obsrv-api-servic…
SanthoshVasabhaktula Jul 24, 2024
91fd030
Merge branch 'v2-apis' into #l1-Dataset-Health
HarishGangula Jul 24, 2024
449ed9a
#OBS-I1 Added DatasethealthService
HarishGangula Jul 24, 2024
e2e94a4
#OBS-I1 Updated the imports and folders
HarishGangula Jul 24, 2024
6501af1
Merge pull request #210 from Sanketika-Obsrv/#l1-Dataset-Health
HarishGangula Jul 24, 2024
9b8eaae
Merge branch 'v2-apis' into #I2-Health-Reset-API
HarishGangula Jul 24, 2024
a37d0bd
#OBS-I2 updated dataset reset
HarishGangula Jul 25, 2024
5c6264f
#OBS-I116: fix: Command api and schema fixes
JeraldJF Jul 25, 2024
3f500f0
#OBS-I116: fix: Command api fix in db query
JeraldJF Jul 25, 2024
5a4f041
Merge pull request #211 from Sanketika-Obsrv/v2-command-api-fix
SanthoshVasabhaktula Jul 25, 2024
c37df4d
#OBS-I1 Added Notifications and alerts APIs
HarishGangula Jul 25, 2024
bcd0a61
Merge branch 'v2-apis' into #I2-Health-Reset-API
HarishGangula Jul 26, 2024
44fe81b
#OBS-I138: added decrypted response for the read api for connectors_c…
yashashkumar Jul 26, 2024
6399a80
#OBS-I116: fix: feat: Dataset copy and export api implementation
JeraldJF Jul 26, 2024
8c8221e
#OBS-I2 Refactoring as per v2 APIs
HarishGangula Jul 26, 2024
1fbc072
#OBS-I2 typo fix
HarishGangula Jul 26, 2024
29d3a3e
Merge pull request #212 from Sanketika-Obsrv/#I2-Health-Reset-API
HarishGangula Jul 26, 2024
98248c0
#OBS-I116: fix: fix: Dataset copy check for dataset fix
JeraldJF Jul 26, 2024
424bf5d
Merge remote-tracking branch 'origin/v2-apis' into v2-export-api
JeraldJF Jul 26, 2024
489c801
#OBS-I21: dataset publish changes fixes
SurabhiAngadi Jul 26, 2024
63adc0e
#OBS-I116: fix: feat: Feedback fixes of removing set redis db
JeraldJF Jul 26, 2024
2825ebc
#OBS-I138: added cors to app
yashashkumar Jul 29, 2024
ea7e586
Merge pull request #213 from Sanketika-Obsrv/v2-export-api
SanthoshVasabhaktula Jul 29, 2024
8b9963f
#OBS-I116: fix: feat: Dataset import api implementation
JeraldJF Jul 29, 2024
bf50583
#OBS-I116: fix: fix: Dataset service fix
JeraldJF Jul 29, 2024
d3a12c3
#OBS-I116: fix: repeated Validation method removal
JeraldJF Jul 29, 2024
b5a03f0
#OBS-I116: fix: unused code
JeraldJF Jul 29, 2024
dba36d0
connector list
Rakshitha-D Jul 30, 2024
81fc511
#OBS-I142: connector list api
Rakshitha-D Jul 30, 2024
b9624ba
#OBS-I116: fix: schema validation check for v1 exported dataset.
JeraldJF Jul 30, 2024
232a4db
#OBS-I116: fix: Dataset overwrite after creation failure
JeraldJF Jul 30, 2024
d400b0e
#OBS-I116: fix: error handling
JeraldJF Jul 30, 2024
8a5646a
#OBS-I116: fix: error messages fix
JeraldJF Jul 30, 2024
6c4c9cb
#OBS-I116: fix: code fixes
JeraldJF Jul 30, 2024
ec4a1b8
#OBS-I142: formatted connector list api files
Rakshitha-D Jul 30, 2024
e8d40ae
#OBS-I142: formatted connector list api files
Rakshitha-D Jul 30, 2024
c16dde4
#OBS-I142: formatted connector list file
Rakshitha-D Jul 30, 2024
5ff24f6
Merge pull request #216 from Rakshitha-D/connector_list
HarishGangula Jul 30, 2024
c306fbf
Merge remote-tracking branch 'origin/v2-apis' into v2-import-api
JeraldJF Jul 30, 2024
8112753
Merge pull request #214 from Sanketika-Obsrv/v2-import-api
SanthoshVasabhaktula Jul 30, 2024
935647c
#OBS-I138: required changes for dataset for master dataset migration …
yashashkumar Jul 30, 2024
4edcdbd
#OBS-I138: removed cors package
yashashkumar Jul 30, 2024
9c9ab91
#OBS-I138: updated package json file
yashashkumar Jul 30, 2024
e5bc628
#OBS-I138: indentation fix
yashashkumar Jul 30, 2024
a8c4c27
#OBS-I138: indentation fix
yashashkumar Jul 30, 2024
7f3fa13
#OBS-I138: fixed indentations
yashashkumar Jul 30, 2024
fee08a7
#OBS-I142: updated postman collection
Rakshitha-D Jul 30, 2024
1ae3880
#OBS-I142: added connector list swagger documentation
Rakshitha-D Jul 30, 2024
8a4578e
#OBS-I142: updated postman collection
Rakshitha-D Jul 30, 2024
48fb3ff
Merge pull request #218 from Rakshitha-D/connector_list
HarishGangula Jul 30, 2024
cbfcc50
#OBS-I116: feat: Dataset Import and export api integration fixes
JeraldJF Jul 30, 2024
3aa4029
#OBS-I138: removed comment
yashashkumar Jul 31, 2024
9141bbc
#OBS-I138: throwing error if dataset is undefined
yashashkumar Jul 31, 2024
a700cb0
#OBS-I142: added test cases for connector list
Rakshitha-D Jul 31, 2024
1b142d2
Merge pull request #220 from Rakshitha-D/connector_list
HarishGangula Jul 31, 2024
f0e2e2b
#OBS-I138: merging dataset defaults to dataset draft record before sa…
yashashkumar Jul 31, 2024
015313c
#OBS-I138: adding merged event to dataset while migrating live or dra…
yashashkumar Jul 31, 2024
64035b5
#OBS-I142: added live_date field to defaultFields
Rakshitha-D Jul 31, 2024
fe1620a
#OBS-I145: Connector Read API
Rakshitha-D Jul 31, 2024
706fc1e
#OBS-I145: updated postman collection with connector read api
Rakshitha-D Jul 31, 2024
afa746f
#OBS-I145: updated swagger documentation
Rakshitha-D Jul 31, 2024
980be68
Merge pull request #219 from Sanketika-Obsrv/v2-api-import-fix
SanthoshVasabhaktula Jul 31, 2024
f1a4999
#OBS-I145: resolved conflicts in router file
Rakshitha-D Aug 1, 2024
0a58cbb
#OBS-I145: updated the connector read api
Rakshitha-D Aug 1, 2024
e59bdbf
Merge remote-tracking branch 'origin/v2-apis' into v2-api-integration…
yashashkumar Aug 1, 2024
62679be
merge changes
yashashkumar Aug 1, 2024
f6d84c7
merge changes
yashashkumar Aug 1, 2024
bb56fb4
Resolved merge changes
yashashkumar Aug 1, 2024
d98a79d
Resolved merge changes
yashashkumar Aug 1, 2024
6328884
#OBS-I145: updated the connector read api
Rakshitha-D Aug 1, 2024
3da564f
#OBS-I138: removed datakey before merging defaults to dataset
yashashkumar Aug 1, 2024
bed4798
#OBS-I145: updated postman collection and swagger documentation
Rakshitha-D Aug 1, 2024
5fe497b
Merge pull request #217 from Sanketika-Obsrv/v2-api-integration-fix
SanthoshVasabhaktula Aug 1, 2024
508c9b2
Merge pull request #221 from Rakshitha-D/connector_list
HarishGangula Aug 1, 2024
cb46f9b
#OBS-I145: added the test cases for connector read api
Rakshitha-D Aug 1, 2024
9c32800
#OBS-I145: added a test case for connector read api
Rakshitha-D Aug 1, 2024
9d4a71e
Merge pull request #222 from Rakshitha-D/connector_list
HarishGangula Aug 1, 2024
22d6cb2
#OBS-I116: feat: Dataset import api fixes
JeraldJF Aug 4, 2024
ad37fa0
Merge remote-tracking branch 'origin/v2-apis' into v2-apis-test-case
JeraldJF Aug 4, 2024
0c3edb7
#OBS-I116: feat: Test cases and linting fixes
JeraldJF Aug 5, 2024
0aad08f
Merge pull request #224 from Sanketika-Obsrv/v2-api-import-fix
SanthoshVasabhaktula Aug 5, 2024
0adc92d
#OBS-I116: feat: Dataset status transition test cases fix
JeraldJF Aug 5, 2024
b537062
#OBS-I1 updated the routes
HarishGangula Aug 5, 2024
91ca4d8
#OBS-I116: feat: Dataset migratio method fix
JeraldJF Aug 6, 2024
48db330
#OBS-I108: feat: helm modifications for flink connectors
SurabhiAngadi Aug 6, 2024
02d1c66
#OBS-I108: helm chart fixes
SurabhiAngadi Aug 7, 2024
74ba275
#OBS-I108: feat: Modify volume mounts
anandp504 Aug 7, 2024
e705993
#OBS-I108: feat: Add PVC for JobManager
anandp504 Aug 7, 2024
a6ba601
#OBS-I108: feat: change args for jobmanager command
anandp504 Aug 7, 2024
7e049d2
Merge pull request #229 from Sanketika-Obsrv/v2-api-import-fix
HarishGangula Aug 8, 2024
f0e53e1
#OBS-I141: added a new metric to sum the response time
Rakshitha-D Aug 9, 2024
de6da1d
#OBS-I141: modified the url variable and access dataset_id from params
Rakshitha-D Aug 9, 2024
ea7b0f8
#OBS-I141: added helper function to get dataset_id for error cases
Rakshitha-D Aug 9, 2024
fbdcf8a
#OBS-I108: feat: Use sidecar container to submit connector flink job
anandp504 Aug 9, 2024
bc69d4b
#OBS-I141: added telemetry for v2 api's
Rakshitha-D Aug 9, 2024
c3e1697
#OBS-I141: added a new metric to sum the response time
Rakshitha-D Aug 9, 2024
195aaab
#OBS-I141: modified the url variable and access dataset_id from params
Rakshitha-D Aug 9, 2024
7628bbd
#OBS-I141: added helper function to get dataset_id for error cases
Rakshitha-D Aug 9, 2024
2be8195
#OBS-I141: added telemetry for v2 api's
Rakshitha-D Aug 9, 2024
d9beea7
Merge branch 'v2api_metrics_telemetry' of https://github.com/Rakshith…
Rakshitha-D Aug 9, 2024
ec87edc
#OBS-I141: added telemetry for v2 api's
Rakshitha-D Aug 9, 2024
0b05137
#OBS-I143: feat: dataset publish changes to deploy flink connectors
SurabhiAngadi Aug 9, 2024
c185e7c
Merge remote-tracking branch 'origin/v2-apis' into v2-apis-test-case
JeraldJF Aug 12, 2024
c09c6f3
#OBS-I141: removed metric for sum of response time
Rakshitha-D Aug 12, 2024
59238bd
#OBS-I141: removed usage of builtin kafka methods from telemetry file
Rakshitha-D Aug 12, 2024
21a97a4
#OBS-I146: feat: Retire fix
JeraldJF Aug 12, 2024
1072ae8
Merge pull request #230 from Rakshitha-D/v2api_metrics_telemetry
HarishGangula Aug 12, 2024
58643d4
Issue #SBCOSS-12 fix: convert all SQL raw queries to prepared statements
AniketSaki Aug 13, 2024
2f2f755
Issue #SBCOSS-12 fix: tags is an array, so requires empty json for nu…
AniketSaki Aug 19, 2024
727dd2f
#SBCOSS-23: feat: dataset publish changes for redeployment
SurabhiAngadi Aug 20, 2024
ce5ccff
#OBS-I167 : read api changes while reading connectors according to v2…
yashashkumar Aug 20, 2024
6da29ab
#OBS-I173: fix: Ready to publish schema fix to expect connector confi…
JeraldJF Aug 20, 2024
0356548
#OBS-I174: fix: Dataset read api fix to expect both v1 and v2 connectors
JeraldJF Aug 20, 2024
71ca946
Merge remote-tracking branch 'origin/v2-apis' into v2-apis-feedbacks
JeraldJF Aug 20, 2024
ba5e9a1
Merge remote-tracking branch 'origin/v2-apis' into v2-apis-test-case
JeraldJF Aug 20, 2024
67343d8
#OBS-I146: fix: Test case fix for read api
JeraldJF Aug 20, 2024
680f67f
#OBS-I146: fix: Test case fix for read api changes
JeraldJF Aug 20, 2024
13c499e
#OBS-I146: fix: status transition test cases
JeraldJF Aug 20, 2024
9c8d4ac
#OBS-I146: fix: Test case script fix
JeraldJF Aug 20, 2024
2079680
#OBS-I146: fix: Type error fix
JeraldJF Aug 20, 2024
5573718
#OBS-I141: removed metric for sum of response time
yashashkumar Aug 21, 2024
4429b33
#OBS-I146: fix: Dataset read api test cases fixes
JeraldJF Aug 21, 2024
f07caf5
#OBS-I146: fix: Hudi spec generation test cases
JeraldJF Aug 21, 2024
802eb73
#OBS-I146: fix: Test case and linting fix
JeraldJF Aug 21, 2024
7e366f9
Merge remote-tracking branch 'origin/v2-apis-fix' into v2-apis-feedbacks
JeraldJF Aug 21, 2024
a140532
Merge branch 'v2-apis' into v2-apis
ravismula Aug 22, 2024
0760ed9
Merge pull request #232 from AniketSaki/v2-apis
ravismula Aug 22, 2024
2b4740c
merge commit
yashashkumar Aug 22, 2024
82be980
#OBS-I173: fix: Dataset web console required fixes
JeraldJF Aug 22, 2024
681a506
Merge remote-tracking branch 'origin/v2-apis-feedbacks' into v1-apis-…
yashashkumar Aug 22, 2024
8989c85
Merge remote-tracking branch 'origin/v2-apis' into v1-apis-dev-fix
yashashkumar Aug 22, 2024
671a842
#OBS-I173: fix: Dataset update changes to accept type changes
JeraldJF Aug 22, 2024
5f96092
Merge pull request #234 from Sanketika-Obsrv/v2-apis-update-fix
HarishGangula Aug 22, 2024
35e47d5
#OBS-I167 : dataset read api changes to read live dataset source configs
yashashkumar Aug 23, 2024
14ccdc5
Merge remote-tracking branch 'origin/v2-apis' into v2-apis-test-case
JeraldJF Aug 23, 2024
181de2b
#OBS-I146: fix: linting fix
JeraldJF Aug 23, 2024
53262d1
#OBS-I146: fix: linting fix
JeraldJF Aug 23, 2024
4a026de
Merge pull request #233 from Sanketika-Obsrv/v2-apis-test-case
HarishGangula Aug 23, 2024
aed84c4
#OBS-I167 : Added string or dict as type to connector_config
yashashkumar Aug 23, 2024
8236954
Merge remote-tracking branch 'origin/v2-apis' into v1-apis-dev-fix
yashashkumar Aug 23, 2024
f0ba923
#OBS-I143: dataset publish changes fixes
SurabhiAngadi Aug 23, 2024
512c435
#OBS-I167 : if dataset is empty return with error
yashashkumar Aug 23, 2024
6e350df
#OBS-I143: inswert query fix
SurabhiAngadi Aug 23, 2024
98a7e3c
Issue #OBS-I144 fix: icon data as string; check default version
AniketSaki Aug 23, 2024
19a975b
#OBS-143: fix: dataset publish fixes
SurabhiAngadi Aug 26, 2024
f98b1aa
#OBS-I167 : fix: removed duplicate code.
JeraldJF Aug 26, 2024
b1cc1d6
Merge pull request #236 from Sanketika-Obsrv/feat-OBS-I144
ravismula Aug 26, 2024
9fcee23
Merge remote-tracking branch 'origin/v2-apis' into v1-apis-dev-fix
JeraldJF Aug 26, 2024
b5e7306
#OBS-I181 - Updated the event structure
HarishGangula Aug 27, 2024
b918eaf
Merge pull request #237 from Sanketika-Obsrv/dataIn-api-fox
HarishGangula Aug 27, 2024
b24233e
Merge remote-tracking branch 'origin/v2-apis' into v1-apis-dev-fix
JeraldJF Aug 27, 2024
77f20f4
#OBS-I164: added jwt token vwerification and access control to api's
Rakshitha-D Aug 30, 2024
6aa8a8f
#OBS-I164: added jwt token vwerification and access control to api's
Rakshitha-D Aug 30, 2024
9d31325
#OBS-I164: modified the access roles and permissions
Rakshitha-D Sep 2, 2024
859a0cf
#OBS-I164: reading public key from env file
Rakshitha-D Sep 2, 2024
eebc2f9
#OBS-I186 : fix: dataset metrics api
JeraldJF Sep 3, 2024
38bcad9
#OBS-I185 : fix: removed duplicate code.
JeraldJF Sep 3, 2024
2d0afbe
#OBS-I164: modified public key variable in config
Rakshitha-D Sep 3, 2024
0652585
flink connector helm chart updates
ravismula Sep 3, 2024
9e108d8
flink connector helm chart updates
ravismula Sep 3, 2024
f669b51
fix: dataset publish fixes
SurabhiAngadi Sep 3, 2024
f5f3667
#OBS-I164: modified public key variable in config
Rakshitha-D Sep 3, 2024
808ce80
#OBS-I186 : added dataset mertric api controller and route and minor …
yashashkumar Sep 3, 2024
be67b38
Merge remote-tracking branch 'origin/v2-apis' into v1-apis-dev-fix
yashashkumar Sep 3, 2024
9a08837
install pip requirments if applicable
SurabhiAngadi Sep 3, 2024
588245b
#OBS-I186 : removed export statement
yashashkumar Sep 3, 2024
4f5e155
#OBS-I164: added config for option rbac verification
Rakshitha-D Sep 3, 2024
9d16185
#OBS-I164: changed the middleware to rbac_middleware
Rakshitha-D Sep 3, 2024
5d85633
#OBS-I186 : Logic moved to separate function
yashashkumar Sep 3, 2024
ac09f85
#OBS-I164: changed import name
Rakshitha-D Sep 3, 2024
40049e9
#OBS-I186 : Logic moved to separate function
yashashkumar Sep 3, 2024
7fbcf74
#OBS-I185 : fix: test case fixes
JeraldJF Sep 3, 2024
6d963cf
Merge pull request #235 from Sanketika-Obsrv/v1-apis-dev-fix
HarishGangula Sep 3, 2024
b7d046f
Merge remote-tracking branch 'origin/v2-apis' into v2-test-cases
JeraldJF Sep 3, 2024
7e330d3
#OBS-I185 : fix: linting fix
JeraldJF Sep 3, 2024
7dff860
#OBS-I164: modified config and rbac middleware
Rakshitha-D Sep 3, 2024
c2657a7
Merge pull request #239 from Sanketika-Obsrv/v2-test-cases
HarishGangula Sep 3, 2024
435c50a
#OBS-I164: added rbac middleware
Rakshitha-D Sep 3, 2024
ee02f93
Merge branch 'v2-apis' of https://github.com/Sanketika-Obsrv/obsrv-ap…
Rakshitha-D Sep 3, 2024
b83a808
#OBS-I164: added jsonwebtoken package
Rakshitha-D Sep 3, 2024
0857ba6
Merge pull request #238 from Sanketika-Obsrv/api_access_control
HarishGangula Sep 3, 2024
39b14e3
#OBS-I165: added userInfo from token to request object
Rakshitha-D Sep 10, 2024
b85cabf
#OBS-I165: updated telemetry to use user role
Rakshitha-D Sep 10, 2024
627a60b
#OBS-I165: updated datasetCreate api to add userRole as created_by
Rakshitha-D Sep 10, 2024
e33fb97
#OBS-I165: added userRole when migrating and create table from live
Rakshitha-D Sep 10, 2024
27c0940
#OBS-I165: added userRole for data copy api
Rakshitha-D Sep 10, 2024
dde0858
#OBS-I165: added userRole for dataset Update
Rakshitha-D Sep 10, 2024
8e94695
#OBS-I165: added userRole for dataset Import
Rakshitha-D Sep 10, 2024
7556358
#OBS-I165: added userRole for dataset status transition
Rakshitha-D Sep 10, 2024
40987b3
#OBS-I165: modified Dataset Service to update the userRoles
Rakshitha-D Sep 10, 2024
58342b6
#OBS-I165: Merge branch v2_dataset_audit into dataset-audit
Rakshitha-D Sep 10, 2024
e013c29
#OBS-I165: added permission for queryTemplateUpdate api
Rakshitha-D Sep 10, 2024
a88f30c
#OBS-I165: added userRole for query template create and update
Rakshitha-D Sep 10, 2024
c48efd7
#OBS-I165: added userRole for alerts api
Rakshitha-D Sep 11, 2024
5e49317
#OBS-I165: added userRole for notifications api
Rakshitha-D Sep 11, 2024
428db1b
#OBS-I165: added userRole for silences api
Rakshitha-D Sep 11, 2024
e76e473
#OBS-I165: corrections userRole access in notification
Rakshitha-D Sep 11, 2024
9096b75
#OBS-I165: added operations_admin role and updated permissions
Rakshitha-D Sep 11, 2024
45adebe
#OBS-I165: added rbac middleware for alert routers
Rakshitha-D Sep 11, 2024
02bd46b
#OBS-I165: modified the user permissions into a json object
Rakshitha-D Sep 12, 2024
998a846
#OBS-I165: removed unused code
Rakshitha-D Sep 12, 2024
a2e8a24
#OBS-I165: added user permissions json
Rakshitha-D Sep 12, 2024
179e8dc
#OBS-I165: removed user roles for type
Rakshitha-D Sep 12, 2024
6a0bc42
#OBS-I165: added userID to req object and importing permissions from…
Rakshitha-D Sep 12, 2024
52273e9
#OBS-I165: handled rbac disabled scenario and updated userID instead …
Rakshitha-D Sep 12, 2024
2eac48f
#OBS-I165: changed the userRole to userID
Rakshitha-D Sep 12, 2024
0b6c05d
#OBS-I165: added createdby for dataset publish api
Rakshitha-D Sep 12, 2024
6b68ad2
#OBS-I165: added error condition and modified status code
Rakshitha-D Sep 16, 2024
904a526
#OBS-I165: removed redundant code
Rakshitha-D Sep 16, 2024
2cdc2ba
#OBS-I165: merged latest code
Rakshitha-D Sep 16, 2024
aaef037
Merge branch '1.1-RC' into dataset-audit
HarishGangula Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion api-service/src/controllers/Alerts/Alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const telemetryObject = { type: "alert", ver: "1.0.0" };
const createAlertHandler = async (req: Request, res: Response, next: NextFunction) => {
try {
const alertPayload = getAlertPayload(req.body);
const userID = (req as any)?.userID;
_.set(alertPayload, "created_by", userID);
const response = await Alert.create(alertPayload);
updateTelemetryAuditEvent({ request: req, object: { id: response?.dataValues?.id, ...telemetryObject } });
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: { id: response.dataValues.id } });
Expand All @@ -30,6 +32,8 @@ const publishAlertHandler = async (req: Request, res: Response, next: NextFuncti
const { alertId } = req.params;
const rulePayload: Record<string, any> | null = await getAlertRule(alertId);
if (!rulePayload) return next({ message: httpStatus[httpStatus.NOT_FOUND], statusCode: httpStatus.NOT_FOUND });
const userID = (req as any)?.userID;
_.set(rulePayload, "updated_by", userID);
if (rulePayload.status == "live") {
await deleteAlertRule(rulePayload, false);
}
Expand Down Expand Up @@ -87,6 +91,8 @@ const deleteAlertHandler = async (req: Request, res: Response, next: NextFunctio
return next({ message: httpStatus[httpStatus.NOT_FOUND], statusCode: httpStatus.NOT_FOUND });
}
const rulePayload = ruleModel.toJSON();
const userID = (req as any)?.userID || "SYSTEM";
_.set(rulePayload, "updated_by", userID);
await deleteAlertRule(rulePayload, hardDelete === "true");
updateTelemetryAuditEvent({ request: req, currentRecord: rulePayload, object: { id: alertId, ...telemetryObject } });
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: { id: alertId } });
Expand All @@ -103,12 +109,14 @@ const updateAlertHandler = async (req: Request, res: Response, next: NextFunctio
const ruleModel = await getAlertRule(alertId);
if (!ruleModel) { return next({ message: httpStatus[httpStatus.NOT_FOUND], statusCode: httpStatus.NOT_FOUND }) }
const rulePayload = ruleModel.toJSON();
const userID = (req as any)?.userID;
if (rulePayload.status == "live") {
_.set(rulePayload, "updated_by", userID);
await deleteAlertRule(rulePayload, false);
await retireAlertSilence(alertId);
}
const updatedPayload = getAlertPayload({ ...req.body, manager: rulePayload?.manager });
await Alert.update({ ...updatedPayload, status: "draft" }, { where: { id: alertId } });
await Alert.update({ ...updatedPayload, status: "draft", updated_by: userID }, { where: { id: alertId } });
updateTelemetryAuditEvent({ request: req, currentRecord: rulePayload, object: { id: alertId, ...telemetryObject } });
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: { id: alertId } });
} catch (error: any) {
Expand Down
6 changes: 5 additions & 1 deletion api-service/src/controllers/Alerts/Silence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ const createHandler = async (request: Request, response: Response, next: NextFun

const start_date = new Date(startDate);
const end_date = new Date(endDate);
const userID = (request as any)?.userID;
const silenceBody = {
id: grafanaResponse.silenceId,
manager: grafanaResponse.manager,
alert_id: alertId,
start_time: start_date,
end_time: end_date,
created_by : userID,
}
const sileneResponse = await Silence.create(silenceBody);
updateTelemetryAuditEvent({ request, object: { id: sileneResponse?.dataValues?.id, ...telemetryObject } });
Expand Down Expand Up @@ -78,10 +80,12 @@ const updateHandler = async (request: Request, response: Response, next: NextFun
await updateSilence(silenceObject, payload);
const updatedStartTime = new Date(payload.startTime);
const updatedEndTime = new Date(payload.endTime);
const userID = (request as any)?.userID;
const updatedSilence = {
...silenceObject,
start_time: updatedStartTime,
end_time: updatedEndTime
end_time: updatedEndTime,
updated_by: userID,
}
const silenceResponse = await Silence.update(updatedSilence, { where: { id } })
ResponseHandler.successResponse(request, response, { status: httpStatus.OK, data: { silenceResponse } })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export const createQueryTemplate = async (req: Request, res: Response) => {
}

const data = transformRequest(requestBody, templateName);
const userID = (req as any)?.userID;
_.set(data, "created_by", userID);
await QueryTemplate.create(data)
logger.info({ apiId, msgid, resmsgid, requestBody: req?.body, message: `Query template created successfully` })
return ResponseHandler.successResponse(req, res, { status: 200, data: { template_id: templateId, template_name: templateName, message: `The query template has been saved successfully` } });
Expand Down
2 changes: 2 additions & 0 deletions api-service/src/controllers/DatasetCopy/DatasetCopy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const datasetCopy = async (req: Request, res: Response) => {
validateRequest(req);
const newDatasetId = _.get(req, "body.request.destination.datasetId");
const dataset = await fetchDataset(req);
const userID = (req as any)?.userID;
_.set(dataset, "created_by", userID);
updateRecords(dataset, newDatasetId)
const response = await datasetService.createDraftDataset(dataset).catch(err => {
if (err?.name === "SequelizeUniqueConstraintError") {
Expand Down
2 changes: 2 additions & 0 deletions api-service/src/controllers/DatasetCreate/DatasetCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const datasetCreate = async (req: Request, res: Response) => {

await validateRequest(req)
const draftDataset = getDraftDataset(req.body.request)
const userID = (req as any)?.userID;
_.set(draftDataset, "created_by", userID);
const dataset = await datasetService.createDraftDataset(draftDataset);
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: dataset });
}
Expand Down
7 changes: 5 additions & 2 deletions api-service/src/controllers/DatasetImport/DatasetImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ const datasetImport = async (req: Request, res: Response) => {
const migratedConfigs = migrateExportedDatasetV1(requestBody)
datasetPayload = migratedConfigs;
}
const userID = (req as any)?.userID;
_.set(datasetPayload, "created_by", userID);
const { updatedDataset, ignoredFields } = await datasetImportValidation({ ...requestBody, "request": datasetPayload })
const { successMsg, partialIgnored } = getResponseData(ignoredFields)

const dataset = await importDataset(updatedDataset, overwrite);
const dataset = await importDataset(updatedDataset, overwrite, userID);
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: { message: successMsg, data: dataset, ...(!_.isEmpty(partialIgnored) && { ignoredFields: partialIgnored }) } });
}

const importDataset = async (dataset: Record<string, any>, overwrite: string | any) => {
const importDataset = async (dataset: Record<string, any>, overwrite: string | any, userID : string) => {
const dataset_id = _.get(dataset,"dataset_id")
const response = await datasetService.createDraftDataset(dataset).catch(err => { return err })
if (response?.name === "SequelizeUniqueConstraintError") {
if (overwrite === "true") {
_.set(dataset, "updated_by", userID);
const overwriteRes = await datasetService.updateDraftDataset(dataset).catch(()=>{
throw obsrvError(dataset_id, "DATASET_IMPORT_FAILURE", `Failed to import dataset: ${dataset_id} as overwrite failed`, "INTERNAL_SERVER_ERROR", 500);
})
Expand Down
9 changes: 5 additions & 4 deletions api-service/src/controllers/DatasetRead/DatasetRead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ const datasetRead = async (req: Request, res: Response) => {
validateRequest(req);
const { dataset_id } = req.params;
const { fields, mode } = req.query;
const userID = (req as any)?.userID;
const attributes = !fields ? defaultFields : _.split(<string>fields, ",");
const dataset = (mode == "edit") ? await readDraftDataset(dataset_id, attributes) : await readDataset(dataset_id, attributes)
const dataset = (mode == "edit") ? await readDraftDataset(dataset_id, attributes, userID) : await readDataset(dataset_id, attributes)
if (!dataset) {
throw obsrvError(dataset_id, "DATASET_NOT_FOUND", `Dataset with the given dataset_id:${dataset_id} not found`, "NOT_FOUND", 404);
}
Expand All @@ -41,19 +42,19 @@ const datasetRead = async (req: Request, res: Response) => {
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: dataset });
}

const readDraftDataset = async (datasetId: string, attributes: string[]): Promise<any> => {
const readDraftDataset = async (datasetId: string, attributes: string[], userID: string): Promise<any> => {

const attrs = _.union(attributes, ["dataset_config", "api_version", "type", "id"])
const draftDataset = await datasetService.getDraftDataset(datasetId, attrs);
if (draftDataset) { // Contains a draft
const apiVersion = _.get(draftDataset, ["api_version"]);
const dataset: any = (apiVersion === "v2") ? draftDataset : await datasetService.migrateDraftDataset(datasetId, draftDataset)
const dataset: any = (apiVersion === "v2") ? draftDataset : await datasetService.migrateDraftDataset(datasetId, draftDataset, userID)
return _.pick(dataset, attributes);
}

const liveDataset = await datasetService.getDataset(datasetId, undefined, true);
if (liveDataset) {
const dataset = await datasetService.createDraftDatasetFromLive(liveDataset)
const dataset = await datasetService.createDraftDatasetFromLive(liveDataset, userID)
return _.pick(dataset, attributes);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,21 @@ const datasetStatusTransition = async (req: Request, res: Response) => {
validateRequest(req, dataset_id);

const dataset: Record<string, any> = (_.includes(liveDatasetActions, status)) ? await datasetService.getDataset(dataset_id, ["id", "status", "type", "api_version"], true) : await datasetService.getDraftDataset(dataset_id, ["id", "dataset_id", "status", "type", "api_version"])
const userID = (req as any)?.userID;
validateDataset(dataset, dataset_id, status);

switch (status) {
case "Delete":
await deleteDataset(dataset);
break;
case "ReadyToPublish":
await readyForPublish(dataset);
await readyForPublish(dataset, userID);
break;
case "Live":
await publishDataset(dataset);
await publishDataset(dataset, userID);
break;
case "Retire":
await retireDataset(dataset);
await retireDataset(dataset, userID);
break;
default:
throw obsrvError(dataset.id, "UNKNOWN_STATUS_TRANSITION", "Unknown status transition requested", "BAD_REQUEST", 400)
Expand All @@ -84,7 +85,7 @@ const deleteDataset = async (dataset: Record<string, any>) => {
}


const readyForPublish = async (dataset: Record<string, any>) => {
const readyForPublish = async (dataset: Record<string, any>, updated_by: any) => {

const draftDataset: any = await datasetService.getDraftDataset(dataset.dataset_id)
let defaultConfigs: any = _.cloneDeep(defaultDatasetConfig)
Expand All @@ -93,7 +94,14 @@ const readyForPublish = async (dataset: Record<string, any>) => {
if (draftDataset?.type === "master") {
defaultConfigs = _.omit(defaultConfigs, "dataset_config.keys_config.data_key");
}
_.mergeWith(draftDataset, defaultConfigs, draftDataset, (objValue, srcValue) => {
_.set(draftDataset, "updated_by", updated_by);
_.mergeWith(draftDataset, defaultConfigs, draftDataset, (objValue, srcValue ,key) => {
if (key === "created_by"|| key === "updated_by") {
if (objValue !== "SYSTEM") {
return objValue;
}
return srcValue;
}
if (_.isBoolean(objValue) && _.isBoolean(srcValue)) {
return objValue;
}
Expand All @@ -120,10 +128,12 @@ const readyForPublish = async (dataset: Record<string, any>) => {
*
* @param dataset
*/
const publishDataset = async (dataset: Record<string, any>) => {
const publishDataset = async (dataset: Record<string, any>, userID: any) => {

const draftDataset: Record<string, any> = await datasetService.getDraftDataset(dataset.dataset_id) as unknown as Record<string, any>

_.set(draftDataset, ["created_by"], userID);
_.set(draftDataset, ["updated_by"], userID);
console.log(draftDataset);
await validateAndUpdateDenormConfig(draftDataset);
await updateMasterDataConfig(draftDataset)
await datasetService.publishDataset(draftDataset)
Expand Down Expand Up @@ -202,10 +212,10 @@ const updateMasterDataConfig = async (draftDataset: Record<string, any>) => {
}
}

const retireDataset = async (dataset: Record<string, any>) => {
const retireDataset = async (dataset: Record<string, any>, updated_by: any) => {

await canRetireIfMasterDataset(dataset);
await datasetService.retireDataset(dataset);
await datasetService.retireDataset(dataset, updated_by);
await restartPipeline(dataset);
}

Expand Down
2 changes: 2 additions & 0 deletions api-service/src/controllers/DatasetUpdate/DatasetUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ const datasetUpdate = async (req: Request, res: Response) => {
validateDataset(datasetModel, req)

const draftDataset = mergeDraftDataset(datasetModel, datasetReq);
const userID = (req as any)?.userID;
_.set(draftDataset, "updated_by", userID )
const response = await datasetService.updateDraftDataset(draftDataset);
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: response });
}
Expand Down
10 changes: 8 additions & 2 deletions api-service/src/controllers/NotificationChannel/Notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const telemetryObject = { type: "notificationChannel", ver: "1.0.0" };
const createHandler = async (request: Request, response: Response, next: NextFunction) => {
try {
const payload = request.body;
const userID = (request as any)?.userID;
_.set(payload, "created_by", userID);
const notificationBody = await Notification.create(payload);
updateTelemetryAuditEvent({ request, object: { id: notificationBody?.dataValues?.id, ...telemetryObject } });
ResponseHandler.successResponse(request, response, { status: httpStatus.OK, data: { id: notificationBody.dataValues.id } })
Expand All @@ -32,6 +34,8 @@ const updateHandler = async (request: Request, response: Response, next: NextFun
if (_.get(notificationPayload, "status") === "live") {
await updateNotificationChannel(notificationPayload);
}
const userID = (request as any)?.userID;
_.set(updatedPayload, "updated_by", userID);
await Notification.update({ ...updatedPayload, status: "draft" }, { where: { id } });
ResponseHandler.successResponse(request, response, { status: httpStatus.OK, data: { id } });
} catch (err) {
Expand Down Expand Up @@ -74,7 +78,8 @@ const retireHandler = async (request: Request, response: Response, next: NextFun
if (!notificationPayload) return next({ message: httpStatus[httpStatus.NOT_FOUND], statusCode: httpStatus.NOT_FOUND });
updateTelemetryAuditEvent({ request, object: { id, ...telemetryObject }, currentRecord: notificationPayload });
await updateNotificationChannel(notificationPayload);
await Notification.update({ status: "retired" }, { where: { id } })
const userID = (request as any)?.userID;
await Notification.update({ status: "retired", updated_by: userID }, { where: { id } })
ResponseHandler.successResponse(request, response, { status: httpStatus.OK, data: { id } });
} catch (err) {
const error = createError(httpStatus.INTERNAL_SERVER_ERROR, _.get(err, "message") || httpStatus[httpStatus.INTERNAL_SERVER_ERROR])
Expand All @@ -91,7 +96,8 @@ const publishHandler = async (request: Request, response: Response, next: NextFu
if (notificationPayload.status === "live") throw new Error(httpStatus[httpStatus.CONFLICT]);
updateTelemetryAuditEvent({ request, object: { id, ...telemetryObject }, currentRecord: notificationPayload });
await publishNotificationChannel(notificationPayload);
Notification.update({ status: "live" }, { where: { id } });
const userID = (request as any)?.userID;
Notification.update({ status: "live", updated_by: userID }, { where: { id } });
ResponseHandler.successResponse(request, response, { status: httpStatus.OK, data: { id, status: "published" } });
} catch (err) {
const error = createError(httpStatus.INTERNAL_SERVER_ERROR, _.get(err, "message") || httpStatus[httpStatus.INTERNAL_SERVER_ERROR])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export const updateQueryTemplate = async (req: Request, res: Response) => {
logger.error({ apiId, msgid, resmsgid, templateId, requestBody: req?.body, message: `Invalid template provided, A template should consist of variables ${requiredVariables} and type of json,sql`, code: "QUERY_TEMPLATE_INVALID_INPUT" })
return ResponseHandler.errorResponse({ statusCode: 400, message: `Invalid template provided, A template should consist of variables ${requiredVariables} and type of json,sql`, errCode: "BAD_REQUEST", code: "QUERY_TEMPLATE_INVALID_INPUT" }, req, res)
}

const userID = (req as any)?.userID;
requestBody.request.updated_by = userID;
await QueryTemplate.update(requestBody?.request, { where: { template_id: templateId } })
logger.info({ apiId, msgid, resmsgid, templateId, requestBody, message: `Query template updated successfully` })
ResponseHandler.successResponse(req, res, { status: 200, data: { message: "Query template updated successfully", templateId } });
Expand Down
Loading