-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: Continue syncing if no users are found #9
Conversation
- downgrade go-falcon to support proper mapping of domain_user (first name and last name are incorrectly mapped in newer versions) - upgrade go version as well as other dependecies
go.mod
Outdated
github.com/conductorone/baton-sdk v0.1.11 | ||
github.com/crowdstrike/gofalcon v0.4.2 | ||
github.com/conductorone/baton-sdk v0.1.33 | ||
github.com/crowdstrike/gofalcon v0.3.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a release candidate has the fix: https://github.com/CrowdStrike/gofalcon/releases/tag/0.7.0-rc1
Do we want to try using that? If it works, we can switch to 0.7.0 when it comes out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the github release went through, but I can't find it in the go registry: https://pkg.go.dev/github.com/crowdstrike/gofalcon?tab=versions. Will let them know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not aware of installation steps of pre-releases, fixed in 84dacf5
pkg/connector/helpers.go
Outdated
func NewRateLimitInfo(limit, remaining int64) RateLimitInfo { | ||
return RateLimitInfo{ | ||
func NewRateLimitInfo(limit, remaining int64) *RateLimitInfo { | ||
return &RateLimitInfo{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change needed? The code looks uglier so it must be important. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggreer it is not needed, I just like to use pointers as a good practice 😄 I'm not sure about using it with such small structs though. I reverted this change and use copies of RateLimitInfo
struct. I could refactor it to use array of pointers, but that might be overkill, what do you think of using pointers over copies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong opinion here. If you like pointers, leave this code using pointers.
- add status and lastLogin into user - use supported referencing in loops (GO version 1.22) - use creating resource id instead of whole object
- remove deprecated `deadcode`, `varcheck` and `execinquery`
This PR implements more robust flow of syncing users and roles. If no user ids are found, we continue syncing other resources.
This PR also updates dependencies and downgrades go-falcon library due to incorrect mapping of domain_user. (issue described here: CrowdStrike/gofalcon#425