You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: group-subject warning, listing media type #577
Two low findings of the pre-release review of proTES 0.4.0 (FOCA 0.19.0) that belong to FOCA.
Problems
keep_group_subjects warning on every startup.register_access_control.py warns whenever security.access_control.group_mapping is set and keep_group_subjects is not. Apps that map groups to roles and don't use group subjects (e.g., proTES, which always sets group_mapping) log this warning on every start, although nothing is wrong, which trains operators to ignore warnings.
Plugin listing errors use another media type than its spec. The listing spec (foca/plugins/api.yaml) declares application/problem+json for its 401/403/404 responses, but errors are sent with exceptions.media_type, which apps may set to application/json (proTES does, as the GA4GH specs do). Response validation is off, so nothing fails, but the served spec is wrong for such apps.
Proposed fix
Log it at INFO, or warn only when configured policies (or stored rules) use group: subjects.
Declare the configured exceptions.media_type in the listing spec when it is registered (patch the content type), or declare both media types.
Acceptance criteria
No warning for a group mapping without group subjects when no policy uses group: subjects; still a warning when one does.
The served listing spec declares the media type that error responses have; a test covers both media types.
Activity