Skip to content

Releases: code42/py42

v1.8.2

01 Oct 16:39

Choose a tag to compare

1.8.2 - 2020-09-30

Fixed

  • Corrected an issue that caused sdk.detectionlists.departing_employee.get_all()
    and sdk.detectionslists.high_risk_employee.get_all() to only return the first page (first 100) records. This same issue also caused other get_all_X() methods to only return the first page if the requested page_size was less than settings.items_per_page.

Added

  • page_size parameter to:
    • sdk.detectionlists.departing_employee.get_all()
    • sdk.detectionlists.high_rsik_employee.get_all()

v1.8.1

28 Aug 15:27
5b693c5

Choose a tag to compare

1.8.1 - 2020-08-28

Fixed

  • Corrected error logic for trying to add or remove users from a system rule.

v1.8.0

27 Aug 18:44
856eeb2

Choose a tag to compare

1.8.0 - 2020-08-27

Removed

  • Removed tenant_id parameter from methods:
    • sdk.alerts.get_details()
    • sdk.alerts.resolve()
    • sdk.alerts.reopen()

Fixed

  • Issue that in rare circumstance could cause py42 to exhaust network sockets. This could sometimes occur if you were running a multi-threaded program that communicated with many Code42 storage nodes.

Added

  • Methods for obtaining archive information:

    • sdk.archive.get_by_archive_guid
    • sdk.archive.get_all_by_device_guid
  • Debug logs for restore progress during the method call py42.archive.stream_from_backup().

  • .netrc support. Calling py42.sdk.from_local_account() with no username and password will now result in py42 attempting to authenticate via an entry in your .netrc file, if you have one.

  • py42.constants.SortDirection constants DESC and ASC.

  • sdk.detectionlists.departing_employee.DepartingEmployeeFilters constants OPEN,
    EXFILTRATION_30_DAYS, EXFILTRATION_24_HOURS, and LEAVING_TODAY.

  • sdk.detectionlists.high_risk_employee.HighRiskEmployeeFilters constants OPEN,
    EXFILTRATION_30_DAYS, and EXFILTRATION_24_HOURS.

  • Methods for calling the agent-state APIs:

    • sdk.devices.get_agent_state()
    • sdk.devices.get_agent_full_disk_access_state()
    • sdk.orgs.get_agent_state()
    • sdk.orgs.get_agent_full_disk_access_states()
  • Exception classes (py42.exceptions)

    • Py42ResponseError
    • Py42UserAlreadyAddedError
    • Py42LegalHoldNotFoundOrPermissionDeniedError
    • Py42InvalidRuleOperationError
  • Methods for getting individual response pages:

    • sdk.detectionlists.departing_employee.get_page()
    • sdk.detectionlists.high_risk.get_page()
    • sdk.users.get_page()
    • sdk.devices.get_page()
    • sdk.orgs.get_page()
    • sdk.legalhold.get_matters_page()
    • sdk.legalhold.get_custodians_page()
    • sdk.alerts.get_rules_page()
  • Added enum object py42.modules.detectionlists.RiskTags with constants:

    • FLIGHT_RISK
    • HIGH_IMPACT_EMPLOYEE
    • ELEVATED_ACCESS_PRIVILEGES
    • PERFORMANCE_CONCERNS
    • SUSPICIOUS_SYSTEM_ACTIVITY
    • POOR_SECURITY_PRACTICES
    • CONTRACT_EMPLOYEE
  • Added below event filter support

    • TrustedActivity
    • RemoteActivity
    • PrintJobName
    • Printer
    • DeviceSignedInUserName
  • Added attributes to below event filters and added choices method to return list of all available attributes

    • FileCategory
    • SyncDestination
    • ExposureType
    • Source
    • EventTimestamp
    • EventType
    • SharingTypeAdded
    • RuleSource
    • RuleType
    • AlertState
    • Severity

Changed

  • sdk.archive.stream_from_backup() now calculates file sizes and accepts a file_size_calc_timeout parameter.
  • Parameter file_path on sdk.archive.stream_from_backup() renamed to file_paths and can now take a list of file paths to restore.
  • sdk.detectionlists.departing_employee.add() now raises Py42UserAlreadyAddedError when the user is already on the list.
  • sdk.detectionlists.high_risk_employee.add() now raises Py42UserAlreadyAddedError when the user already on the list.
  • sdk.legalhold.add_to_matter() now raises Py42UserAlreadyAddedError when the user is already on the matter.
  • sdk.legalhold.get_matter_by_uid() now raises Py42LegalHoldNotFoundOrPermissionDeniedError when the user does not have
    access or the ID does not exist.
  • sdk.alerts.rules.add_user() now raises Py42InvalidRuleOperationError on 404s.
  • sdk.alerts.rules.remove_user() now raises Py42InvalidRuleOperationError on 404s.
  • sdk.alerts.rules.remove_all_users() now raises Py42InvalidRuleOperationError on 404s.
  • Py42ArchiveFileNotFoundError now includes the response.
  • Py42ChecksumNotFoundError now includes the response.
  • Py42FeatureUnavailableError now includes the response.
  • Py42StorageSessionInitializationError now includes the response.

