What’s New¶
This page summarizes the new features and improvements introduced in the 1.8.x series of django-suap-auth.
Note
This page must be updated with every new release published.
Version 1.8.16¶
Paginated SUAP Responses Read in Full: SUAP list endpoints are paginated (100 items per page). When fetching
user_info_endpoints, the newfetchers.get_all_pagesfunction followsnextand joins theresultsof every page into an envelope with a nullnext. Limited to 50 pages (MAX_PAGINAS);nextis only followed on the configured SUAP host.
Version 1.8.15¶
Fix: Paginated SUAP Links Were Not Saved:
/api/rh/meus-vinculos/returns{"count", "next", "previous", "results": [...]}, butsync_suap_profileonly accepted a list and discarded the response.Vinculorows were never refreshed on login and kept stale values (e.g. modalityTécnico Integradoinstead ofTécnico integrado ao ensino médio). The newlista_de_vinculosfunction accepts the list or the paginated response (uses the first page and logs a warning if there are more), also when extracting institutional phones. Each user’s links are fixed on their next login.
Version 1.8.14¶
Export and Import Users with Profile, Links and Raw Data: New
django_suap_auth.profile.transfermodule, “Exportar (JSON)” action and “Importar usuários” page (with preview and confirmation) inCustomUserAdmin, superusers only, andexport_suap_user/import_suap_user [--dry-run]commands. The import is transactional, upserts byusername, replaces links and raw data and never carries the password,is_staff,is_superuser, groups or permissions. The file contains personal data. See Exporting and Importing Users.
Version 1.8.13¶
Fix: Missing Migration for
VinculoidentificadorandtipoFields: The model declared these fields withmax_length=256andnull=True, but the database still hadvarchar(50) NOT NULL; saving a link without these values or with more than 50 characters failed. Added migration0010and a test that fails whenever a model change has no migration.
Version 1.8.12¶
Fix: “Raw Data” Inline JSON Editor When Adding a Record: In Django Admin, clicking “Add another Raw Data” for a user without
DadosBrutosshowed the JSON editor but it did not accept input (the admin clones the empty form template and theJSONEditorWidgetinit<script>does not run in the copy), so the record was saved as{}.DadosBrutosInlinenow usesInlineJSONEditorWidget(django_suap_auth.profile.widgets), which initializes the editor from a static JS file, skips the empty form template (__prefix__) and handles theformset:addedevent.Fix: Absolute Endpoints Restricted to the
base_urlHost (SSRF): Absolute endpoint URLs are only accepted with the same scheme and host asbase_urland are always rebuilt on top of it; other hosts are rejected, so the Bearer token is never sent to arbitrary hosts.Fix: Fixed Messages in JWT Endpoint Error Responses: 400/500/503/504 responses no longer expose exception text; the exception is still logged.
Version 1.8.9¶
Access-Denied Page for Authenticated User Without Permission:
SuapLoginViewnow detects when it is hit by an already-authenticated user (a sign that a permission check elsewhere failed, such as Django Admin’shas_permission) and, instead of restarting the OAuth2 flow — creating a confusing login loop —, renders a page explaining that the user is logged in but lacks permission for the requested resource. Customizable via theaccess_denied_templateattribute.Fix: Missing Translation Catalogs in the Published Package: The test and publish workflows now run
django-admin compilemessagesbefore running tests/building the package. Previous releases (including 1.8.8) never shipped compiled.mofiles, so no translation (English, Dutch) actually worked on PyPI installs — Django always fell back to the default Portuguese text.
Version 1.8.8¶
Sentry Notification Level Set to ``info`` for Secondary Sync Failures: Notifications sent to Sentry when fetching secondary SUAP user info endpoints now use severity level
infoinstead oferror, avoiding error/bug alerts for non-critical failures that do not block user login.
Version 1.8.7¶
Prioritized Persistence of DadosBrutos: Updated the profile sync workflow (sync_suap_profile) to save the DadosBrutos raw data model before attempting to build or save Perfil and Vinculo models, guaranteeing raw SUAP data is persisted even if profile save fails.
Version 1.8.6¶
Profile and Audit Model Field Length Expansion: Increased
max_lengthof profile, audit, and error model fields (from 10/50/100 to 256) to preventDataErrorfailures when receiving longer text values from SUAP API endpoints (e.g. gender “PREFERE NÃO INFORMAR”, blood type “NÃO INFORMADO”).Sentry Error Filtering for HTTP 404 and 403: Updated
report_sync_error_to_sentryservice to ignore HTTP 404 (Not Found) and 403 (Forbidden) statuses during secondary fetcher requests, avoiding false error alerts in Sentry when optional endpoints have no data for specific users.
Version 1.8.5¶
Error Handling in Secondary Fetchers: Fixed fault tolerance when retrieving user profile data via fetchers and SUAP API endpoints. Errors on secondary endpoints now record sync errors in
_sync_errorsand allow login to complete, interrupting authentication only if the failure occurs on the primary identification endpoint (/api/rh/eu/).
Version 1.8.4¶
Dutch Internationalization (``nl``): Added code internationalization support for Dutch (translation catalogs
.po/.mofornl).
Version 1.8.3¶
Audit Alert Settings: Externalized security alert thresholds to
settings.pyviaSUAP_AUTH_AUDIT_*configuration settings.
Version 1.8.2¶
Django Admin Shortcut: Added a direct shortcut button to the Audit Dashboard from the Django Admin Audit Events change list.
Version 1.8.1¶
Resilience & Migration: Added fault-tolerant error handling to audit logging and updated sandbox migrations.
Version 1.8.0¶
New Audit Module (``django_suap_auth.audit``): - Audit logging trail capturing authentication events, token exchanges, and user accesses. - Interactive dashboard integrated into Django Admin. - Security signals and monitoring support.