-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Azure Defender EASM Public Preview #36282
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
Changes from all commits
b017c75
25c60a7
4bad2dd
55c729e
0bc918a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Release History | ||
|
||
## 1.0.0-beta.1 (Unreleased) | ||
|
||
- Azure EASM Defender client library for Java. This package contains Microsoft Azure EASM Defender client library. | ||
|
||
### Features Added | ||
|
||
### Breaking Changes | ||
|
||
### Bugs Fixed | ||
|
||
### Other Changes |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Azure EASM Defender 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-resourcemanager-defendereasm;current}) | ||
```xml | ||
<dependency> | ||
<groupId>com.azure</groupId> | ||
<artifactId>azure-analytics-defendereasm</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 | ||
|
||
The examples below require a Microsoft Defender EASM Resource and a corresponding authorized client. | ||
|
||
Example of initializing a client: | ||
```java com.azure.resourcemanager.defendereasm.readme | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tags should not use |
||
String subscriptionId = Configuration.getGlobalConfiguration().get("SUBSCRIPTIONID"); | ||
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 disccovery 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 | ||
|
||
## Next steps | ||
|
||
Comment on lines
+86
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two sections should not be empty. |
||
## 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 | ||
[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 | ||
[discovery_runs_sample]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/easm/azure-analytics-defendereasm/src/samples/java/com/azure/analytics/defender/easm/DiscoveryRunsSample.java | ||
[disco_template_sample]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/easm/azure-analytics-defendereasm/src/samples/java/com/azure/analytics/defender/easm/DiscoTemplateSample.java | ||
[saved_filter_sample]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/easm/azure-analytics-defendereasm/src/samples/java/com/azure/analytics/defender/easm/SavedFilterSample.java | ||
[external_ids_sample]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/easm/azure-analytics-defendereasm/src/samples/java/com/azure/analytics/defender/easm/ManagingExternalIdsSample.java |
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_c3c3f38d86" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<!-- | ||
~ 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> | ||
|
||
<groupId>com.azure</groupId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Parent pom reference is missing. Please add the parent pom as shown here. |
||
<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 Defender</name> | ||
<description>This package contains Microsoft Azure EASM Defender 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:[email protected]:Azure/azure-sdk-for-java.git</connection> | ||
<developerConnection>scm:git:[email protected]: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.41.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These dependencies should be updated to latest released versions. |
||
</dependency> | ||
<dependency> | ||
<groupId>com.azure</groupId> | ||
<artifactId>azure-core-http-netty</artifactId> | ||
<version>1.13.5</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.5.1</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.18.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.9.2</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> | ||
<build> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.10.1</version> | ||
<configuration> | ||
<!-- <release>11</release>--> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
<excludes> | ||
<exclude>module-info.java</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>3.0.0</version> | ||
<executions> | ||
<execution> | ||
<id>add-test-source</id> | ||
<phase>generate-test-sources</phase> | ||
<goals> | ||
<goal>add-test-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>${basedir}/src/samples</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
|
||
package com.azure.analytics.defender.easm; | ||
|
||
import com.azure.core.util.ServiceVersion; | ||
|
||
/** Service version of EASM DefenderClient. */ | ||
public enum EASMDefenderServiceVersion implements ServiceVersion { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed in arch board, we should just name this as |
||
/** Enum value 2023-03-01-preview. */ | ||
V2023_03_01_PREVIEW("2023-03-01-preview"); | ||
|
||
private final String version; | ||
|
||
EASMDefenderServiceVersion(String version) { | ||
this.version = version; | ||
} | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public String getVersion() { | ||
return this.version; | ||
} | ||
|
||
/** | ||
* Gets the latest service version supported by this client library. | ||
* | ||
* @return The latest {@link EASMDefenderServiceVersion}. | ||
*/ | ||
public static EASMDefenderServiceVersion getLatest() { | ||
return V2023_03_01_PREVIEW; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The directory name should match the artifact id. This should be in
sdk/easm/azure-analytics-defender-easm/
directory.