Skip to content

Unify EGI and Globus Authorization - #52

Merged
lukaszlacinski merged 9 commits into
mainfrom
integration
Jul 21, 2026
Merged

Unify EGI and Globus Authorization#52
lukaszlacinski merged 9 commits into
mainfrom
integration

Conversation

@lukaszlacinski

Copy link
Copy Markdown
Collaborator

The PR does update two things:

  • use the same Authorizer from esgf-core-utils in the east and west deployments
  • handle missing extension schema URL and enrich schema validation error detail

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the transaction API to use a single shared Authorizer implementation from esgf-core-utils across deployments, and improves error handling around extension schema retrieval and STAC validation feedback.

Changes:

  • Replaced deployment-specific authorization branching with the shared esgf_core_utils.models.auth.Authorizer.
  • Added more detailed error handling when downloading/parsing extension schemas.
  • Updated default extension schema URLs and bumped esgf-core-utils dependency.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/utils.py Adds HTTP/error/JSON parsing handling for extension schema downloads; enriches validation error details.
src/settings/init.py Updates default extension schema URLs/versions used for validation.
src/client.py Switches transaction authorization to the shared esgf-core-utils Authorizer.
src/authorizer/globus_authorizer.py Migrates Globus middleware context to build the shared esgf-core-utils Authorizer; adds S3 policy loading support.
src/authorizer/globus_auth.py Removes the repo-local GlobusAuth implementation in favor of the shared Authorizer.
poetry.lock Bumps esgf-core-utils to 1.1.0 (and related locked dependency metadata).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/utils.py
Comment on lines +193 to +195
response = httpx.get(extension)
response.raise_for_status()
schema = response.json()
Comment thread src/utils.py
Comment on lines +196 to +199
except httpx.HTTPStatusError as exc:
e = UnexpectedExtensionException(extension=extension)
e.detail = f"Error {exc.response.status_code} while getting the extension schema {exc.request.url}"
raise e
Comment thread src/utils.py
Comment on lines +200 to +203
except httpx.RequestError as exc:
e = UnexpectedExtensionException(extension=extension)
e.detail = f"An error occured while getting the extension schema {exc.request.url}"
raise e
Comment thread src/utils.py
Comment on lines +204 to +207
except json.JSONDecodeError as exc:
e = UnexpectedExtensionException(extension=extension)
e.detail = f"Failed to decode the extension schema {extension}: {exc.msg}" f"Error occured at line: {exc.lineno}, column: {exc.colno}"
raise e
Comment thread src/client.py Outdated

@rhysrevans3 rhysrevans3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good 👍

@sturoscy-personal

Copy link
Copy Markdown
Collaborator

Very minor concern. There are now two things named Authorizer imported in the same codebase api.py#L13 imports the middleware class from authorizer/__init__.py, while client.py#L7 imports the Pydantic auth model from esgf_core_utils.

I understand one is middleware used in the fastapi app and the other exposes a pydantic model with various methods. Just wanted to call this out :)

@sturoscy-personal sturoscy-personal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left a quick comment in the PR, but this otherwise looks fine to me.

@lukaszlacinski
lukaszlacinski merged commit 3b472fe into main Jul 21, 2026
2 checks passed
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.

4 participants