-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: get resource from store using backend and resource type instead…
… of urn (#143) * use backend and resource type to fetch resource instead of namespace_id * add test for namespace * remove unnecessary print statements * refactor query building * fix lint * simplifying conditionls * todo format correction * remove unnecessary tag * correct the comment * correct the json keys in seed data * lint fix * get id from name and not urn
- Loading branch information
Showing
14 changed files
with
179 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 1 | ||
log: | ||
level: debug | ||
|
||
app: | ||
port: 8089 | ||
ruleset: file:///Users/kartikverma/work/data-engineering/shield/ignore/rules | ||
resources_config_path: file:///Users/kartikverma/work/data-engineering/shield/ignore/resource | ||
identity_proxy_header: "X-Auth-Email" | ||
|
||
proxy: | ||
services: | ||
- host: 0.0.0.0 | ||
port: 5556 | ||
ruleset: file:///Users/kartikverma/work/data-engineering/shield/ignore/rules | ||
resources_config_path: file:///Users/kartikverma/work/data-engineering/shield/ignore/resource | ||
identity_proxy_header: "X-Auth-Email" | ||
|
||
db: | ||
driver: postgres | ||
url: postgres://shield:@localhost:5432/shield?sslmode=disable | ||
max_query_timeout: 1000ms | ||
|
||
spicedb: | ||
host: 0.0.0.0 | ||
port: 50052 | ||
pre_shared_key: shield | ||
|
||
newrelic: | ||
app_name: local-shield-v2 | ||
license: e308f819064ac3e96012420aeca0d48d780cNRAL | ||
enabled: false |
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
3 changes: 3 additions & 0 deletions
3
...gres/migrations/20220802035409_add_backend_and_resource_type_column_in_namespace.down.sql
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,3 @@ | ||
ALTER TABLE namespaces drop column backend; | ||
|
||
ALTER TABLE namespaces drop column resource_type; |
3 changes: 3 additions & 0 deletions
3
...stgres/migrations/20220802035409_add_backend_and_resource_type_column_in_namespace.up.sql
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,3 @@ | ||
ALTER TABLE namespaces ADD COLUMN backend varchar; | ||
|
||
ALTER TABLE namespaces ADD COLUMN resource_type varchar; |
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