v1.7.1

27 Jul 14:25
ba62a7f

Choose a tag to compare

1.7.1 - 2020-07-24

Changed

  • sdk.securitydata.stream_file_by_md5() now raises Py42ChecksumNotFoundError when no matching md5 is found (previously was Py42ArchiveFileNotFoundError).
  • sdk.securitydata.stream_file_by_sha256() now raises Py42ChecksumNotFoundError when no matching md5 is found (previously was Py42Error).

Fixed

  • functions now return Py42Response objects as expected:
    • sdk.detectionlists.update_user_notes()
    • sdk.detectionlists.add_user_risk_tags()
    • sdk.detectionlists.remove_user_risk_tags()
    • sdk.detectionlists.add_user_cloud_alias()
    • sdk.detectionlists.remove_user_cloud_alias()
  • sdk.archive.get_all_org_cold_storage_archives() now actually uses parameters include_child_orgs, sort_key and sort_dir.

v1.7.0

21 Jul 21:00
db3d6d8

Choose a tag to compare

1.7.0 - 2020-07-21

Added

  • Functions for managing role assignment:

    • sdk.users.get_available_roles()
    • sdk.users.get_roles()
    • sdk.users.add_role()
    • sdk.users.remove_role()
  • __eq__ and __hash__ methods to the py42.sdk.queries.query_filter.QueryFilter class to enable easier comparison of filters

  • __eq__ and __contains__ methods to the py42.sdk.queries.query_filter.FilterGroup class to enable easier comparison of and membership tests of filter groups

Changed

  • When calling __str__ or __iter__ on a FilterGroup instance, the filter results have set() called on them to remove duplicate filters (if they exist) as well
    as sorts the results. This enables comparing two FilterGroups that might have been constructed differently but ultimately return the exact same results in a query.
  • FilterGroup.filter_clause property now has a setter, making it easy to change the clause on an existing filter group.

Removed

  • filter_clause arg on FilterGroup.from_dict method. The clause will automatically be derived from the dict itself.

v1.6.2

10 Jul 18:53
e420df7

Choose a tag to compare

1.6.2 - 2020-07-10

Added

  • data to Py42Response. This allows a developer to retrieve the full dict of the response under the data json node, if present, enabling the use of typical dict functions such as get().

  • content to Py42Response. This exposes the underlying requests.Response.content, which contains the fully body of the response as a byte array.

v1.6.1

09 Jul 20:25
f9c8e8a

Choose a tag to compare

1.6.1 - 2020-07-09

Fixed

  • An issue where sdk.securitydata.stream_file_by_md5() and sdk.securitydata.stream_file_by_sha256() would return streams containing an error message instead of properly failing.

  • An issue where streaming methods would load the stream completely into memory instead of retrieving it one chunk at a time.

v1.6.0

30 Jun 19:20
b40bb7a

Choose a tag to compare

1.6.0 - 2020-06-30

Added

  • Make ExposureType.OUTSIDE_TRUSTED_DOMAINS constant available.
  • sdk.securitydata methods
    • stream_file_by_sha256()
    • stream_file_by_md5()

Changed

  • email is now a required param on py42.users.create_user().

Removed

  • Faulty py42.orgs.get_by_name() method. Use py42.orgs.get_all() and/or any of the other get_by_() methods.

v1.5.1

17 Jun 13:01
d17a974

Choose a tag to compare

1.5.1 - 2020-06-17

Fixed

  • An unintended regression that caused import py42.sdk.settings.debug to fail.

Changed

  • For security reasons, debug output no longer logs the headers on http requests.

v1.5.0

16 Jun 13:00
aceebb8

Choose a tag to compare

1.5.0 - 2020-06-16

Added

  • Ability for users to provide their own logger for debug logging
  • adds sdk.detectionlists.refresh_user_scim_attributes() to update user SCIM attributes in detection lists.

Fixed

  • An issue that caused requests to sdk.alerts.rules.get_all(), sdk.alerts.rules.get_all_by_name(), and sdk.alerts.rules.get_by_observer_id() to fail due to a change made to their backing api.

Changed

  • The default value of py42.settings.items_per_page has been changed to 500 (was 1000).
  • Default debug logging moved from print statements to a logger writing to sys.stderr
  • Debug logging levels now use standard levels from the logging module (old levels still work but are now
    automatically mapped to appropriate logging module level, with both debug.DEBUG and debug.TRACE being mapped
    to logging.DEBUG, as DEBUG is the lowest level of the logging module options).