Skip to content

Commit

Permalink
Merge branch 'main' into jamesnk/browser-token
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Apr 3, 2024
2 parents 06d5f2f + f728973 commit e07fafb
Show file tree
Hide file tree
Showing 215 changed files with 2,314 additions and 1,443 deletions.
12 changes: 12 additions & 0 deletions .config/CredScanSuppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
{
"placeholder": "fake",
"_justification": "This is fake key name, used in integration tests to try to connect to Azure ServiceBus."
},
{
"placeholder": "TestKey123!",
"_justification": "This is fake API key, used in integration tests to try to connect to OTLP services."
},
{
"placeholder": "!321yeKtseT",
"_justification": "This is fake API key, used in integration tests to try to connect to OTLP services."
},
{
"placeholder": "p@ssw0rd1",
"_justification": "This is fake password, used in integration tests."
}
]
}
40 changes: 18 additions & 22 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@
<PackageVersion Include="Microsoft.Azure.SignalR" Version="1.25.1" />
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.7.2" />
<!-- Azure Management SDK for .NET dependencies -->
<PackageVersion Include="Azure.ResourceManager" Version="1.11.0-alpha.20240222.6" />
<PackageVersion Include="Azure.ResourceManager.Authorization" Version="1.2.0-alpha.20240309.1" />
<PackageVersion Include="Azure.ResourceManager.KeyVault" Version="1.3.0-alpha.20240310.2" />
<PackageVersion Include="Azure.ResourceManager.Resources" Version="1.8.0-alpha.20240309.1" />
<PackageVersion Include="Azure.Provisioning" Version="1.0.0-alpha.20240315.2" />
<PackageVersion Include="Azure.Provisioning" Version="0.1.0-beta.2" />
<!-- ASP.NET Core dependencies -->
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Certificate" Version="$(MicrosoftAspNetCoreAuthenticationCertificatePackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion)" />
Expand All @@ -48,18 +44,18 @@
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="$(MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Features" Version="$(MicrosoftExtensionsFeaturesPackageVersion)" />
<!-- AspNetCore.HealthChecks dependencies (3rd party packages) -->
<PackageVersion Include="AspNetCore.HealthChecks.Azure.Data.Tables" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Azure.KeyVault.Secrets" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Azure.Storage.Blobs" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Azure.Storage.Queues" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.AzureServiceBus" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Kafka" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.MongoDb" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.MySql" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.NpgSql" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Rabbitmq" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Redis" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.SqlServer" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Azure.Data.Tables" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.Azure.KeyVault.Secrets" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.Azure.Storage.Blobs" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.Azure.Storage.Queues" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.AzureServiceBus" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.Kafka" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.MongoDb" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.MySql" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.NpgSql" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.Rabbitmq" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.Redis" Version="8.0.1" />
<PackageVersion Include="AspNetCore.HealthChecks.SqlServer" Version="8.0.2" />
<!-- efcore dependencies -->
<PackageVersion Include="Microsoft.EntityFrameworkCore.Cosmos" Version="$(MicrosoftEntityFrameworkCoreCosmosPackageVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion)" />
Expand Down Expand Up @@ -87,8 +83,8 @@
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
<PackageVersion Include="KubernetesClient" Version="13.0.11" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.5.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.5.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.6.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.6.0" />
<PackageVersion Include="MongoDB.Driver" Version="2.24.0" />
<PackageVersion Include="MongoDB.Driver.Core.Extensions.DiagnosticSources" Version="1.4.0" />
<PackageVersion Include="MySqlConnector.DependencyInjection" Version="2.3.5" />
Expand All @@ -110,8 +106,8 @@
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.3" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.7.0-beta.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.7.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
<!-- build dependencies -->
Expand All @@ -137,7 +133,7 @@
<PackageVersion Include="Testcontainers.Redis" Version="$(TestcontainersPackageVersion)" />
<PackageVersion Include="Testcontainers.Nats" Version="$(TestcontainersPackageVersion)" />
<!-- playground apps dependencies -->
<PackageVersion Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageVersion Include="Dapr.AspNetCore" Version="1.13.0" />
<PackageVersion Include="Microsoft.Orleans.Clustering.AzureStorage" Version="8.1.0-nightly.20240126.1" />
<PackageVersion Include="Microsoft.Orleans.Persistence.AzureStorage" Version="8.1.0-nightly.20240126.1" />
<PackageVersion Include="Microsoft.Orleans.Server" Version="8.1.0-nightly.20240126.1" />
Expand Down
6 changes: 0 additions & 6 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="orleans-nightly" value="https://orleans.pkgs.visualstudio.com/orleans-public/_packaging/orleans-nightly/nuget/v3/index.json" />
<add key="dotnet9-transport" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
<add key="azure-sdk-for-net-dev" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="dotnet9-transport">
<package pattern="*WorkloadBuildTasks*" />
</packageSource>
<packageSource key="azure-sdk-for-net-dev">
<package pattern="Azure.Provisioning" />
<package pattern="Azure.ResourceManager" />
<package pattern="Azure.ResourceManager.*" />
</packageSource>
<packageSource key="dotnet-public">
<package pattern="*" />
</packageSource>
Expand Down
43 changes: 35 additions & 8 deletions docs/specs/IDE-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ For IDE execution to work, two conditions need to be fulfilled:
1. DCP needs to be told how to contact the IDE (what is the **IDE session endpoint**, specifically).
1. The `ExecutionType` property for the `Executable` object needs to be set to `IDE` (default is `Process`, which indicates OS process-based execution).

