-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CIAC-11546/OktaASA #38448
base: master
Are you sure you want to change the base?
CIAC-11546/OktaASA #38448
Conversation
@eyalpalo @YuvHayun Doc review completed. |
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.
Very nice!
token_response: dict = self._http_request('POST', '/service_token', json_data=body, | ||
headers={"Content-Type": "application/json"}) | ||
# We don't need to save the team name | ||
token_response.pop("team_name", None) |
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 this is problematic in a way we need to pop it?
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's not a problem for me, but I prefer not to save what is not needed.
if e.res is not None and e.res.status_code == 401 and "Authentication token expired" in e.res.text: | ||
self.is_token_refresh_required(hard=True) | ||
demisto.debug(f"{INTEGRATION_NAME}: Hard refresh token") | ||
events_response = self.get_audit_events_request(params) |
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.
This is nice, but it is not needed if the is_token_refresh_required is working as expected.
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's an edge case where if someone regenerates a token through Postman or any other third application.
Did not change it.
else integration_context) | ||
else: | ||
token_response = self.get_token_request() | ||
demisto.setIntegrationContext(token_response) |
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.
all the info returned from the response (which is stored here in the last run object) is being used?
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.
What repeats is the expiration date and token, so we need to save both, what is not needed is not saved, like the name of the group I removed in the get_token_request
method.
…CIAC-11546/OktaASA
Contributing to Cortex XSOAR Content
Make sure to register your contribution by filling the contribution registration form
The Pull Request will be reviewed only after the contribution registration form is filled.
Status
Related Issues
fixes: https://jira-dc.paloaltonetworks.com/browse/CIAC-11546
Description
New collector for XSIAM OktaASA.
Must have