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

adding new upn param #22660

Merged
merged 34 commits into from
Jan 1, 2023
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5f72c8f
adding new upn param
maimorag Dec 4, 2022
2ad9b0c
UPN param
maimorag Dec 5, 2022
0416a6f
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Dec 19, 2022
280f67c
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Dec 19, 2022
563aa24
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Dec 21, 2022
6c4f9e7
commit
maimorag Dec 21, 2022
b1b8d6b
adding upn_mailbox exist case in fetch-incidents
maimorag Dec 22, 2022
7b81cdd
adding upn param and checking all the rest of the commands
maimorag Dec 26, 2022
a5b5781
trailing white space deleted
maimorag Dec 26, 2022
61a935c
removing print
maimorag Dec 26, 2022
1326c0c
adding release note
maimorag Dec 26, 2022
21311e5
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Dec 26, 2022
baf1900
Empty-Commit
maimorag Dec 27, 2022
c20bbf8
Empty-Commit
maimorag Dec 27, 2022
4a11cb0
Empty-Commit
maimorag Dec 28, 2022
ad1f0fe
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Dec 28, 2022
6d014f4
docker image
maimorag Dec 28, 2022
63cde08
updating release note
maimorag Dec 28, 2022
47ac936
added note to read me and small update
maimorag Dec 29, 2022
0ecf88c
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Dec 29, 2022
4a6f8e7
3 cr notes was updated
maimorag Dec 29, 2022
57cfad2
cr notes
maimorag Dec 29, 2022
f518254
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Dec 29, 2022
dee6e1b
Empty-Commit
maimorag Dec 29, 2022
d62255e
updating targetbox when upn is set
maimorag Dec 29, 2022
aea3784
updating docker
maimorag Dec 29, 2022
fd69c7c
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Jan 1, 2023
6b1195f
updated docker and fixed target mailbox
maimorag Jan 1, 2023
cade1dc
new release note
maimorag Jan 1, 2023
e856e89
the command of ews-get-out-of-office workes with upn
maimorag Jan 1, 2023
2959dd0
Merge remote-tracking branch 'origin/master' into EWS-O365-Enhancement
maimorag Jan 1, 2023
16f5815
updating after cr
maimorag Jan 1, 2023
be6029d
adding RBAC desc to ews-get-searchable-mailboxes
maimorag Jan 1, 2023
0ab0059
cr notes
maimorag Jan 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Packs/EWS/.pack-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ ignore=BA101
ignore=BA101

