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 the Microsoft.Security NetworkData API #6860

Closed
wants to merge 55 commits into from

Conversation

DanaPeled
Copy link

NetworkData is a new feature in Azure Security Center.
Security Center's Network Map displays a visualization of the various network elements such as VNets, Subnets, VM's etc. connectivity and traffic information. The network traffic REST API presents the underlying information upon which the map is constructed, including the allowed connections and actual traffic data for each VM.

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Aug 4, 2019

In Testing, Please Ignore

[Logs] (Generated from 1712a86, Iteration 46)

Failed .NET: test-repo-billy/azure-sdk-for-net [Logs] [Diff]
In-Progress Go: test-repo-billy/azure-sdk-for-go [Logs] [Diff]
  • In-Progress preview/security/mgmt/v1.0 [Logs]
  • In-Progress preview/security/mgmt/v2.0 [Logs]
  • In-Progress preview/security/mgmt/v3.0 [Logs]
Succeeded Python: test-repo-billy/azure-sdk-for-python [Logs] [Diff]
Failed JavaScript: test-repo-billy/azure-sdk-for-js [Logs] [Diff]

@AutorestCI
Copy link

AutorestCI commented Aug 4, 2019

Automation for azure-sdk-for-python

Encountered an unknown error: (azure-sdk-for-python)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
    return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
    rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
    sdk_tag=sdk_tag
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
    with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
    clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
    repo.git.checkout(branch_or_commit)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git checkout 093067a4b5aa7c7a5478d3a14df7132404e97ed3
  stderr: 'fatal: reference is not a tree: 093067a4b5aa7c7a5478d3a14df7132404e97ed3'

@AutorestCI
Copy link

AutorestCI commented Aug 4, 2019

Automation for azure-sdk-for-go

Encountered an unknown error: (azure-sdk-for-go)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
    return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
    rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
    sdk_tag=sdk_tag
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
    with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
    clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
    repo.git.checkout(branch_or_commit)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git checkout 093067a4b5aa7c7a5478d3a14df7132404e97ed3
  stderr: 'fatal: reference is not a tree: 093067a4b5aa7c7a5478d3a14df7132404e97ed3'

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@DanaPeled
Copy link
Author

@chlahav , Review will be much appreciated :)

@chlahav chlahav self-requested a review August 5, 2019 11:14
@chlahav chlahav added DoNotMerge <valid label in PR review process> use to hold merge after approval WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Aug 5, 2019
@yanivn3
Copy link
Contributor

yanivn3 commented Sep 4, 2019

A few questions for the ARM review. How is this data used? Are clients expected to poll it frequently? What is the refresh interval of the data?

Hi @KrisBash ,
he data is used as part of network map feature in Azure Security Center. The feature shows all possible vs allowed connections in Azure in order to recommend what connections can be closed (in security this is called segmentation). The backend process updates the data all the data but for this Rest API we keep it in hourly buckets (there is no importance to actual traffic just for the summary of it - if user wants to see the actual traffic, our UI redirect him to Azure Monitor blade).
Regards clients, The Ibize blade of network map will call the API upon blade initialization and upon refresh - we do not refresh the data regularly since this is not relevant for our scenario.

merged from azure-master
Copy link
Contributor

@pilor pilor left a comment

Choose a reason for hiding this comment

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

Some follow-up comments

@pilor pilor added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed ARMReviewInProgress WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Sep 9, 2019
"tcpPorts": {
"readOnly": true,
"type": "string",
"description": "The connections tcp ports"
Copy link
Member

Choose a reason for hiding this comment

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

what is the delimiter for the ports? can we update the description to include that info.

"udpPorts": {
"readOnly": true,
"type": "string",
"description": "The connections udp ports"
Copy link
Member

Choose a reason for hiding this comment

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

same comment as above on including delimiter info in the description.

"tags": [
"NetworkData"
],
"description": "Get the network data on all your scanned resources inside a scope",
Copy link
Member

Choose a reason for hiding this comment

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

Get the network data on all your scanned resources inside a scope - how can we specify the scope parameter?

@anuchandy
Copy link
Member

Closing this PR since another recent PR with similar content opened.

@anuchandy anuchandy closed this Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review DoNotMerge <valid label in PR review process> use to hold merge after approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants