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

added support for xsiam #80

Merged
merged 4 commits into from
Mar 16, 2022
Merged

added support for xsiam #80

merged 4 commits into from
Mar 16, 2022

Conversation

moishce-zz
Copy link
Contributor

Status

Ready/In Progress/In Hold (Reason for hold)

Related Issues

fixes: https://github.com/demisto/etc/issues/46625

Description

A few sentences describing the overall goals of the pull request's commits.

Must have

  • Unit Test or Example Code
  • Changelog entry

@glicht
Copy link
Contributor

glicht commented Mar 8, 2022

Need to also update release notes and main README.

@moishce-zz moishce-zz requested a review from Itay4 March 14, 2022 06:32
CHANGELOG.md Outdated
@@ -4,6 +4,9 @@

[1]: https://pypi.org/project/demisto-py/#history

## 3.1.2
* Added auth_id to support `XSIAM` instances.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Added auth_id to support `XSIAM` instances.
* Add support to Cortex XSIAM.

README.md Outdated
@@ -25,6 +25,7 @@ as the following environment variables (env variables will be used if parameters
* DEMISTO_API_KEY
* DEMISTO_USERNAME
* DEMISTO_PASSWORD
* DEMISTO_AUTH_ID (for XSIAM, If is set it means we should use the XSIAM api)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the env var should be named XSIAM_AUTH_ID

README.md Outdated
@@ -25,6 +25,7 @@ as the following environment variables (env variables will be used if parameters
* DEMISTO_API_KEY
* DEMISTO_USERNAME
* DEMISTO_PASSWORD
* DEMISTO_AUTH_ID (for XSIAM, If is set it means we should use the XSIAM api)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* DEMISTO_AUTH_ID (for XSIAM, If is set it means we should use the XSIAM api)
* DEMISTO_AUTH_ID (for Cortex XSIAM only. If set, Cortex XSIAM API will be used)

README.md Outdated
@@ -41,7 +42,20 @@ api_instance = demisto_client.configure(base_url=host, api_key=api_key)

```

**Alternatively, you can login with username and password:**
**on the XSIAM we nead to add the auth_id**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**on the XSIAM we nead to add the auth_id**
**For Cortex XSIAM, we need to set the auth_id**

README.md Outdated
```python
import demisto_client

# Also possible to set env variables: DEMISTO_API_KEY and DEMISTO_BASE_URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add note here about the possible env var

@moishce-zz moishce-zz requested a review from Itay4 March 14, 2022 14:25
if isinstance(configuration.host, str):
configuration.host = configuration.host.rstrip('/')
if auth_id:
configuration.api_key['x-xdr-auth-id'] = auth_id
configuration.host = f'{configuration.host}/xsoar'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use os.path.join to avoid issues with trailing slash

@moishce-zz moishce-zz requested a review from Itay4 March 16, 2022 09:01
@moishce-zz moishce-zz merged commit b8b609d into master Mar 16, 2022
@moishce-zz moishce-zz deleted the xsiam_authorization branch March 16, 2022 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants