-
Notifications
You must be signed in to change notification settings - Fork 174
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
New Rule: Standard Sign-In from Rogue State #1332
base: develop
Are you sure you want to change the base?
Conversation
Added a new helper (panther_country_helpers) to contain code relating to getting contextual information from country codes. Moved the existing functions out out panther_base_helpers and expanded on them. Also refactored the rogue state sign-in rule to use the new helper.
OneLogin data model was checking the event type as an integer, but our schema actually casts the event type as a string, so the data model never mapped correctly. I've fixed this. Since I'm unsure if there's any likelihood of the event type being an integer instead of a string, I've opted to manually cast it to a string when comparing
😱 [INFO][root]: ignoring file dependabot.yml |
@arielkr256 there were 2 log sources associated with this rule that I was unable to write tests for: Atlassian and Zendesk. I couldn't find test login events to use. Should I remove those log types from the rule if we can't test them? |
Let's use an existing python module like pycountry instead of implementing our own. |
I've added pycountry to the pipenv file and adjusted the detection to use it. We're blocked until I can get pycountry added to the backend python runtime, so I'm gonna convert this to a draft for now to prevent it getting merged accidentally. |
Background
Some customers have requested the option to detect when a sign-in is detected from a list of "rogue nations". The list should be configurable according to each customer's needs. To ensure the detection is most effective, we use the Panther UDM to apply the logic to multiple log sources.
Changes
Standard.SignInFromRogueState
panther_country_helpers
which allows users to get contextual information on different countriesStandard.OneLogin.Events
datamodelTesting
make lint
,make test