Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ BUG ] Device Control Update Policies #885

Closed
CommonVulnerability opened this issue Jan 17, 2023 · 2 comments · Fixed by #888
Closed

[ BUG ] Device Control Update Policies #885

CommonVulnerability opened this issue Jan 17, 2023 · 2 comments · Fixed by #888
Labels
bug 🐛 Something isn't working device control Device Control Policies issues and questions

Comments

@CommonVulnerability
Copy link
Contributor

Describe the bug
Using the Falcon Device Control .update_policies returns following error:

{'code': 400, 'message': "Update request must specify an 'id'"}

To Reproduce
Utilizing sample code from FalconPy Wiki (https://www.falconpy.io/Service-Collections/Device-Control-Policies.html#createdevicecontrolpolicies)

from falconpy import DeviceControlPolicies

# Do not hardcode API credentials!
falcon = DeviceControlPolicies(client_id=CLIENT_ID,
                               client_secret=CLIENT_SECRET
                               )

response = falcon.update_policies(id="[my policy id]")
print(response)

Expected behavior

I modified _device_control_policy.py to include "id" in addition to "clone_id" (Line 85), and it is now behaving as expected.

keys = ["clone_id", "description", "name", "platform_name", "id"]

Environment (please complete the following information):

  • OS: MacOS
  • Python: 3.11
  • FalconPy: 1.2.9
@CommonVulnerability CommonVulnerability added the bug 🐛 Something isn't working label Jan 17, 2023
@jshcodes
Copy link
Member

Hi @CommonVulnerability -

I can confirm this issue and your suggested fix.

Do you want to submit this as a contribution to the dev branch? (There are updated operations for this Service Class coming out in v1.2.10, so we can include the fix in this update.)

@jshcodes jshcodes added the device control Device Control Policies issues and questions label Jan 17, 2023
CommonVulnerability added a commit to CommonVulnerability/falconpy that referenced this issue Jan 17, 2023
@CommonVulnerability
Copy link
Contributor Author

Submitted, I think. Not too familiar with github.

Thanks @jshcodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working device control Device Control Policies issues and questions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants