Releases: code42/py42
v1.8.2
1.8.2 - 2020-09-30
Fixed
- Corrected an issue that caused
sdk.detectionlists.departing_employee.get_all()
andsdk.detectionslists.high_risk_employee.get_all()to only return the first page (first 100) records. This same issue also caused otherget_all_X()methods to only return the first page if the requestedpage_sizewas less thansettings.items_per_page.
Added
page_sizeparameter to:sdk.detectionlists.departing_employee.get_all()sdk.detectionlists.high_rsik_employee.get_all()
v1.8.1
v1.8.0
1.8.0 - 2020-08-27
Removed
- Removed
tenant_idparameter 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_guidsdk.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.netrcfile, if you have one. -
py42.constants.SortDirectionconstantsDESCandASC. -
sdk.detectionlists.departing_employee.DepartingEmployeeFiltersconstantsOPEN,
EXFILTRATION_30_DAYS,EXFILTRATION_24_HOURS, andLEAVING_TODAY. -
sdk.detectionlists.high_risk_employee.HighRiskEmployeeFiltersconstantsOPEN,
EXFILTRATION_30_DAYS, andEXFILTRATION_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)Py42ResponseErrorPy42UserAlreadyAddedErrorPy42LegalHoldNotFoundOrPermissionDeniedErrorPy42InvalidRuleOperationError
-
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.RiskTagswith constants:FLIGHT_RISKHIGH_IMPACT_EMPLOYEEELEVATED_ACCESS_PRIVILEGESPERFORMANCE_CONCERNSSUSPICIOUS_SYSTEM_ACTIVITYPOOR_SECURITY_PRACTICESCONTRACT_EMPLOYEE
-
Added below event filter support
- TrustedActivity
- RemoteActivity
- PrintJobName
- Printer
- DeviceSignedInUserName
-
Added attributes to below event filters and added
choicesmethod 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 afile_size_calc_timeoutparameter.- Parameter
file_pathonsdk.archive.stream_from_backup()renamed tofile_pathsand can now take a list of file paths to restore. sdk.detectionlists.departing_employee.add()now raisesPy42UserAlreadyAddedErrorwhen the user is already on the list.sdk.detectionlists.high_risk_employee.add()now raisesPy42UserAlreadyAddedErrorwhen the user already on the list.sdk.legalhold.add_to_matter()now raisesPy42UserAlreadyAddedErrorwhen the user is already on the matter.sdk.legalhold.get_matter_by_uid()now raisesPy42LegalHoldNotFoundOrPermissionDeniedErrorwhen the user does not have
access or the ID does not exist.sdk.alerts.rules.add_user()now raisesPy42InvalidRuleOperationErroron 404s.sdk.alerts.rules.remove_user()now raisesPy42InvalidRuleOperationErroron 404s.sdk.alerts.rules.remove_all_users()now raisesPy42InvalidRuleOperationErroron 404s.Py42ArchiveFileNotFoundErrornow includes the response.Py42ChecksumNotFoundErrornow includes the response.Py42FeatureUnavailableErrornow includes the response.Py42StorageSessionInitializationErrornow includes the response.
v1.7.1
1.7.1 - 2020-07-24
Changed
sdk.securitydata.stream_file_by_md5()now raisesPy42ChecksumNotFoundErrorwhen no matching md5 is found (previously wasPy42ArchiveFileNotFoundError).sdk.securitydata.stream_file_by_sha256()now raisesPy42ChecksumNotFoundErrorwhen no matching md5 is found (previously wasPy42Error).
Fixed
- functions now return
Py42Responseobjects 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 parametersinclude_child_orgs,sort_keyandsort_dir.
v1.7.0
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 thepy42.sdk.queries.query_filter.QueryFilterclass to enable easier comparison of filters -
__eq__and__contains__methods to thepy42.sdk.queries.query_filter.FilterGroupclass to enable easier comparison of and membership tests of filter groups
Changed
- When calling
__str__or__iter__on aFilterGroupinstance, the filter results haveset()called on them to remove duplicate filters (if they exist) as well
as sorts the results. This enables comparing twoFilterGroups that might have been constructed differently but ultimately return the exact same results in a query. FilterGroup.filter_clauseproperty now has a setter, making it easy to change the clause on an existing filter group.
Removed
filter_clausearg onFilterGroup.from_dictmethod. The clause will automatically be derived from the dict itself.
v1.6.2
1.6.2 - 2020-07-10
Added
-
datatoPy42Response. This allows a developer to retrieve the full dict of the response under thedatajson node, if present, enabling the use of typical dict functions such asget(). -
contenttoPy42Response. This exposes the underlyingrequests.Response.content, which contains the fully body of the response as a byte array.
v1.6.1
1.6.1 - 2020-07-09
Fixed
-
An issue where
sdk.securitydata.stream_file_by_md5()andsdk.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
1.6.0 - 2020-06-30
Added
- Make
ExposureType.OUTSIDE_TRUSTED_DOMAINSconstant available. sdk.securitydatamethodsstream_file_by_sha256()stream_file_by_md5()
Changed
emailis now a required param onpy42.users.create_user().
Removed
- Faulty
py42.orgs.get_by_name()method. Usepy42.orgs.get_all()and/or any of the otherget_by_()methods.
v1.5.1
v1.5.0
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(), andsdk.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_pagehas 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
loggingmodule (old levels still work but are now
automatically mapped to appropriateloggingmodule level, with bothdebug.DEBUGanddebug.TRACEbeing mapped
tologging.DEBUG, asDEBUGis the lowest level of theloggingmodule options).