-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Support for HTTP Headers in URL Fetch Requests with Secure Storage for Landing Requests #20924
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
mvdbeek
merged 35 commits into
galaxyproject:dev
from
davelopez:explore_url_fetch_with_headers
Jan 27, 2026
Merged
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
50b7fbd
Adds support for custom headers in URL fetch requests
davelopez a823471
Adds header encryption utilities using Vault system
davelopez 19b3db7
Replaces hardcoded tool ID with a constant
davelopez b035a43
Adds header encryption/decryption for tool landing requests
davelopez 37fb0a0
Adds integration test for encrypted sensitive headers in landing requ…
davelopez d66a7e5
Adds header encryption for workflow landings
davelopez a80d669
Add integration test for workflow landing header encryption
davelopez 385d709
Simplifies sensitive header pattern matching
davelopez a9ede65
Adds logging for encryption/decryption failures in landing requests
davelopez e879af8
Refactors header encryption/decryption logic into helper methods
davelopez 16fb142
Adds logging for missing vault keys in header decryption
davelopez a91fc73
Let encrypt/decrypt headers fail fast
davelopez 6a87662
Adds recursive sensitive header detection utility
davelopez 089a589
Enforce vault configuration when sensitive headers are present
davelopez 6d29408
Introduce configurable URL header allow-list
davelopez 9be9081
Use configurable patterns for header sensitivity
davelopez ae1e89b
Update encryption/decryption API for URL-aware config
davelopez 3012450
Use URL-aware header encryption for landing requests
davelopez 2a734e1
Update headers_encryption tests for URL config
davelopez 7d3ecc4
Adds URL header allow-list management
davelopez 71d6685
Replaces generic ValueErrors with specific exceptions
davelopez 94dd7dd
Refactor UrlHeadersConfig to use ABC and Null Object pattern
davelopez 8698bc1
Implement UrlHeadersConfiguration and UrlHeadersConfigFactory
davelopez f69086b
Adapt LandingRequestManager to use UrlHeadersConfigFactory
davelopez 0c96fa4
Add utility for configuring allowed URL headers in tests
davelopez 3b6d015
Update headers encryption tests for new config factory and exceptions
davelopez 037868f
Add integration tests for URL headers configuration
davelopez 09a2aea
Adds unit tests for URL header pattern matching
davelopez d29b61a
Adds sample for URL header configuration
davelopez 1a71ca8
Adds URL headers config to mock app
davelopez d93f093
Rebuild config
davelopez 343d4b8
Removes unused null config factory method
davelopez 848f9f0
Updates sample config with sensitive auth headers
davelopez 962388c
Use correct dataset_populator method after rebase
davelopez a12a082
Adds docs for enabling HTTP headers in fetch
davelopez 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
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
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 @@ | ||
| ../lib/galaxy/config/sample/url_headers_conf.yml.sample |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # Allowed URL Headers Configuration | ||
| # | ||
| # This file defines which HTTP headers are allowed in URL fetch requests based | ||
| # on URL patterns, and whether they should be treated as sensitive (encrypted | ||
| # in the vault) or not. | ||
| # | ||
| # If no allow-list is specified or this file is empty/missing, NO headers will | ||
| # be allowed in URL requests. | ||
| # | ||
| # Configuration structure: | ||
| # patterns: | ||
| # - url_pattern: A regular expression pattern to match URLs | ||
| # headers: | ||
| # - name: The exact header name (case-insensitive) | ||
| # sensitive: Whether this header contains sensitive information that should | ||
| # be encrypted when stored in the database (requires vault configuration) | ||
| # | ||
| # IMPORTANT: | ||
| # ------------------------------------ | ||
| # When a URL matches MULTIPLE patterns, the union of all allowed headers is used. | ||
| # This means you can compose permissions from multiple patterns for flexibility. | ||
| # | ||
| # Example: A URL matching both pattern A (allows headers X, Y) and pattern B | ||
| # (allows headers Y, Z) will allow headers X, Y, and Z. | ||
| # | ||
| # Security: If ANY matching pattern marks a header as sensitive, it will be | ||
| # treated as sensitive (secure-by-default). | ||
| # | ||
| # The following examples are for illustration purposes only; please use only the minimum configuration for your needs. | ||
| # Examples: | ||
|
|
||
| patterns: | ||
| # GitHub API access - allow authentication headers for GitHub URLs | ||
| - url_pattern: "^https://api\\.github\\.com/.*" | ||
| headers: | ||
| - name: Authorization | ||
| sensitive: true | ||
| - name: Accept | ||
| sensitive: false | ||
| - name: X-GitHub-Api-Version | ||
| sensitive: false | ||
|
|
||
| # Generic GitHub content (raw files, releases) - no auth needed | ||
| - url_pattern: "^https://(raw\\.githubusercontent\\.com|github\\.com/.*/releases/download)/.*" | ||
| headers: | ||
| - name: Accept | ||
| sensitive: false | ||
| - name: Accept-Encoding | ||
| sensitive: false | ||
|
|
||
| # AWS S3 buckets - allow AWS authentication headers | ||
| - url_pattern: "^https://.*\\.s3\\..+\\.amazonaws\\.com/.*" | ||
| headers: | ||
| - name: Authorization | ||
| sensitive: true | ||
| - name: X-Amz-Date | ||
| sensitive: false | ||
| - name: X-Amz-Content-Sha256 | ||
| sensitive: false | ||
| - name: X-Amz-Security-Token | ||
| sensitive: true | ||
|
|
||
| # Generic cloud storage APIs | ||
| - url_pattern: "^https://.*\\.(googleapis\\.com|azure\\.com|digitaloceanspaces\\.com)/.*" | ||
| headers: | ||
| - name: Authorization | ||
| sensitive: true | ||
| - name: X-API-Key | ||
| sensitive: true | ||
| - name: Accept | ||
| sensitive: false | ||
|
|
||
| # FTP over HTTP services | ||
| - url_pattern: "^https?://ftp\\..*/.*" | ||
| headers: | ||
| - name: Authorization | ||
| sensitive: true | ||
| - name: Accept | ||
| sensitive: false | ||
|
|
||
| # Academic/research data repositories | ||
| - url_pattern: "^https://.*(zenodo\\.org|figshare\\.com|dryad\\.org|dataverse\\.org)/.*" | ||
| headers: | ||
| - name: Authorization | ||
| sensitive: true | ||
| - name: X-API-Key | ||
| sensitive: true | ||
| - name: Accept | ||
| sensitive: false | ||
|
|
||
| # HTTPS URLs - basic headers only (most restrictive for unknown sources) | ||
| - url_pattern: "^https://.*" | ||
| headers: | ||
| - name: Authorization | ||
| sensitive: true | ||
| - name: X-Auth-Token | ||
| sensitive: true | ||
| - name: X-API-Key | ||
| sensitive: true | ||
| - name: Accept | ||
| sensitive: false | ||
| - name: Accept-Language | ||
| sensitive: false | ||
| - name: Accept-Encoding | ||
| sensitive: false | ||
| - name: Cache-Control | ||
| sensitive: false | ||
|
|
||
| # Security notes: | ||
| # - All matching patterns contribute their allowed headers (union of permissions) | ||
| # - If ANY pattern marks a header as sensitive, it's treated as sensitive | ||
| # - Only add headers that are absolutely necessary for your use case | ||
| # - When in doubt, mark headers as sensitive to ensure encryption | ||
| # - Patterns are order-independent, making configuration more composable | ||
| # - HTTP (non-HTTPS) URLs are generally not recommended and may be blocked | ||
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.
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.