-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Description of the issue
Currently the download(method="API") function internally calls validate_api_credentials(), which instantiates MaStRAPI() without arguments. This requires the presence of a credentials.cfg file.
This approach creates two major problems:
- Security risk: keeping credentials.cfg in local repos or shared environments exposes sensitive credentials.
- Cloud workflows: in managed environments like Databricks it is nearly impossible to provide credentials.cfg in a secure way, since credentials are normally injected via secret scopes or environment variables.
Ideas of solution
A more flexible approach would be to extend Mastr.download() with optional parameters user and key. These would be forwarded to validate_api_credentials() and then to MaStRAPI(user, key). This would allow secure integration in production pipelines while preserving backward compatibility with the current credentials.cfg logic.
Proposed change
- Extend Mastr.download() with optional user and key arguments.
- Adapt validate_api_credentials() to accept and pass through these credentials if provided.
- Fallback to credentials.cfg only if no arguments are given.
This small change would make open-mastr usable in secure, cloud-native setups (Databricks, Airflow, CI/CD) without relying on an insecure file-based credential store.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels