Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
- Multi-cloud and B2C support

### Repository Structure
This repository contains three Maven modules:
This repository contains four default Maven modules plus one profile-only E2E module:
- **`msal4j-sdk/`** - The main MSAL Java library (focus of development)
- **`msal4j-brokers/`** - Broker integration for native authentication (Windows WAM)
- **`msal4j-persistence-extension/`** - Cross-platform token cache persistence helpers
- **`msal4j-mtls-extensions/`** - Optional Windows KeyGuard/attestation bridge for Managed Identity v2 mTLS PoP; bundles Microsoft.Azure.Security.KeyGuardAttestation 1.1.5 while Java JCA/JSSE performs TLS
- **`msal4j-mtls-extensions-e2e/`** - Manual validation app, included only by the Maven `e2e` profile

For most work, focus on **`msal4j-sdk/`**.

Expand Down Expand Up @@ -151,6 +153,7 @@ MSAL4J supports multiple authentication flows, each with a public `*Parameters`
- **Parameters**: `ManagedIdentityParameters` - For Azure resources (VMs, App Service, Functions)
- **Internal**: `ManagedIdentityRequest` → `AcquireTokenByManagedIdentitySupplier`
- **Key Classes**: `ManagedIdentitySource` implementations (`IMDSManagedIdentitySource`, `AppServiceManagedIdentitySource`, etc.)
- **Optional mTLS PoP**: `withMtlsProofOfPossession()` requests a KeyGuard binding; `withAttestationSupport()` separately requires MAA attestation and fails closed. Core owns OAuth/HTTP/cache behavior; `msal4j-mtls-extensions` owns KeyGuard/CNG/optional attestation and returns a reusable process-local `IMtlsBindingContext`. Custom HTTP clients must implement `IMtlsCapableHttpClient`.

### Common Flows (All Application Types)

Expand Down Expand Up @@ -236,4 +239,3 @@ Update this file whenever you make changes that affect:
By keeping these instructions current, you help ensure that future Copilot agents (and developers) can quickly understand and work with the MSAL Java library effectively.

---

11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ MSAL4J supports multiple [application types and authentication scenarios](https:

Refer the [Wiki](https://github.com/AzureAD/microsoft-authentication-library-for-java/wiki) pages for more details on the usage of MSAL Java and the supported scenarios.

### Managed Identity v2 attested mTLS PoP

The optional `msal4j-mtls-extensions` module provides a Windows KeyGuard-backed,
attested Managed Identity v2 flow while preserving Java 8 compatibility. MSAL
returns an `IMtlsBindingContext` whose standard JSSE `SSLContext` can be used by
the application for independent downstream mTLS calls.

See [the extension guide](msal4j-mtls-extensions/README.md). Reviewers can use
the [detailed review guide](msal4j-sdk/docs/managed-identity-v2-mtls-pop-review-guide.md)
for architecture diagrams, security checklists, file order, and manual validation.

## Migrating from ADAL
If your application is using ADAL for Java (ADAL4J), we recommend you to update to use MSAL4J. No new feature work will be done in ADAL4J.

Expand Down
1 change: 1 addition & 0 deletions msal4j-mtls-extensions-e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
67 changes: 67 additions & 0 deletions msal4j-mtls-extensions-e2e/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.microsoft.azure</groupId>
<artifactId>msal4j-mtls-extensions-e2e</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>msal4j</artifactId>
<version>1.25.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>msal4j-mtls-extensions</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>shade</goal></goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>e2e</shadedClassifierName>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/*.EC</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.microsoft.aad.msal4j.mtls.e2e.ManagedIdentityMtlsPopKeyVaultDevApp</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading
Loading