[known_words]
sc
sc
UPN
13 changes: 6 additions & 7 deletions Packs/EWS/Integrations/EWSO365/EWSO365.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,15 +1105,14 @@ def move_item_between_mailboxes(
source_account = client.get_account(source_mailbox)
destination_account = client.get_account(destination_mailbox)
is_public = client.is_default_folder(destination_folder_path, is_public)
# print('hello4')
destination_folder = client.get_folder_by_path(
destination_folder_path, destination_account, is_public
)
item = client.get_item_from_mailbox(source_account, item_id)

exported_items = source_account.export([item])
destination_account.upload([(destination_folder, exported_items[0])])
source_account.bulk_delete([item])

move_result = {
MOVED_TO_MAILBOX: destination_mailbox,
MOVED_TO_FOLDER: destination_folder_path,
Expand Down Expand Up @@ -2384,18 +2383,18 @@ def sub_main():
is_test_module = False
params = demisto.params()
args = prepare_args(demisto.args())
command = demisto.command()
# client's default_target_mailbox is the authorization source for the instance
params['default_target_mailbox'] = args.get('target_mailbox',
args.get('source_mailbox', params['default_target_mailbox']))

params['default_target_mailbox'] = args.get('target_mailbox', args.get('source_mailbox', params['default_target_mailbox']))
if params.get('upn_mailbox') and not(args.get('target_mailbox')) and command not in ('ews-get-searchable-mailboxes',
'ews-get-out-of-office'):
params['default_target_mailbox'] = params.get('upn_mailbox')
try:
client = EWSClient(**params)
start_logging()

# replace sensitive access_token value in logs
add_sensitive_log_strs(client.credentials.access_token.get('access_token', ''))

command = demisto.command()
# commands that return a single note result
normal_commands = {
"ews-get-searchable-mailboxes": get_searchable_mailboxes,
Expand Down
31 changes: 18 additions & 13 deletions Packs/EWS/Integrations/EWSO365/EWSO365.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,30 @@ configuration:
name: default_target_mailbox
required: true
type: 0
- additionalinfo: Supports Exchange Folder ID and sub-folders e.g. Inbox/Phishing.
defaultvalue: Inbox
- additionalinfo: If this parameter is given, the commands will run with the UPN mailbox instead of the default target mailbox.
display: UPN Address
name: upn_mailbox
required: false
type: 0
- defaultvalue: Inbox
display: Name of the folder from which to fetch incidents
name: folder
required: true
type: 0
- defaultvalue: Impersonation
additionalinfo: Supports Exchange Folder ID and sub-folders e.g. Inbox/Phishing.
- defaultvalue: 'Impersonation'
display: Access Type
name: access_type
required: false
type: 15
options:
- Impersonation
- Delegate
required: false
type: 15
- defaultvalue: 'false'
display: Public Folder
- display: Public Folder
name: is_public_folder
required: false
type: 8
defaultvalue: 'false'
- display: Fetch incidents
name: isFetch
required: false
Expand All @@ -51,16 +56,16 @@ configuration:
name: incidentType
required: false
type: 13
- defaultvalue: 10 minutes
- defaultvalue: '10 minutes'
display: First fetch timestamp (<number> <time unit>, e.g., 12 hours, 7 days)
name: fetch_time
required: false
type: 0
- defaultvalue: '50'
display: Max incidents per fetch (up to 50)
- display: Max incidents per fetch (up to 50)
name: max_fetch
required: false
type: 0
defaultvalue: '50'
- display: Mark fetched emails as read
name: mark_as_read
required: false
Expand All @@ -74,11 +79,11 @@ configuration:
name: insecure
required: false
type: 8
- defaultvalue: 'false'
display: Use system proxy settings
- display: Use system proxy settings
name: proxy
required: false
type: 8
defaultvalue: 'false'
- display: Run as a separate process (protects against memory depletion)
name: separate_process
required: false
Expand Down Expand Up @@ -1170,7 +1175,7 @@ script:
description: A comma-separated list of CIDs to embed attachments within the email itself.
isArray: true
description: Replies to an email using EWS.
dockerimage: demisto/py3ews:1.0.0.42364
dockerimage: demisto/py3ews:1.0.0.43044
feed: false
isfetch: true
longRunning: false
Expand Down
2 changes: 2 additions & 0 deletions Packs/EWS/Integrations/EWSO365/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Exchange Web Services (EWS) provides the functionality to enable client applicat

The EWS O365 integration implants EWS leading services. The integration allows getting information on emails and activities in a target mailbox, and some active operations on the mailbox such as deleting emails and attachments or moving emails from folder to folder.

The integration will use the UPN parameter (if given) as the target mailbox if it's different from the Email Address, otherwise, the Email Address is used.

## EWS O365 Playbook

* Get Original Email - EWS
Expand Down
5 changes: 5 additions & 0 deletions Packs/EWS/ReleaseNotes/2_0_7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#### Integrations
##### EWS O365
- Added the *UPN* parameter to the integration instance configuration.
- Updated the Docker image to: *demisto/py3ews:1.0.0.43044*.
2 changes: 1 addition & 1 deletion Packs/EWS/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "EWS",
"description": "Exchange Web Services and Office 365 (mail)",
"support": "xsoar",
"currentVersion": "2.0.6",
"currentVersion": "2.0.7",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down