Only one IDE (one IDE session endpoint) is supported per DCP instance. The IDE session endpoint is provided to DCP via environment variables (both required if IDE execution is used):
Only one IDE (one IDE session endpoint) is supported per DCP instance. The IDE session endpoint is configured via environment variables:

| Environment variable | Value |
| ----- | ----- |
| `DEBUG_SESSION_PORT` | The port DCP should use to talk to the IDE session endpoint. DCP will use `http://localhost:<value of DEBUG_SESSION_PORT>` as the IDE session endpoint base URL. |
| `DEBUG_SESSION_TOKEN` | Security (bearer) token for talking to the IDE session endpoint. This token will be attached to every request via Authorization HTTP header. |
| `DEBUG_SESSION_PORT` | The port DCP should use to talk to the IDE session endpoint. DCP will use `http://localhost:<value of DEBUG_SESSION_PORT>` as the IDE session endpoint base URL. Required. |
| `DEBUG_SESSION_TOKEN` | Security (bearer) token for talking to the IDE session endpoint. This token will be attached to every request via Authorization HTTP header. Required. |
| `DEBUG_SESSION_SERVER_CERTIFICATE` | If present, provides base64-encoded server certificate used for authenticating IDE endpoint and securing the communication via TLS. <br/> The certificate can be self-signed, but it must include subject alternative name, set to "localhost". Setting canonical name (`cn`) is not sufficient. <br/> If the certificate is provided, all communication with the IDE will occur via `https` and `wss` (the latter for the session change notifications). There will be NO fallback to `http` or `ws` or un-authenticated mode. Using `https` and `wss` is optional but strongly recommended. |

> Note: the most important use case for the IDE execution is to facilitate application services debugging. The word "debug" appears in environment variable names that DCP uses to connect to IDE session endpoint, but IDE execution does not always mean that the service is running under a debugger.
Expand Down Expand Up @@ -85,9 +86,9 @@ The payload is best explained using an example:
**Response** <br/>
If the execution session is created successfully, the return status code should be 200 OK or 201 Created. The response should include the created run session identifier in the `Location` header:

`Location: http://localhost:<IDE endpoint port>/run_session/<new run ID>`
`Location: https://localhost:<IDE endpoint port>/run_session/<new run ID>`

