-
Notifications
You must be signed in to change notification settings - Fork 7
feat(stac)!: experimenting with stac auth proxy configure_app #531
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
Merged
Merged
Changes from 27 commits
Commits
Show all changes
118 commits
Select commit
Hold shift + click to select a range
c12b441
fix: experimenting with stac auth proxy configure_app
botanical b5aed61
fix: lint issues
botanical 324ad7f
Update stac_api/runtime/src/app.py
botanical b6016c1
Update stac_api/runtime/src/app.py
botanical c09aaed
fix: update app configuration
botanical 5683d2b
fix: enable auth, remove unused imports
botanical af680e1
fix: disable auth on stac api
botanical 61047af
fix: disable root path on configure app
botanical 0c4b130
fix: add back mysterious fix for KeyError paths aka root_path setting
botanical 1e9d041
Update stac_api/runtime/src/app.py
botanical 986d72c
fix: add root path to upstream url and try to enable logging
botanical e9b7ef0
fix: merge conflicts
botanical 828f509
fix: formatting
botanical 46bf970
fix: try enabling debug logging at root level
botanical af0c7db
fix: increment httpx version to be compatible with stac auth proxy, r…
botanical c8a0304
fix: clean up app.py
botanical 8417e06
fix: remove env_file specification in docker-compose.yml
botanical ebf5c17
fix: revert httpx version change for test
botanical 7211ebe
fix: attempt to fix tests
botanical 416a26d
fix: rewrite tenant filter middleware and account for trailing slashes
botanical b2dadc9
fix: route rewriting logic and comments
botanical 4932a5d
fix: formatting
botanical 907db7e
fix: add url rewriting for tenant urls
botanical c2e9409
feat: somewhat functioning custom landing page
botanical 97e9a3b
feat: update to capture trailing slash landing page and simplify _is_…
botanical 85642b7
fix: update to fix tenant customization
botanical 4333e05
fix: update testing parameters, exclude more standard endpoints
botanical cc45ef8
fix: update based on feedback
botanical 54bcfee
fix: resolve merge conflicts
botanical 9297219
fix: resolve merge conflicts
botanical e1b771e
fix: add health check back for integration tests
botanical 9b8c0fc
fix: remove endpoint, not needed
botanical ef8cae2
fix: add feature flag
botanical a6dbc74
fix: update oidc mock in test fixture
botanical 9adf8b5
fix: add compression middleware when stac-auth-proxy is not enabled
botanical ce0ed86
fix: update config description for enable_transactions and enable_sta…
botanical 38f5bdb
feat: update middleware to accomodate item link injection
botanical aac1015
fix: rewrite item link url rewriting, check for geo+json
botanical d67bc00
fix: remove unused import
botanical 994547f
fix: remove redunant swagger ui settings
botanical 1a8ca6b
fix: add back dashboard check for link injection
botanical 9436f25
fix: refactor and update to account for trailing slashes
botanical 1a33f36
chore: reduce web concurrency during dev
alukach 166d6b5
chore: match production root path in dev
alukach 19367fa
fix: break up middleware, rm cql2 filtering
alukach 3f69d07
Support internal oidc provider (eg containerized environments)
alukach b5b5db5
fix: account for additional path with no trailing slash
botanical 9636930
Re-add disabled middleware
alukach 4944a2a
fix: disable compression on stac-auth-proxy
alukach d3f625c
fix: run tenant middleware before stac-auth-proxy middleware
alukach 4dea340
feat: add filters
alukach f9ce41f
fix: support root path when parsing URLs
alukach f25d3ad
chore: reduce log level
alukach 6b923b3
chore(docker): Add mock oidc server
alukach 08d14fa
chore(docker): mount code to docker image for easier restarts
alukach d538274
chore: format dockerfile
alukach cbd5c03
chore(filters): derive paths from imported filters
alukach 6534fa5
Merge branch 'jt/tenant-filtering-stac-auth-proxy' into alukach/tenan…
alukach 8413fd3
fix: add feature flag fixes, add prefix redirect middleware, fix tena…
botanical 7d2d7d0
fix: add root path to test endpoints
botanical 6d69617
fix: add prefix redirect middleware (#536)
botanical 6b08cb3
fix: tenant filtering via stac auth proxy (#535)
alukach dce311f
Update prefix_redirect_middleware.py
alukach 02ac52f
fix: update test fixtures for stac and ingest api, add mocking
botanical 04b8d66
fix: udpate datetime to actual value
botanical b415fd3
fix: check for root_path before extracting or removing tenant
botanical 52978e4
add private endpoints
smohiudd a149efb
fix: add root path to test environment
botanical 5bcc06c
Merge branch 'jt/tenant-filtering-stac-auth-proxy' of https://github.…
botanical feae63f
fix: add allowed_jwt_audiences to configure_app
botanical ba5fd7b
Update prefix_redirect_middleware.py (#537)
alukach 15bb411
Require auth proxy to be enabled if transactions are enabled
alukach fd40416
fix(redirect-middleware): bad variables
alukach b1a884b
test: Update tests to check tenant filtering
alukach eeee8bc
Update test_filters.py
alukach 0e0b7af
try async
alukach d9b99a7
breakup tests
alukach aefb3c2
fix: add asyncio and update mocking oidc
botanical 5873f48
fix: remove print statement
botanical ecc5acc
Expand fixture data
alukach 897ed9a
Mv tests to integration tests
alukach eb090dc
fix collections filter, support pagination
alukach 80365f9
simplify logs
alukach 9cb9630
Simplify workflow
alukach 2e04d9c
fix collections filter, support pagination
alukach b210a50
simplify logs
alukach a3518b9
Redescribe tests
alukach dc26506
Revert "Simplify workflow"
alukach 398e292
fix filters
alukach 970fe61
Merge branch 'jt/tenant-filtering-stac-auth-proxy' into alukach/funct…
alukach 2088624
Attempt to speed up tests
alukach 237ef2d
Revert "test: Update tests to check tenant filtering"
alukach 93e3b6a
Get tests to pass
alukach e15f3c1
Update test_stac.py
botanical 5679c29
legibility improvements
alukach f5b652d
add test for links
alukach 6c516c4
fix: only add tenant to local links (e.g. ignore links to tiler)
alukach 00117e5
fix: cleanup after test
alukach 1e4fce9
Ensure valid_stac_item belngs to valid_stac_collection
alukach dc5fd6c
test: functional tenant filter tests (#538)
alukach 71afaa6
Add cache for item filter lookup
alukach 71b6653
Expose failing test
alukach 0fb1eaf
Use cachetools for caching
alukach f831741
Update stac-auth-proxy to avoid bulk-insert failure
alukach 22433e5
Remove TenantContext
alukach dfdebba
Merge branch 'jt/tenant-filtering-stac-auth-proxy' into alukach/cache…
alukach c5b61c9
refactor: Remove TenantContext (#541)
alukach 52619e4
feat: cache collections lookup (#540)
alukach 7268d45
fix: remove unused TENANT_ITEM_LINK_TEMPLATES, update config variable…
botanical c068969
fix: add back custom host default setting
botanical 71377bd
fix: update ItemFilter to use async cache
botanical a7aff1d
fix: lint errors
botanical 85c0fb1
fix: set custom host in stac lambda
botanical e68a80a
fix: add protocol to custom host if missing
botanical 4825ea7
fix: use async-lru
botanical aa0af07
fix: consider root_path when determining if link should be transformed
alukach fb57094
refactor: eliminate need to pass in root_path into middleware (root p…
alukach 6a5556a
fix: lint error
alukach 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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,133 @@ | ||
| { | ||
| "id": "barc-thomasfire", | ||
| "type": "Collection", | ||
| "links": [ | ||
| { | ||
| "rel": "items", | ||
| "type": "application/geo+json", | ||
| "href": "https://dev.openveda.cloud/api/stac/collections/barc-thomasfire/items" | ||
| }, | ||
| { | ||
| "rel": "parent", | ||
| "type": "application/json", | ||
| "href": "https://dev.openveda.cloud/api/stac/" | ||
| }, | ||
| { | ||
| "rel": "root", | ||
| "type": "application/json", | ||
| "href": "https://dev.openveda.cloud/api/stac/" | ||
| }, | ||
| { | ||
| "rel": "self", | ||
| "type": "application/json", | ||
| "href": "https://dev.openveda.cloud/api/stac/collections/barc-thomasfire" | ||
| }, | ||
| { | ||
| "rel": "items", | ||
| "href": "https://dev.openveda.cloud/api/stac/collections/barc-thomasfire/items", | ||
| "type": "application/geo+json" | ||
| }, | ||
| { | ||
| "rel": "http://www.opengis.net/def/rel/ogc/1.0/queryables", | ||
| "href": "https://dev.openveda.cloud/api/stac/collections/barc-thomasfire/queryables", | ||
| "type": "application/schema+json", | ||
| "title": "Queryables" | ||
| }, | ||
| { | ||
| "rel": "http://www.opengis.net/def/rel/ogc/1.0/queryables", | ||
| "type": "application/schema+json", | ||
| "title": "Queryables", | ||
| "href": "https://dev.openveda.cloud/api/stac/collections/barc-thomasfire/queryables" | ||
| } | ||
| ], | ||
| "title": "Burn Area Reflectance Classification for Thomas Fire", | ||
| "extent": { | ||
| "spatial": { | ||
| "bbox": [ | ||
| [ | ||
| -119.7279834250452, | ||
| 34.19572604525683, | ||
| -118.88724142537933, | ||
| 34.72668711929945 | ||
| ] | ||
| ] | ||
| }, | ||
| "temporal": { | ||
| "interval": [ | ||
| [ | ||
| "2017-12-01T00:00:00+00:00", | ||
| "2017-12-31T00:00:00+00:00" | ||
| ] | ||
| ] | ||
| } | ||
| }, | ||
| "license": "CC0-1.0", | ||
| "renders": { | ||
| "dashboard": { | ||
| "title": "VEDA Dashboard Render Parameters", | ||
| "assets": [ | ||
| "cog_default" | ||
| ], | ||
| "nodata": "nan", | ||
| "rescale": [ | ||
| [ | ||
| 1, | ||
| 4 | ||
| ] | ||
| ], | ||
| "colormap_name": "rdylgn_r" | ||
| } | ||
| }, | ||
| "providers": [ | ||
| { | ||
| "url": "https://burnseverity.cr.usgs.gov/products/baer", | ||
| "name": "USGS Burnt Area Emergency Response (BAER)", | ||
| "roles": [ | ||
| "producer" | ||
| ] | ||
| }, | ||
| { | ||
| "url": "https://www.earthdata.nasa.gov/dashboard/", | ||
| "name": "NASA VEDA", | ||
| "roles": [ | ||
| "host" | ||
| ] | ||
| }, | ||
| { | ||
| "url": "https://www.earthdata.nasa.gov/dashboard/", | ||
| "name": "NASA VEDA", | ||
| "roles": [ | ||
| "processor" | ||
| ] | ||
| } | ||
| ], | ||
| "summaries": { | ||
| "datetime": [ | ||
| "2017-12-01T00:00:00Z" | ||
| ], | ||
| "cog_default": { | ||
| "max": 4, | ||
| "min": 1 | ||
| } | ||
| }, | ||
| "description": "Burn Area Reflectance Classification (BARC) from the Burned Area Emergency Response (BAER) program for Thomas fire, 2017", | ||
| "item_assets": { | ||
| "cog_default": { | ||
| "type": "image/tiff; application=geotiff; profile=cloud-optimized", | ||
| "roles": [ | ||
| "data", | ||
| "layer" | ||
| ], | ||
| "title": "Default COG Layer", | ||
| "description": "Cloud optimized default layer to display on map" | ||
| } | ||
| }, | ||
| "stac_version": "1.0.0", | ||
| "stac_extensions": [ | ||
| "https://stac-extensions.github.io/render/v1.0.0/schema.json", | ||
| "https://stac-extensions.github.io/item-assets/v1.0.0/schema.json" | ||
| ], | ||
| "dashboard:is_periodic": false, | ||
| "dashboard:time_density": null, | ||
| "dashboard:tenant": "different-tenant" | ||
| } |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -24,5 +24,6 @@ | |
| ] | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "dashboard:tenant": "fake-tenant" | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.