-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add Java data-plane sdk for easm service #37034
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
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
0cd3944
Add generated easm sdk
thang-bit c8b707e
Add Missing PagedResult models (Data Connections, Discovery Groups, D…
thang-bit 5116648
Update README to include troubleshooting steps and next steps
thang-bit 8e66eb9
Add easm directory to the root pom.xml as it is a new directory
thang-bit 0a6a8f7
Update readme to use the code snippet in the ReadmeSamples.java
thang-bit c9af3de
Update ci.yml groupId to be com.azure
thang-bit bf7d007
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit 109b677
Update Readme to use non-broken links
thang-bit 8982de9
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit 14fc627
Remove unused imports, Add Copy rights comments on every sample and t…
thang-bit 473bae0
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit 8e47d76
Update azure-core and azure-core-test to run RECORD test
thang-bit 51a151e
Update cspell.json
thang-bit 35278ef
Update tests and update assets.json to included the recorded tests
thang-bit e23cd6d
Add spell check in pom.xml and update version in pom.xml
thang-bit 857a905
Resolve spell check error in README
thang-bit aacc45b
Add easm data-plane to version_client.txt
thang-bit 49e7d2e
Specify cspell.json to include all files under easm folder
thang-bit e3debde
Add more keywords to cspell.json and update SUBSCRIPTIONID to SUBSCRI…
thang-bit 8e52c3e
Fix spell errors in DiscoTemplateSample
thang-bit 5e19995
Update borken links in Readme
thang-bit fdc83f0
Update borken links in Readme
thang-bit d3ee58a
Update default endpoint for EasmClientBuilder
thang-bit 2257887
Add tests for async client
thang-bit 02f0355
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit 88ca641
Use StepVerifier for async tests
thang-bit 1c712f1
Update assets.json to match the breadcrumb file
thang-bit 0f37c3f
Update assets.json after pushing
thang-bit 899f296
Update test folder structure and add tsp-location.yaml file to specif…
thang-bit 293c171
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit 947b4cd
pump azure-core version
thang-bit 154b261
pump dependencies versions
thang-bit e9c47d4
Add riskiq as a known words
thang-bit 4b61371
Remove redundant imports in the EasmClientTestBase
thang-bit 819f68f
Remove unused imports in DiscoveryRunsSample
thang-bit dd573db
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit 6acd926
Remove @Generated annotation on customized operations and sync with main
thang-bit 8888e95
Regenerate java sdk, update tests and assets.json
thang-bit e87e54a
Update azure-core-test tp 1.21.0
thang-bit fdefbab
Update azure-core-test tp 1.21.1
thang-bit 6032818
Add temporary check for spell check
thang-bit 1f4978e
Remove unused comments in pa akge-info.java
thang-bit c2cb245
- Stop using clean up function in EasmClientImpl file. Instead, clean…
thang-bit 4f96d05
- Remove @Generated Tag on listAssetResource
thang-bit 74e4bcf
- Remove @Generated Tag on listAssetResource
thang-bit 4fa41c1
Sync with main to update style of EasmAsyncClient
thang-bit 69108c9
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit c4b6180
Remove unused import
thang-bit 8eda4d3
Sync with typespec
thang-bit 9e0acbe
Update tsp-location.yaml and cspell.json
thang-bit 73a7ca0
Update tsp-location.yaml to point to main branch commit
thang-bit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Release History | ||
|
|
||
| ## 1.0.0-beta.1 (Unreleased) | ||
|
|
||
| - Azure EASM client library for Java. This package contains Microsoft Azure EASM client library. | ||
|
|
||
| ### Features Added | ||
|
|
||
| ### Breaking Changes | ||
|
|
||
| ### Bugs Fixed | ||
|
|
||
| ### Other Changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| # Azure EASM client library for Java | ||
|
|
||
| *Microsoft Defender External Attack Surface Management (Defender EASM)* continuously discovers and maps your digital attack surface to provide an external view of your online infrastructure. This visibility enables security and IT teams to identify unknowns, prioritize risk, eliminate threats, and extend vulnerability and exposure control beyond the firewall. Defender EASM leverages Microsoft’s crawling technology to discover assets that are related to your known online infrastructure, and actively scans these assets to discover new connections over time. Attack Surface Insights are generated by leveraging vulnerability and infrastructure data to showcase the key areas of concern for your organization. | ||
|
|
||
| This package contains Microsoft Azure EASM Defender client library. | ||
|
|
||
| ## Documentation | ||
|
|
||
| Various documentation is available to help you get started | ||
|
|
||
| - [API reference documentation][docs] | ||
| - [Product documentation][product_documentation] | ||
|
|
||
| ## Getting started | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - [Java Development Kit (JDK)][jdk] with version 8 or above | ||
| - [Azure Subscription][azure_subscription] | ||
|
|
||
| ### Adding the package to your product | ||
|
|
||
| [//]: # ({x-version-update-start;com.azure:azure-analytics-defender-easm;current}) | ||
| ```xml | ||
| <dependency> | ||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-analytics-defender-easm</artifactId> | ||
| <version>1.0.0-beta.1</version> | ||
| </dependency> | ||
| ``` | ||
| [//]: # ({x-version-update-end}) | ||
|
|
||
| ### Authentication | ||
|
|
||
| [Azure Identity][azure_identity] package provides the default implementation for authenticating the client. | ||
|
|
||
| ## Key concepts | ||
| ### [Assets][assets_documentation] | ||
| Defender EASM includes the discovery of the following kinds of assets: | ||
| - Domains | ||
| - Hosts | ||
| - Pages | ||
| - IP Blocks | ||
| - IP Addresses | ||
| - Autonomous System Numbers (ASNs) | ||
| - SSL Certificates | ||
| - WHOIS Contacts | ||
|
|
||
| These asset types comprise your attack surface inventory in Defender EASM. This solution discovers externally facing assets that are exposed to the open internet outside of traditional firewall protection; they need to be monitored and maintained to minimize risk and improve an organization’s security posture. Microsoft Defender External Attack Surface Management (Defender EASM) actively discovers and monitors these assets, then surfacing key insights that help customers efficiently address any vulnerabilities in their organization. | ||
|
|
||
| ### [Discovery][discovery_documentation] | ||
| Microsoft Defender External Attack Surface Management (Defender EASM) relies on our proprietary discovery technology to continuously define your organization’s unique Internet-exposed attack surface. Discovery scans known assets owned by your organization to uncover previously unknown and unmonitored properties. Discovered assets are indexed in a customer’s inventory, providing a dynamic system of record of web applications, third party dependencies, and web infrastructure under the organization’s management through a single pane of glass. | ||
|
|
||
| #### [Discovery Groups][discovery_groups_documentation] | ||
| Custom discoveries are organized into Discovery Groups. They are independent seed clusters that comprise a single discovery run and operate on their own recurrence schedules. Users can elect to organize their Discovery Groups to delineate assets in whatever way best benefits their company and workflows. Common options include organizing by responsible team/business unit, brands or subsidiaries. | ||
|
|
||
| ## Examples | ||
|
|
||
| ```java readme-sample-createDefenderEasmClient | ||
| String subscriptionId = Configuration.getGlobalConfiguration().get("SUBSCRIPTION_ID"); | ||
| String workspaceName = Configuration.getGlobalConfiguration().get("WORKSPACENAME"); | ||
| String resourceGroupName = Configuration.getGlobalConfiguration().get("RESOURCEGROUPNAME"); | ||
| String endpoint = Configuration.getGlobalConfiguration().get("ENDPOINT"); | ||
|
|
||
| EasmClient easmClient = new EasmClientBuilder() | ||
| .endpoint(endpoint) | ||
| .subscriptionId(subscriptionId) | ||
| .workspaceName(workspaceName) | ||
| .resourceGroupName(resourceGroupName) | ||
| .credential(new DefaultAzureCredentialBuilder().build()) | ||
| .buildClient(); | ||
| ``` | ||
| | **File Name** | **Description** | | ||
| |----------------------------------------------------------------|--------------------------------------------------------| | ||
| | [DiscoveryRunsSample.java][discovery_runs_sample] | Create and manage a discovery group | | ||
| | [DiscoTemplateSample.java][disco_template_sample] | Create discovery groups using a template | | ||
| | [SavedFilterSample.java][saved_filter_sample] | Use saved filters to synchronize queries across scripts | | ||
| | [ManagingExternalIdsSample.java][external_ids_sample] | Tag assets automatically with external ids | | ||
|
|
||
| ## Troubleshooting | ||
| ### Enabling Logging | ||
|
|
||
| Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite | ||
| their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help | ||
| locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. | ||
| ## Next steps | ||
| These code samples show common scenario operations with the Azure Anomaly Detector library. More samples can be found under the [samples][samples] directory. | ||
|
|
||
| For more extensive documentation on Microsoft Defender External Attack Surface Management, see the [Defender EASM][product_documentation]: https://azure.microsoft.com/services/ | ||
| on docs.microsoft.com. | ||
| ## Contributing | ||
|
|
||
| For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). | ||
|
|
||
| 1. Fork it | ||
| 1. Create your feature branch (`git checkout -b my-new-feature`) | ||
| 1. Commit your changes (`git commit -am 'Add some feature'`) | ||
| 1. Push to the branch (`git push origin my-new-feature`) | ||
| 1. Create new Pull Request | ||
|
|
||
| <!-- LINKS --> | ||
| [product_documentation]: https://learn.microsoft.com/azure/external-attack-surface-management/ | ||
| [docs]: https://azure.github.io/azure-sdk-for-java/ | ||
| [jdk]: https://docs.microsoft.com/java/azure/jdk/ | ||
| [azure_subscription]: https://azure.microsoft.com/free/ | ||
| [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity | ||
| [discovery_runs_sample]: https://github.com/thang-bit/azure-sdk-for-java/blob/easm-java-sdk/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoveryRunsSample.java | ||
| [disco_template_sample]: https://github.com/thang-bit/azure-sdk-for-java/blob/easm-java-sdk/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoTemplateSample.java | ||
| [saved_filter_sample]: https://github.com/thang-bit/azure-sdk-for-java/blob/easm-java-sdk/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/SavedFilterSample.java | ||
| [external_ids_sample]: https://github.com/thang-bit/azure-sdk-for-java/blob/easm-java-sdk/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ManagingExternalIdsSample.java | ||
| [logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK | ||
| [samples]: https://github.com/thang-bit/azure-sdk-for-java/tree/easm-java-sdk/samples | ||
thang-bit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| [assets_documentation]: https://learn.microsoft.com/azure/external-attack-surface-management/understanding-inventory-assets | ||
| [discovery_documentation]: https://learn.microsoft.com/azure/external-attack-surface-management/what-is-discovery | ||
| [discovery_groups_documentation]: https://learn.microsoft.com/azure/external-attack-surface-management/using-and-managing-discovery#discovery-groups | ||
|  | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "AssetsRepo" : "Azure/azure-sdk-assets", | ||
| "AssetsRepoPrefixPath" : "java", | ||
| "TagPrefix" : "java/easm/azure-analytics-defender-easm", | ||
| "Tag" : "java/easm/azure-analytics-defender-easm_89ef9d7fb3" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| <!-- | ||
| ~ Copyright (c) Microsoft Corporation. All rights reserved. | ||
| ~ Licensed under the MIT License. | ||
| ~ Code generated by Microsoft (R) AutoRest Code Generator. | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <parent> | ||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-client-sdk-parent</artifactId> | ||
| <version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} --> | ||
| <relativePath>../../parents/azure-client-sdk-parent</relativePath> | ||
| </parent> | ||
|
|
||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-analytics-defender-easm</artifactId> | ||
| <version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-analytics-defender-easm;current} --> | ||
| <packaging>jar</packaging> | ||
|
|
||
| <name>Microsoft Azure SDK for Easm</name> | ||
| <description>This package contains Microsoft Azure Easm client library.</description> | ||
| <url>https://github.com/Azure/azure-sdk-for-java</url> | ||
|
|
||
| <licenses> | ||
| <license> | ||
| <name>The MIT License (MIT)</name> | ||
| <url>http://opensource.org/licenses/MIT</url> | ||
| <distribution>repo</distribution> | ||
| </license> | ||
| </licenses> | ||
|
|
||
| <scm> | ||
| <url>https://github.com/Azure/azure-sdk-for-java</url> | ||
| <connection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</connection> | ||
| <developerConnection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</developerConnection> | ||
| <tag>HEAD</tag> | ||
| </scm> | ||
| <developers> | ||
| <developer> | ||
| <id>microsoft</id> | ||
| <name>Microsoft</name> | ||
| </developer> | ||
| </developers> | ||
| <properties> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| </properties> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-core</artifactId> | ||
| <version>1.44.1</version> <!-- {x-version-update;com.azure:azure-core;dependency} --> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-core-http-netty</artifactId> | ||
| <version>1.13.9</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} --> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.junit.jupiter</groupId> | ||
| <artifactId>junit-jupiter-api</artifactId> | ||
| <version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} --> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.junit.jupiter</groupId> | ||
| <artifactId>junit-jupiter-engine</artifactId> | ||
| <version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} --> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.mockito</groupId> | ||
| <artifactId>mockito-core</artifactId> | ||
| <version>4.11.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} --> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-core-test</artifactId> | ||
| <version>1.21.1</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} --> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-identity</artifactId> | ||
| <version>1.10.4</version> <!-- {x-version-update;com.azure:azure-identity;dependency} --> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.slf4j</groupId> | ||
| <artifactId>slf4j-simple</artifactId> | ||
| <version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} --> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.