aiondemand / aiondemand/AIOD-rest-api

AIBuilder connector: complete mapping for version/distribution/license and prevent token leakage in URLs

Offen
#709 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
36
Forks
77
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Problem

The AIBuilder MLModel connector has partial mapping and a security concern:
- `version`, `distribution`, and `license` are marked TODO and are not fully mapped.
- Connector requests include `apiToken` in query URLs, and URL handling risks exposing sensitive token values in error paths/logging.
- The connector currently underuses available artifact metadata from AIBuilder responses.

## Affected files
- `src/connectors/aibuilder/aibuilder_mlmodel_connector.py`
- `src/connectors/aibuilder/aibuilder_mappings.py`
- `src/tests/connectors/aibuilder/test_aibuilder_mlmodel_connector.py`


## Expected behavior
1. `version` should be mapped when available (fallback from artifacts if needed).
2. `distribution` should be built from AIBuilder `artifacts`.
3. `license` should be mapped when provided.
4. token values must never appear in stored URLs or error messages.
5. connector tests should verify all the above.

## Proposed solution
- Add missing mapping keys in `aibuilder_mappings.py`.
- Implement robust distribution conversion from `artifacts` -> `RunnableDistribution`.
- Use a public token-free `same_as` URL for saved resources.
- Sanitize token from error URL messages.
- Add/update tests to assert:
- mapped `version`
- mapped `distribution`
- token-free `same_as`
- sanitized error messages

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.