Skip to content

Added read only permissions to duo-client#308

Open
sfazilud wants to merge 1 commit intoduosecurity:masterfrom
sfazilud:permission-update
Open

Added read only permissions to duo-client#308
sfazilud wants to merge 1 commit intoduosecurity:masterfrom
sfazilud:permission-update

Conversation

@sfazilud
Copy link

Description

Added new Admin API permission parameters to the create_integration and update_integration methods in the Python client:

  • adminapi_admins_read — read-only admins permission
  • adminapi_integrations_read — read-only integrations permission
  • adminapi_settings_read — read-only settings permission
  • adminapi_allow_to_set_permissions — permission to set permissions (create only)

These were added to:

  • Function signatures
  • Docstrings
  • Request body serialization (bool → "1"/"0")
  • Integration object format documentation

Motivation and Context

The upstream third-party repo (trustedpath/third-party/duo_client_python) introduced additional granular read-only permission flags for Admin API integrations. This change brings the open-source duo_client_python client in sync with those additions, allowing consumers to configure fine-grained read permissions when creating or updating integrations.

How Has This Been Tested?

Added 4 new unit tests in tests/admin/test_integration.py:

  • test_create_integration_with_permissions — verifies all permission params serialize as "1" when True
  • test_create_integration_with_permissions_disabled — verifies new permission params serialize as "0" when False
  • test_update_integration_with_permissions — verifies all permission params on update serialize as "1"
  • test_update_integration_with_permissions_disabled — verifies new permission params on update serialize as "0"

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant