Skip to content
Merged
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
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.13.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.13.0" />
<PackageVersion Include="Milvus.Client" Version="2.3.0-preview.1" />
<PackageVersion Include="ModelContextProtocol" Version="0.3.0-preview.4" />
<PackageVersion Include="ModelContextProtocol" Version="0.4.0-preview.3" />
<PackageVersion Include="ModelContextProtocol.AspNetCore" Version="0.4.0-preview.3" />
<PackageVersion Include="MongoDB.Driver" Version="3.5.0" />
<PackageVersion Include="MongoDB.Driver.Core.Extensions.DiagnosticSources" Version="2.1.0" />
<PackageVersion Include="MySqlConnector.DependencyInjection" Version="2.4.0" />
Expand Down
93 changes: 93 additions & 0 deletions THIRD-PARTY-NOTICES.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,96 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

License notice for Humanizer
----------------------------------------------------------------------------------------------

The MIT License (MIT)

Copyright (c) .NET Foundation and Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

License notice for D3
----------------------------------------------------------------------------------------------

Copyright 2010-2023 Mike Bostock

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.

License notice for OpenAI .NET API library
----------------------------------------------------------------------------------------------

The MIT License (MIT)

Copyright (c) 2024 OpenAI (https://openai.com)


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

License notice for MCP C# SDK
----------------------------------------------------------------------------------------------

MIT License

Copyright (c) Anthropic and Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:16037",
//"ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "https://localhost:16036",
//"ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL": "https://localhost:16038",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:17037"
}
Expand All @@ -22,6 +23,7 @@
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16031",
//"ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "http://localhost:16033",
//"ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL": "http://localhost:16032",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:17031",
"ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true"
Expand Down
1 change: 1 addition & 0 deletions src/Aspire.Cli/Commands/RunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ protected override async Task<int> ExecuteAsync(ParseResult parseResult, Cancell
env["ASPNETCORE_ENVIRONMENT"] = "Development";
env["DOTNET_ENVIRONMENT"] = "Development";
env["ASPNETCORE_URLS"] = "https://localhost:17193;http://localhost:15069";
env["ASPIRE_DASHBOARD_MCP_ENDPOINT_URL"] = "https://localhost:21294";
env["ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL"] = "https://localhost:21293";
env["ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL"] = "https://localhost:22086";
}
Expand Down
13 changes: 13 additions & 0 deletions src/Aspire.Dashboard/Aspire.Dashboard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
<RollForward>Major</RollForward>

<DefineConstants>$(DefineConstants);ASPIRE_DASHBOARD</DefineConstants>

<!--
Enable raw string literals support in Razor. Can remove when target switches to .NET 10+.
See https://devblogs.microsoft.com/dotnet/enhancing-razor-productivity-with-new-features/
-->
<Features>use-roslyn-tokenizer</Features>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -51,6 +57,8 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" />
<PackageReference Include="ModelContextProtocol" />
<PackageReference Include="ModelContextProtocol.AspNetCore" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -297,6 +305,11 @@

<ItemGroup>
<Content Remove="wwwroot\js\README.md" />
<EmbeddedResource Include="Mcp\Resources\aspire-16.png" />
<EmbeddedResource Include="Mcp\Resources\aspire-256.png" />
<EmbeddedResource Include="Mcp\Resources\aspire-32.png" />
<EmbeddedResource Include="Mcp\Resources\aspire-48.png" />
<EmbeddedResource Include="Mcp\Resources\aspire-64.png" />
<None Include="wwwroot\js\README.md" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ public enum ConnectionType
{
None,
Frontend,
Otlp
OtlpGrpc,
OtlpHttp,
Mcp
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ protected override Task<AuthenticateResult> HandleAuthenticateAsync()
return Task.FromResult(AuthenticateResult.Fail("No type specified on this connection."));
}

if (!connectionTypeFeature.ConnectionTypes.Contains(Options.RequiredConnectionType))
if (!Options.RequiredConnectionTypes.Any(connectionTypeFeature.ConnectionTypes.Contains))
{
return Task.FromResult(AuthenticateResult.Fail($"Connection type {Options.RequiredConnectionType} is not enabled on this connection."));
return Task.FromResult(AuthenticateResult.Fail($"Connection types '{string.Join(", ", Options.RequiredConnectionTypes)}' are not enabled on this connection."));
}

return Task.FromResult(AuthenticateResult.NoResult());
Expand All @@ -35,9 +35,10 @@ public static class ConnectionTypeAuthenticationDefaults
{
public const string AuthenticationSchemeFrontend = "ConnectionFrontend";
public const string AuthenticationSchemeOtlp = "ConnectionOtlp";
public const string AuthenticationSchemeMcp = "ConnectionMcp";
}

public sealed class ConnectionTypeAuthenticationHandlerOptions : AuthenticationSchemeOptions
{
public ConnectionType RequiredConnectionType { get; set; }
public HashSet<ConnectionType> RequiredConnectionTypes { get; set; } = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
namespace Aspire.Dashboard.Authentication.Connection;

/// <summary>
/// This connection middleware registers an OTLP feature on the connection.
/// OTLP services check for this feature when authorizing incoming requests to
/// ensure OTLP is only available on specified connections.
/// This connection middleware registers a connection type feature on the connection.
/// OTLP and MCP services check for this feature when authorizing incoming requests to
/// ensure services are only available on specified connections.
/// </summary>
internal sealed class ConnectionTypeMiddleware
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Aspire.Dashboard.Authentication.Connection;

internal static class ListenOptionsConnectionTypeExtensions
{
public static void UseConnectionTypes(this ListenOptions listenOptions, ConnectionType[] connectionTypes)
public static void UseConnectionTypes(this ListenOptions listenOptions, IEnumerable<ConnectionType> connectionTypes)
{
listenOptions.Use(next => new ConnectionTypeMiddleware(connectionTypes, next).OnConnectionAsync);
listenOptions.Use(next => new ConnectionTypeMiddleware(connectionTypes.ToArray(), next).OnConnectionAsync);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Security.Claims;
using System.Text.Encodings.Web;
using Aspire.Dashboard.Configuration;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Options;

Expand Down
5 changes: 5 additions & 0 deletions src/Aspire.Dashboard/Components/CustomIcons/AspireIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ internal sealed class Logo : Icon { public Logo() : base("Logo", IconVariant.Reg
</defs>
</svg>
") { } }
internal sealed class McpIcon : Icon { public McpIcon() : base("McpIcon", IconVariant.Regular, IconSize.Size24,
"""
<path transform="scale(0.9) translate(2 2)" d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"/>
<path transform="scale(0.9) translate(2 2)" d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"/>
""") { } }
}

internal static class Size48
Expand Down
Loading