You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My issue isn't already found on the issue tracker.
I have replicated my issue using the latest version of the library and it is still present.
cloudflare-go version
0.19.0
Go environment
GOVERSION="go1.15"
Expected output
A usable device posture rule should be created for reference by Cloudflare for Teams policies.
Actual output
The Go library currently does not pass a flavor as part of the rule input; this behavior differs from the Cloudflare for Teams web console. A usable JSON object should look like this:
by the looks, this field doesn't have public API support yet so once it's documented (and confirmed to be intentionally used by the public), we can look at adding it
Confirmation
cloudflare-go version
0.19.0
Go environment
GOVERSION="go1.15"
Expected output
A usable device posture rule should be created for reference by Cloudflare for Teams policies.
Actual output
The Go library currently does not pass a
flavor
as part of the ruleinput
; this behavior differs from the Cloudflare for Teams web console. A usable JSON object should look like this:The
flavor
is not currently defined in the rule struct: https://github.com/cloudflare/cloudflare-go/blob/master/device_posture_rule.go#L28:L36It is admittedly also missing from the Cloudflare API docs, which is unfortunate.
I am not a direct consumer of the Cloudflare Go library but it's used by Terraform, which I use to manage our Cloudflare account. It doesn't make much sense to open a bug for the Cloudflare provider until it's fixed here because they use this library for API calls: https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/cloudflare/resource_cloudflare_device_posture_rule.go
Code demonstrating the issue
{
"type": "application",
"name": "Jamf",
"schedule": "5m",
"match": [
{
"platform": "mac"
}
],
"input": {
"path": "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon",
"running": true,
"thumbprint": "e86867eab7456a4fefcda5541be7d7e2c5aacbe9"
}
}
Steps to reproduce
POST
the above JSON object toclient/v4/accounts/.../devices/posture
to create a new device posture rulePOST
the above JSON object again with"flavor": "application"
in theinput
attribute toclient/v4/accounts/.../devices/posture/...
References
No response
The text was updated successfully, but these errors were encountered: