Adding MSA authentication #4
Open
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.
Adding MSA Server Security and Authentication Support
Summary
This PR adds security/authentication support for calling custom MSA servers in IntelliFold, enabling both basic authentication and API token authentication when accessing protected MSA endpoints. This implementation is based on similar functionality that was successfully merged in Boltz: jwohlwend/boltz#466
Changes
Basic Authentication:
--msa_server_username
and--msa_server_password
CLI options, withINTELLIFOLD_MSA_USERNAME
/MSA_USERNAME
andINTELLIFOLD_MSA_PASSWORD
/MSA_PASSWORD
environment variable supportAPI Key Authentication:
--api_key_header
and--api_key_value
CLI options, withINTELLIFOLD_MSA_API_KEY_VALUE
/MSA_API_KEY_VALUE
environment variable supportValidation: Only one authentication method can be used at a time, with clear error messages for conflicts
Backward Compatibility: Legacy environment variable names (
MSA_*
) are still supported alongside prefixed versions (INTELLIFOLD_MSA_*
)Motivation
Many custom MSA servers require authentication for access. This enables IntelliFold to work with protected MSA servers in enterprise environments while maintaining full backward compatibility with existing workflows.
Usage Examples
Basic Authentication
API Key Authentication
Command Line Usage
Backward Compatibility
https://api.colabfold.com
) requires no authentication and remains the defaultMSA_USERNAME
,MSA_PASSWORD
,MSA_API_KEY_VALUE
) are still supportedFiles Modified
runner/intellifold_inference.py
- Main inference script with authentication logicrun_intellifold.py
- Standalone runner script with matching authentication supportReference
This authentication implementation is based on similar work done in the Boltz project: jwohlwend/boltz#466
Security Note: Always use environment variables for credentials in production environments to avoid exposing sensitive information in command-line history or process lists.