If the session cannot be created, appropriate 4xx or 5xx status code should be returned. The response might also return a description of the problem as part of the status line, or in the response body.
If the session cannot be created, appropriate 4xx or 5xx status code should be returned. The response might also return a description of the problem as part of the status line, [or in the response body](#error-reporting).

### Launch configurations

Expand Down Expand Up @@ -124,7 +125,7 @@ If the session exists and can be stopped, the IDE should reply with 200 OK statu

If the session does not exist, the IDE should reply with 204 No Content.

If the session cannot be stopped, appropriate 4xx or 5xx status code should be returned. The response might also return a description of the problem as part of the status line, or in the response body.
If the session cannot be stopped, appropriate 4xx or 5xx status code should be returned. The response might also return a description of the problem as part of the status line, [or in the response body](#error-reporting).

### Subscribe to session change notifications request

Expand All @@ -140,6 +141,30 @@ Used by DCP to subscribe to run session change notification.
**Response** <br/>
If successful, the connection should be upgraded to a web sockets connection, which will be then used by the IDE to stream run session change notifications to DCP. See next paragraph for description of possible change notifications.

### IDE endpoint information request

Used by DCP to get information about capabilities of the IDE run session endpoint.

**HTTP verb and path** <br/>
`GET /info`

**Headers** <br/>
`Authorization: Bearer <security token>`

**Response** <br/>
A JSON document describing the capabilities of the IDE run session endpoint. For example:
```jsonc
{
"protocols_supported": [ "2024-03-03" ]
}
```

The properties of the IDE endpoint information document are:

| Property | Description | Type |
| --- | --------- | --- |
| `protocols_supported` | List of protocols supported by the IDE endpoint. See [protocol versioning](#protocol-versioning) for more information. | `string[]` |

## Run session change notifications

The run session change notifications are delivered from IDE to DCP via the web socket connection. The format of notification is JSON Lines (one JSON object per line of text).
Expand Down Expand Up @@ -208,7 +233,7 @@ The value of the `error` property is an `ErrorDetail` object with the following
| `message` | A human-readable message explaining the nature of the error, and providing suggestions for resolution. DCP will display this message as part of the Aspire application host execution log. | Required |
| `details` | An array of `ErrorDetail` objects providing additional information about the error. | Optional |

## Request versioning
## Protocol versioning

When making a request to the IDE, DCP will include an `api-version` parameter to indicate the version of the protocol used, for example:

Expand All @@ -218,4 +243,6 @@ The version always follows `YYYY-mm-dd` format and allows for older/equal/newer

If the protocol version is old (no longer supported by the IDE), the IDE should return a 400 Bad Request response with the message indicating that the developer should consider upgrading the Aspire libraries and tooling used by their application.

If the protocol version is newer than the latest the IDE supports, the IDE should make an attempt to parse the request according to its latest supported version. If that fails, it should return 400 Bad Request error.
If the protocol version is newer than the latest the IDE supports, the IDE should make an attempt to parse the request according to its latest supported version. If that fails, the IDE should return `400 Bad Request` error.

> The `api-version` parameter will be attached to all requests except the `/info` request (which is designed to facilitate protocol version negotiation).
28 changes: 14 additions & 14 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-amd64" Version="0.1.60">
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-amd64" Version="0.1.62">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>67e0cb7547eb6b3c27fc12d94557b865640805ec</Sha>
<Sha>7f2cb7dea2784573bc2f273ebe07768ea016fb18</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-arm64" Version="0.1.60">
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-arm64" Version="0.1.62">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>67e0cb7547eb6b3c27fc12d94557b865640805ec</Sha>
<Sha>7f2cb7dea2784573bc2f273ebe07768ea016fb18</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.linux-amd64" Version="0.1.60">
<Dependency Name="Microsoft.DeveloperControlPlane.linux-amd64" Version="0.1.62">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>67e0cb7547eb6b3c27fc12d94557b865640805ec</Sha>
<Sha>7f2cb7dea2784573bc2f273ebe07768ea016fb18</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.linux-arm64" Version="0.1.60">
<Dependency Name="Microsoft.DeveloperControlPlane.linux-arm64" Version="0.1.62">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>67e0cb7547eb6b3c27fc12d94557b865640805ec</Sha>
<Sha>7f2cb7dea2784573bc2f273ebe07768ea016fb18</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.windows-386" Version="0.1.60">
<Dependency Name="Microsoft.DeveloperControlPlane.windows-386" Version="0.1.62">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>67e0cb7547eb6b3c27fc12d94557b865640805ec</Sha>
<Sha>7f2cb7dea2784573bc2f273ebe07768ea016fb18</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.windows-amd64" Version="0.1.60">
<Dependency Name="Microsoft.DeveloperControlPlane.windows-amd64" Version="0.1.62">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>67e0cb7547eb6b3c27fc12d94557b865640805ec</Sha>
<Sha>7f2cb7dea2784573bc2f273ebe07768ea016fb18</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.windows-arm64" Version="0.1.60">
<Dependency Name="Microsoft.DeveloperControlPlane.windows-arm64" Version="0.1.62">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>67e0cb7547eb6b3c27fc12d94557b865640805ec</Sha>
<Sha>7f2cb7dea2784573bc2f273ebe07768ea016fb18</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Http.Resilience" Version="8.2.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-extensions</Uri>
Expand Down
20 changes: 10 additions & 10 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
<PropertyGroup>
<!-- This repo version -->
<MajorVersion>8</MajorVersion>
<MinorVersion>0</MinorVersion>
<MinorVersion>1</MinorVersion>
<PatchVersion>0</PatchVersion>
<VersionPrefix>8.0.0</VersionPrefix>
<PreReleaseVersionLabel>preview.6</PreReleaseVersionLabel>
<VersionPrefix>8.1.0</VersionPrefix>
<PreReleaseVersionLabel>preview.1</PreReleaseVersionLabel>
<UseVSTestRunner>true</UseVSTestRunner>
</PropertyGroup>
<PropertyGroup>
<!-- Package versions defined directly in <reporoot>/Directory.Packages.props -->
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-rtm.23512.16</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftDeveloperControlPlanedarwinamd64PackageVersion>0.1.60</MicrosoftDeveloperControlPlanedarwinamd64PackageVersion>
<MicrosoftDeveloperControlPlanedarwinarm64PackageVersion>0.1.60</MicrosoftDeveloperControlPlanedarwinarm64PackageVersion>
<MicrosoftDeveloperControlPlanelinuxamd64PackageVersion>0.1.60</MicrosoftDeveloperControlPlanelinuxamd64PackageVersion>
<MicrosoftDeveloperControlPlanelinuxarm64PackageVersion>0.1.60</MicrosoftDeveloperControlPlanelinuxarm64PackageVersion>
<MicrosoftDeveloperControlPlanewindows386PackageVersion>0.1.60</MicrosoftDeveloperControlPlanewindows386PackageVersion>
<MicrosoftDeveloperControlPlanewindowsamd64PackageVersion>0.1.60</MicrosoftDeveloperControlPlanewindowsamd64PackageVersion>
<MicrosoftDeveloperControlPlanewindowsarm64PackageVersion>0.1.60</MicrosoftDeveloperControlPlanewindowsarm64PackageVersion>
<MicrosoftDeveloperControlPlanedarwinamd64PackageVersion>0.1.62</MicrosoftDeveloperControlPlanedarwinamd64PackageVersion>
<MicrosoftDeveloperControlPlanedarwinarm64PackageVersion>0.1.62</MicrosoftDeveloperControlPlanedarwinarm64PackageVersion>
<MicrosoftDeveloperControlPlanelinuxamd64PackageVersion>0.1.62</MicrosoftDeveloperControlPlanelinuxamd64PackageVersion>
<MicrosoftDeveloperControlPlanelinuxarm64PackageVersion>0.1.62</MicrosoftDeveloperControlPlanelinuxarm64PackageVersion>
<MicrosoftDeveloperControlPlanewindows386PackageVersion>0.1.62</MicrosoftDeveloperControlPlanewindows386PackageVersion>
<MicrosoftDeveloperControlPlanewindowsamd64PackageVersion>0.1.62</MicrosoftDeveloperControlPlanewindowsamd64PackageVersion>
<MicrosoftDeveloperControlPlanewindowsarm64PackageVersion>0.1.62</MicrosoftDeveloperControlPlanewindowsarm64PackageVersion>
<MicrosoftDotNetRemoteExecutorPackageVersion>8.0.0-beta.24172.5</MicrosoftDotNetRemoteExecutorPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>8.0.0-beta.24172.5</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>8.0.0-beta.24172.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
Expand Down
Loading

0 comments on commit e07fafb

Please sign in to comment.