Skip to content
Merged
Show file tree
Hide file tree
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 Oct 1, 2023
c8b707e
Add Missing PagedResult models (Data Connections, Discovery Groups, D…
thang-bit Oct 2, 2023
5116648
Update README to include troubleshooting steps and next steps
thang-bit Oct 3, 2023
8e66eb9
Add easm directory to the root pom.xml as it is a new directory
thang-bit Oct 3, 2023
0a6a8f7
Update readme to use the code snippet in the ReadmeSamples.java
thang-bit Oct 4, 2023
c9af3de
Update ci.yml groupId to be com.azure
thang-bit Oct 6, 2023
bf7d007
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit Oct 10, 2023
109b677
Update Readme to use non-broken links
thang-bit Oct 11, 2023
8982de9
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit Oct 11, 2023
14fc627
Remove unused imports, Add Copy rights comments on every sample and t…
thang-bit Oct 12, 2023
473bae0
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit Oct 12, 2023
8e47d76
Update azure-core and azure-core-test to run RECORD test
thang-bit Oct 12, 2023
51a151e
Update cspell.json
thang-bit Oct 12, 2023
35278ef
Update tests and update assets.json to included the recorded tests
thang-bit Oct 13, 2023
e23cd6d
Add spell check in pom.xml and update version in pom.xml
thang-bit Oct 13, 2023
857a905
Resolve spell check error in README
thang-bit Oct 13, 2023
aacc45b
Add easm data-plane to version_client.txt
thang-bit Oct 13, 2023
49e7d2e
Specify cspell.json to include all files under easm folder
thang-bit Oct 13, 2023
e3debde
Add more keywords to cspell.json and update SUBSCRIPTIONID to SUBSCRI…
thang-bit Oct 13, 2023
8e52c3e
Fix spell errors in DiscoTemplateSample
thang-bit Oct 13, 2023
5e19995
Update borken links in Readme
thang-bit Oct 13, 2023
fdc83f0
Update borken links in Readme
thang-bit Oct 13, 2023
d3ee58a
Update default endpoint for EasmClientBuilder
thang-bit Oct 13, 2023
2257887
Add tests for async client
thang-bit Oct 17, 2023
02f0355
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit Oct 17, 2023
88ca641
Use StepVerifier for async tests
thang-bit Oct 17, 2023
1c712f1
Update assets.json to match the breadcrumb file
thang-bit Oct 17, 2023
0f37c3f
Update assets.json after pushing
thang-bit Oct 17, 2023
899f296
Update test folder structure and add tsp-location.yaml file to specif…
thang-bit Oct 19, 2023
293c171
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit Oct 19, 2023
947b4cd
pump azure-core version
thang-bit Oct 19, 2023
154b261
pump dependencies versions
thang-bit Oct 19, 2023
e9c47d4
Add riskiq as a known words
thang-bit Oct 19, 2023
4b61371
Remove redundant imports in the EasmClientTestBase
thang-bit Oct 19, 2023
819f68f
Remove unused imports in DiscoveryRunsSample
thang-bit Oct 19, 2023
dd573db
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit Oct 23, 2023
6acd926
Remove @Generated annotation on customized operations and sync with main
thang-bit Oct 23, 2023
8888e95
Regenerate java sdk, update tests and assets.json
thang-bit Oct 24, 2023
e87e54a
Update azure-core-test tp 1.21.0
thang-bit Oct 24, 2023
fdefbab
Update azure-core-test tp 1.21.1
thang-bit Oct 24, 2023
6032818
Add temporary check for spell check
thang-bit Oct 24, 2023
1f4978e
Remove unused comments in pa akge-info.java
thang-bit Oct 24, 2023
c2cb245
- Stop using clean up function in EasmClientImpl file. Instead, clean…
thang-bit Oct 24, 2023
4f96d05
- Remove @Generated Tag on listAssetResource
thang-bit Oct 24, 2023
74e4bcf
- Remove @Generated Tag on listAssetResource
thang-bit Oct 24, 2023
4fa41c1
Sync with main to update style of EasmAsyncClient
thang-bit Oct 24, 2023
69108c9
Merge branch 'main' of https://github.com/thang-bit/azure-sdk-for-jav…
thang-bit Oct 24, 2023
c4b6180
Remove unused import
thang-bit Oct 24, 2023
8eda4d3
Sync with typespec
thang-bit Oct 24, 2023
9e0acbe
Update tsp-location.yaml and cspell.json
thang-bit Oct 25, 2023
73a7ca0
Update tsp-location.yaml to point to main branch commit
thang-bit Oct 25, 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
10 changes: 10 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,16 @@
"Decibles"
]
},
{
"filename": "sdk/easm/*",
"words": [
"easm",
"asns",
"nxdomain",
"cnames",
"riskiq"
]
},
{
"filename": "**/pom.xml",
"patterns": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,4 +596,6 @@ the main ServiceBusClientBuilder. -->
<suppress checks="VisibilityModifier" files="com.azure.identity.AzureDeveloperCliCredentialNegativeTest.java"/>
<suppress checks="VisibilityModifier" files="com.azure.identity.AzureCliCredentialNegativeTest.java"/>

<!-- Suppress checks for defender Easm -->
<suppress checks="com.azure.tools.checkstyle.checks.EnforceFinalFieldsCheck" files="com.azure.analytics.defender.easm.models.CountPagedResponse"/>
</suppressions>
1 change: 1 addition & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ com.azure:azure-ai-personalizer;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-ai-textanalytics;5.4.0;5.5.0-beta.1
com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-translation-text;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-analytics-defender-easm;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-analytics-purview-catalog;1.0.0-beta.4;1.0.0-beta.5
com.azure:azure-analytics-purview-scanning;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-analytics-purview-sharing;1.0.0-beta.2;1.0.0-beta.3
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<module>sdk/digitaltwins</module>
<module>sdk/dnsresolver</module>
<module>sdk/dynatrace</module>
<module>sdk/easm</module>
<module>sdk/edgeorder</module>
<module>sdk/education</module>
<module>sdk/elastic</module>
Expand Down
13 changes: 13 additions & 0 deletions sdk/easm/azure-analytics-defender-easm/CHANGELOG.md
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
116 changes: 116 additions & 0 deletions sdk/easm/azure-analytics-defender-easm/README.md
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
[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
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Feasm%2Fazure-analytics-defender-easm%2FREADME.png)
6 changes: 6 additions & 0 deletions sdk/easm/azure-analytics-defender-easm/assets.json
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"
}
95 changes: 95 additions & 0 deletions sdk/easm/azure-analytics-defender-easm/pom.xml
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>
Loading