Skip to content

Secure Map Service - #1277

Open
jakeymac wants to merge 29 commits into
mainfrom
secure-map-service
Open

Secure Map Service#1277
jakeymac wants to merge 29 commits into
mainfrom
secure-map-service

Conversation

@jakeymac

Copy link
Copy Markdown
Contributor

Description

This merge adds new capabilities to Tethys with Secure Map Services that allow for secure storing of authentication data used to access Map or Imagery services.

Changes Made to Code

Related PRs, Issues, and Discussions

Additional Notes

Quality Checks

  • At least one new test has been written for new code
  • New code has 100% test coverage
  • Code has been formatted with Black
  • Code has been linted with flake8
  • Docstrings for new methods have been added
  • The documentation has been updated appropriately

* Added middleware to allow apps to require users to be authenticated with Oauth or be redirected to settings to get their account connected
* Added GRiD backend for Oauth authentication
* Added new basemap capabilities to allow secure map services to be used as basemaps
* Added proxy url route and view for secure requests to SecureMapService endpoints with authentication data
* Added helper methods for interacting with SecureMapServices and settings
@jakeymac jakeymac self-assigned this May 28, 2026
jakeymac added 2 commits June 27, 2026 09:48
* Added better error logging in fetch_response util method
* Updated secure map service proxy controller to accept any kind of request, not just GET
* Added form_id and draw attributes to MapLayout to allow for drawing and passing geometry to forms
* Fixed user_data in grid backend
@coveralls

coveralls commented Jul 30, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 99.507% (-0.5%) from 99.993% — secure-map-service into main

jakeymac added 3 commits July 30, 2026 15:24
…re map service settings

* Updated portal_config.yml file to have a generated SALT_KEY to use for encryption, updated settings.py to use this value
* Updated secure map proxy endpoint to always include browser params(params supplied from the browser(bbox, etc))
@jakeymac
jakeymac marked this pull request as ready for review August 3, 2026 17:19
Comment thread tethys_apps/models.py
def _generate_request(self, param_overrides=None):
"""
Generate a request to the secure map service, including any necessary authentication headers or parameters.
"""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swainn I just noticed this function doesn't handle the OAuth2 token if the service setting is not set to use the proxy endpoint... Thoughts on how that should be handled?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to worry about the OAuth token here at all, maybe we have a note/warning to just use the service as a layer or a response instead of getting the endpoint url without the OAuth token, or should this function perhaps return the OAuth token as well as the url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants