Browse Source

feat: Optimize microservice configuration

pull/1470/head
colin 5 months ago
parent
commit
a16dd3b6ab
  1. 2
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchMappers.cs
  2. 1
      aspnet-core/framework/open-api/LINGYUN.Abp.OpenApi.IdentityServer/LINGYUN.Abp.OpenApi.IdentityServer.csproj
  3. 63
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs
  4. 10
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Seeder.cs
  5. 35
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.Development.json
  6. 5
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.json
  7. 44
      aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs
  8. 4
      aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj
  9. 2
      aspnet-core/services/LY.MicroService.AuthServer/Properties/launchSettings.json
  10. 75
      aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json
  11. 6
      aspnet-core/services/LY.MicroService.AuthServer/package.json
  12. 9
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/css/global-styles.css
  13. 13308
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css
  14. 2512
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css
  15. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf
  16. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2
  17. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf
  18. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2
  19. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf
  20. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2
  21. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf
  22. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2
  23. 6
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js
  24. 1
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js.map
  25. 11
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js
  26. 109
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css
  27. 4
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net/js/dataTables.min.js
  28. 22
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-form/jquery.form.min.js
  29. 27
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/abp.jquery.validate.js
  30. 777
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.all.js
  31. 6
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  32. 24
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.css
  33. 777
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.all.js
  34. 6
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.all.min.js
  35. 775
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.js
  36. 4
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.min.js
  37. 775
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.js
  38. 2
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.min.css
  39. 4
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.min.js
  40. 29
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs
  41. 1
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs
  42. 2
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Properties/launchSettings.json
  43. 30
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json
  44. 5
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.json
  45. 3
      aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs
  46. 29
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs
  47. 2
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Properties/launchSettings.json
  48. 30
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.Development.json
  49. 5
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.json
  50. 28
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs
  51. 2
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Properties/launchSettings.json
  52. 38
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.Development.json
  53. 3
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.json
  54. 2
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Properties/launchSettings.json
  55. 30
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs
  56. 40
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.Development.json
  57. 5
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.json
  58. 2
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Properties/launchSettings.json
  59. 36
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs
  60. 48
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.Development.json
  61. 5
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.json
  62. 2
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Properties/launchSettings.json
  63. 4
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/TenantHeaderParamter.cs
  64. 56
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs
  65. 15
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.DataSeeder.cs
  66. 1
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs
  67. 38
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.Development.json
  68. 3
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.json
  69. 2
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/Properties/launchSettings.json
  70. 4
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/TenantHeaderParamter.cs
  71. 59
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.Configure.cs
  72. 37
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.Development.json
  73. 3
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.json
  74. 2
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Properties/launchSettings.json
  75. 35
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs
  76. 15
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.DataSeeder.cs
  77. 48
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json
  78. 3
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.json
  79. 76
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/InternalGatewayModule.cs
  80. 1
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/LINGYUN.MicroService.Internal.Gateway.csproj
  81. 23
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/appsettings.Development.json
  82. 248
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/yarp.json
  83. 19
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.OpenApi.Gateway/OpenApiGatewayModule.cs
  84. 22
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.OpenApi.Gateway/appsettings.Development.json

2
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchMappers.cs

@ -42,9 +42,11 @@ public partial class SerilogInfoToLogInfoMapper : MapperBase<SerilogInfo, LogInf
_logExceptionMapper = logExceptionMapper; _logExceptionMapper = logExceptionMapper;
} }
[MapperIgnoreTarget(nameof(LogInfo.Fields))]
[MapPropertyFromSource(nameof(SerilogInfo.Level), Use = nameof(GetLogLevel))] [MapPropertyFromSource(nameof(SerilogInfo.Level), Use = nameof(GetLogLevel))]
public override partial LogInfo Map(SerilogInfo source); public override partial LogInfo Map(SerilogInfo source);
[MapperIgnoreTarget(nameof(LogInfo.Fields))]
[MapPropertyFromSource(nameof(SerilogInfo.Level), Use = nameof(GetLogLevel))] [MapPropertyFromSource(nameof(SerilogInfo.Level), Use = nameof(GetLogLevel))]
public override partial void Map(SerilogInfo source, LogInfo destination); public override partial void Map(SerilogInfo source, LogInfo destination);

1
aspnet-core/framework/open-api/LINGYUN.Abp.OpenApi.IdentityServer/LINGYUN.Abp.OpenApi.IdentityServer.csproj

@ -16,6 +16,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.IdentityServer.Domain" /> <PackageReference Include="Volo.Abp.IdentityServer.Domain" />
<PackageReference Include="Newtonsoft.Json" VersionOverride="13.0.4" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

63
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs

@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.StackExchangeRedis; using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -31,11 +32,11 @@ using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.Authorization.Permissions; using Volo.Abp.Authorization.Permissions;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Data;
using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement; using Volo.Abp.FeatureManagement;
@ -56,7 +57,7 @@ namespace LY.MicroService.AuthServer;
public partial class AuthServerHttpApiHostModule public partial class AuthServerHttpApiHostModule
{ {
public static string ApplicationName { get; set; } = "AuthService"; public static string ApplicationName { get; set; } = "IdentityService";
private readonly static OneTimeRunner OneTimeRunner = new OneTimeRunner(); private readonly static OneTimeRunner OneTimeRunner = new OneTimeRunner();
@ -131,39 +132,9 @@ public partial class AuthServerHttpApiHostModule
mysql => mysql =>
{ {
// see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960
mysql.TranslateParameterizedCollectionsToConstants(); mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
}); });
}); });
Configure<AbpDbConnectionOptions>(options =>
{
options.Databases.Configure("Platform", database =>
{
database.MapConnection("AbpSaas");
database.MapConnection("Workflow");
database.MapConnection("AppPlatform");
database.MapConnection("TaskManagement");
database.MapConnection("AbpAuditLogging");
database.MapConnection("AbpTextTemplating");
database.MapConnection("AbpSettingManagement");
database.MapConnection("AbpFeatureManagement");
database.MapConnection("AbpPermissionManagement");
database.MapConnection("AbpLocalizationManagement");
database.MapConnection("AbpDataProtectionManagement");
});
options.Databases.Configure("Identity", database =>
{
database.MapConnection("AbpGdpr");
database.MapConnection("AbpIdentity");
database.MapConnection("AbpOpenIddict");
database.MapConnection("AbpIdentityServer");
});
options.Databases.Configure("Realtime", database =>
{
database.MapConnection("Notifications");
database.MapConnection("MessageService");
});
});
} }
private void ConfigureJsonSerializer(IConfiguration configuration) private void ConfigureJsonSerializer(IConfiguration configuration)
@ -261,8 +232,11 @@ public partial class AuthServerHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -474,14 +448,19 @@ public partial class AuthServerHttpApiHostModule
} }
}); });
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{ {
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); configuration.GetSection("AntiForgery").Bind(options);
services });
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application") services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .SetApplicationName("LINGYUN.Abp.Application")
} .PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
private void ConfigureWrapper() private void ConfigureWrapper()

10
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Seeder.cs

@ -1,10 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LY.MicroService.AuthServer;
public partial class AuthServerHttpApiHostModule
{
}

35
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.Development.json

@ -4,28 +4,28 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.AuthServer.Admin", "appId": "LINGYUN.Abp.AuthServer.Admin",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "AuthServer.Admin", "name": "AuthServer.Admin",
"tag": "AuthServer.Admin", "tag": "AuthServer.Admin",
"configCacheEncrypt": true "configCacheEncrypt": true
}, },
"App": { "App": {
"ShowPii": true, "ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"Urls": { "Urls": {
"Applications": { "Applications": {
"MVC": { "MVC": {
"RootUrl": "http://127.0.0.1:44385/", "RootUrl": "http://localhost:44385/",
"Urls": { "Urls": {
"Abp.Account.EmailConfirm": "Account/EmailConfirm", "Abp.Account.EmailConfirm": "Account/EmailConfirm",
"Abp.Account.EmailVerifyLogin": "Account/VerifyCode" "Abp.Account.EmailVerifyLogin": "Account/VerifyCode"
} }
}, },
"STS": { "STS": {
"RootUrl": "http://127.0.0.1:44385/" "RootUrl": "http://localhost:44385/"
}, },
"VueVbenAdmin": { "VueVbenAdmin": {
"RootUrl": "http://127.0.0.1:3100/", "RootUrl": "http://localhost:3100/",
"Urls": { "Urls": {
"Abp.Account.EmailConfirm": "account/email-confirm", "Abp.Account.EmailConfirm": "account/email-confirm",
"Abp.Account.EmailVerifyLogin": "account/verify-code" "Abp.Account.EmailVerifyLogin": "account/verify-code"
@ -46,10 +46,7 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
}, },
"CAP": { "CAP": {
"EventBus": { "EventBus": {
@ -61,10 +58,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "ida", "TableNamePrefix": "ida",
"ConnectionString": "Server=127.0.0.1;Database=AuthServer-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -75,22 +72,23 @@
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13" "Configuration": "localhost,defaultDatabase=13"
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"RemoteServices": { "RemoteServices": {
"Platform": { "Platform": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
} }
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385", "Authority": "http://localhost:44385",
"Audience": "lingyun-abp-application", "Audience": "identity-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false, "RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client" "SwaggerClientId": "vue-oauth-client"
@ -101,7 +99,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -109,6 +107,7 @@
"Override": { "Override": {
"System": "Information", "System": "Information",
"Microsoft": "Information", "Microsoft": "Information",
"Microsoft.EntityFrameworkCore": "Warning",
"DotNetCore": "Warning" "DotNetCore": "Warning"
} }
}, },
@ -123,7 +122,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.json

@ -5,8 +5,11 @@
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"
}, },
"AntiForgery": {
"AutoValidate": false
},
"App": { "App": {
"CorsOrigins": "http://localhost:3100" "CorsOrigins": ["http://localhost:30000"]
}, },
"StringEncryption": { "StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra", "DefaultPassPhrase": "s46c5q55nxpeS8Ra",

44
aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs

@ -39,6 +39,8 @@ using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using Volo.Abp.Account.Localization; using Volo.Abp.Account.Localization;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Caching; using Volo.Abp.Caching;
@ -179,6 +181,15 @@ public partial class AuthServerModule
}); });
}); });
Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles
.Configure(LeptonXLiteThemeBundles.Styles.Global, bundle =>
{
bundle.AddFiles("/css/global-styles.css");
});
});
services.AddHealthChecks(); services.AddHealthChecks();
} }
@ -226,8 +237,11 @@ public partial class AuthServerModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -407,19 +421,19 @@ public partial class AuthServerModule
options.TokenValidationParameters.IssuerValidator = TokenWildcardIssuerValidator.IssuerValidator; options.TokenValidationParameters.IssuerValidator = TokenWildcardIssuerValidator.IssuerValidator;
} }
}); });
//.AddWeChatWork(options => //.AddWeChatWork(options =>
//{ //{
// options.SignInScheme = IdentityConstants.ExternalScheme; // options.SignInScheme = IdentityConstants.ExternalScheme;
//}); //});
if (!isDevelopment) services.AddDataProtection()
{ .SetApplicationName("LINGYUN.Abp.Application")
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); .PersistKeysToStackExchangeRedis(() =>
services {
.AddDataProtection() return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
.SetApplicationName("LINGYUN.Abp.Application") },
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
services.AddSameSiteCookiePolicy(); services.AddSameSiteCookiePolicy();
} }
private void ConfigureMultiTenancy(IConfiguration configuration) private void ConfigureMultiTenancy(IConfiguration configuration)

4
aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj

@ -81,8 +81,4 @@
<ProjectReference Include="..\..\modules\platform\LINGYUN.Abp.Sms.Platform\LINGYUN.Abp.Sms.Platform.csproj" /> <ProjectReference Include="..\..\modules\platform\LINGYUN.Abp.Sms.Platform\LINGYUN.Abp.Sms.Platform.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
</Project> </Project>

2
aspnet-core/services/LY.MicroService.AuthServer/Properties/launchSettings.json

@ -7,7 +7,7 @@
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"applicationUrl": "http://127.0.0.1:44385;https://127.0.0.1:44386" "applicationUrl": "http://localhost:44385;https://localhost:44386"
} }
} }
} }

75
aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json

@ -4,38 +4,39 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.AuthServer", "appId": "LINGYUN.Abp.AuthServer",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:15000", "nodes": "http://localhost:15000",
"name": "AuthServer", "name": "AuthServer",
"tag": "AuthServer", "tag": "AuthServer",
"configCacheEncrypt": true "configCacheEncrypt": true
}, },
"App": { "App": {
"CorsOrigins": [ "CorsOrigins": [
"http://127.0.0.1:5666", "http://localhost:5666",
"http://127.0.0.1:30010", "http://localhost:30000",
"http://127.0.0.1:30015", "http://localhost:30010",
"http://127.0.0.1:30020", "http://localhost:30015",
"http://127.0.0.1:30025", "http://localhost:30020",
"http://127.0.0.1:30030", "http://localhost:30025",
"http://127.0.0.1:30040", "http://localhost:30030",
"http://127.0.0.1:30045", "http://localhost:30040",
"http://127.0.0.1:30050", "http://localhost:30045",
"http://127.0.0.1:30060" "http://localhost:30050",
"http://localhost:30060"
], ],
"Urls": { "Urls": {
"Applications": { "Applications": {
"MVC": { "MVC": {
"RootUrl": "http://127.0.0.1:44385/", "RootUrl": "http://localhost:44385/",
"Urls": { "Urls": {
"Abp.Account.EmailConfirm": "Account/EmailConfirm", "Abp.Account.EmailConfirm": "Account/EmailConfirm",
"Abp.Account.EmailVerifyLogin": "Account/VerifyCode" "Abp.Account.EmailVerifyLogin": "Account/VerifyCode"
} }
}, },
"STS": { "STS": {
"RootUrl": "http://127.0.0.1:44385/" "RootUrl": "http://localhost:44385/"
}, },
"VueVbenAdmin": { "VueVbenAdmin": {
"RootUrl": "http://127.0.0.1:5666/", "RootUrl": "http://localhost:5666/",
"Urls": { "Urls": {
"Abp.Account.EmailConfirm": "account/email-confirm", "Abp.Account.EmailConfirm": "account/email-confirm",
"Abp.Account.EmailVerifyLogin": "account/verify-code" "Abp.Account.EmailVerifyLogin": "account/verify-code"
@ -56,10 +57,7 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
}, },
"CAP": { "CAP": {
"EventBus": { "EventBus": {
@ -71,10 +69,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "auth", "TableNamePrefix": "auth",
"ConnectionString": "Server=127.0.0.1;Database=AuthServer-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -85,22 +83,23 @@
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13" "Configuration": "localhost,defaultDatabase=13"
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"RemoteServices": { "RemoteServices": {
"Platform": { "Platform": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
} }
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "auth-server",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false "RequireHttpsMetadata": false
}, },
@ -109,7 +108,7 @@
"VueAdmin": { "VueAdmin": {
"ClientId": "vue-admin-client", "ClientId": "vue-admin-client",
"ClientSecret": "1q2w3e*", "ClientSecret": "1q2w3e*",
"RootUrl": "http://127.0.0.1:5666/" "RootUrl": "http://localhost:5666/"
}, },
"InternalService": { "InternalService": {
"ClientId": "InternalServiceClient", "ClientId": "InternalServiceClient",
@ -118,16 +117,16 @@
"VueOAuthClient": { "VueOAuthClient": {
"ClientId": "vue-oauth-client", "ClientId": "vue-oauth-client",
"RootUrls": [ "RootUrls": [
"http://127.0.0.1:5666", "http://localhost:5666",
"http://127.0.0.1:30010", "http://localhost:30010",
"http://127.0.0.1:30015", "http://localhost:30015",
"http://127.0.0.1:30020", "http://localhost:30020",
"http://127.0.0.1:30025", "http://localhost:30025",
"http://127.0.0.1:30030", "http://localhost:30030",
"http://127.0.0.1:30040", "http://localhost:30040",
"http://127.0.0.1:30045", "http://localhost:30045",
"http://127.0.0.1:30050", "http://localhost:30050",
"http://127.0.0.1:30060" "http://localhost:30060"
] ]
} }
} }
@ -157,7 +156,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -179,7 +178,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

6
aspnet-core/services/LY.MicroService.AuthServer/package.json

@ -1,9 +1,9 @@
{ {
"version": "9.3.5", "version": "10.2.0",
"name": "my-app-authserver", "name": "my-app-authserver",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "4.3.5", "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "5.2.0",
"@abp/qrcode": "9.3.5" "@abp/qrcode": "10.2.0"
} }
} }

9
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/css/global-styles.css

@ -0,0 +1,9 @@
.account-module-form {
padding: 24px;
border: 0;
background: #fff;
color: #000;
box-shadow: 0 0 30px rgba(8, 20, 73, .1);
border-radius: 4px;
margin-top: 0.75rem !important;
}

13308
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css

File diff suppressed because it is too large

2512
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css

File diff suppressed because it is too large

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2

Binary file not shown.

6
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js

File diff suppressed because one or more lines are too long

1
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js.map

File diff suppressed because one or more lines are too long

11
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js

@ -340,6 +340,17 @@ var abp = abp || {};
callback && callback(result); callback && callback(result);
}; };
abp.message.prompt = function (message, titleOrOptionsOrCallback, callback) {
abp.log.warn('abp.message.prompt is not properly implemented!');
if (titleOrOptionsOrCallback && !(typeof titleOrOptionsOrCallback == 'string')) {
callback = titleOrOptionsOrCallback;
}
var result = prompt(message);
callback && callback(result);
};
/* UI *******************************************************/ /* UI *******************************************************/
abp.ui = abp.ui || {}; abp.ui = abp.ui || {};

109
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css

@ -76,42 +76,42 @@ table.dataTable thead > tr > th:active,
table.dataTable thead > tr > td:active { table.dataTable thead > tr > td:active {
outline: none; outline: none;
} }
table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order:before, table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before { table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before {
position: absolute; position: absolute;
display: block; display: block;
bottom: 50%; bottom: 50%;
content: "\25B2"; content: "\25B2";
content: "\25B2"/""; content: "\25B2"/"";
} }
table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order:after, table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after { table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
position: absolute; position: absolute;
display: block; display: block;
top: 50%; top: 50%;
content: "\25BC"; content: "\25BC";
content: "\25BC"/""; content: "\25BC"/"";
} }
table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order, table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order, table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order, table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order, table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order, table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order { table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order {
position: relative; position: relative;
width: 12px; width: 12px;
height: 24px; height: 20px;
} }
table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order:after, table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after, table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:after, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order:before, table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order:after, table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order:before, table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order:after, table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:after, table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:before, table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after { table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
left: 0; left: 0;
opacity: 0.125; opacity: 0.125;
line-height: 9px; line-height: 9px;
@ -128,15 +128,15 @@ table.dataTable thead > tr > td.dt-orderable-desc:hover {
outline: 2px solid rgba(0, 0, 0, 0.05); outline: 2px solid rgba(0, 0, 0, 0.05);
outline-offset: -2px; outline-offset: -2px;
} }
table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after { table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
opacity: 0.6; opacity: 0.6;
} }
table.dataTable thead > tr > th.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) span.dt-column-order:empty, table.dataTable thead > tr > th.sorting_desc_disabled span.dt-column-order:after, table.dataTable thead > tr > th.sorting_asc_disabled span.dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) .dt-column-order:empty, table.dataTable thead > tr > th.sorting_desc_disabled .dt-column-order:after, table.dataTable thead > tr > th.sorting_asc_disabled .dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) span.dt-column-order:empty, table.dataTable thead > tr > td.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) .dt-column-order:empty,
table.dataTable thead > tr > td.sorting_desc_disabled span.dt-column-order:after, table.dataTable thead > tr > td.sorting_desc_disabled .dt-column-order:after,
table.dataTable thead > tr > td.sorting_asc_disabled span.dt-column-order:before { table.dataTable thead > tr > td.sorting_asc_disabled .dt-column-order:before {
display: none; display: none;
} }
table.dataTable thead > tr > th:active, table.dataTable thead > tr > th:active,
@ -157,24 +157,24 @@ table.dataTable tfoot > tr > td div.dt-column-footer {
align-items: var(--dt-header-align-items); align-items: var(--dt-header-align-items);
gap: 4px; gap: 4px;
} }
table.dataTable thead > tr > th div.dt-column-header span.dt-column-title, table.dataTable thead > tr > th div.dt-column-header .dt-column-title,
table.dataTable thead > tr > th div.dt-column-footer span.dt-column-title, table.dataTable thead > tr > th div.dt-column-footer .dt-column-title,
table.dataTable thead > tr > td div.dt-column-header span.dt-column-title, table.dataTable thead > tr > td div.dt-column-header .dt-column-title,
table.dataTable thead > tr > td div.dt-column-footer span.dt-column-title, table.dataTable thead > tr > td div.dt-column-footer .dt-column-title,
table.dataTable tfoot > tr > th div.dt-column-header span.dt-column-title, table.dataTable tfoot > tr > th div.dt-column-header .dt-column-title,
table.dataTable tfoot > tr > th div.dt-column-footer span.dt-column-title, table.dataTable tfoot > tr > th div.dt-column-footer .dt-column-title,
table.dataTable tfoot > tr > td div.dt-column-header span.dt-column-title, table.dataTable tfoot > tr > td div.dt-column-header .dt-column-title,
table.dataTable tfoot > tr > td div.dt-column-footer span.dt-column-title { table.dataTable tfoot > tr > td div.dt-column-footer .dt-column-title {
flex-grow: 1; flex-grow: 1;
} }
table.dataTable thead > tr > th div.dt-column-header span.dt-column-title:empty, table.dataTable thead > tr > th div.dt-column-header .dt-column-title:empty,
table.dataTable thead > tr > th div.dt-column-footer span.dt-column-title:empty, table.dataTable thead > tr > th div.dt-column-footer .dt-column-title:empty,
table.dataTable thead > tr > td div.dt-column-header span.dt-column-title:empty, table.dataTable thead > tr > td div.dt-column-header .dt-column-title:empty,
table.dataTable thead > tr > td div.dt-column-footer span.dt-column-title:empty, table.dataTable thead > tr > td div.dt-column-footer .dt-column-title:empty,
table.dataTable tfoot > tr > th div.dt-column-header span.dt-column-title:empty, table.dataTable tfoot > tr > th div.dt-column-header .dt-column-title:empty,
table.dataTable tfoot > tr > th div.dt-column-footer span.dt-column-title:empty, table.dataTable tfoot > tr > th div.dt-column-footer .dt-column-title:empty,
table.dataTable tfoot > tr > td div.dt-column-header span.dt-column-title:empty, table.dataTable tfoot > tr > td div.dt-column-header .dt-column-title:empty,
table.dataTable tfoot > tr > td div.dt-column-footer span.dt-column-title:empty { table.dataTable tfoot > tr > td div.dt-column-footer .dt-column-title:empty {
display: none; display: none;
} }
@ -576,16 +576,16 @@ table.dataTable.table-sm > thead > tr td.dt-ordering-asc,
table.dataTable.table-sm > thead > tr td.dt-ordering-desc { table.dataTable.table-sm > thead > tr td.dt-ordering-desc {
padding-right: 0.25rem; padding-right: 0.25rem;
} }
table.dataTable.table-sm > thead > tr th.dt-orderable-asc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-orderable-desc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-asc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-desc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-orderable-asc .dt-column-order, table.dataTable.table-sm > thead > tr th.dt-orderable-desc .dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-asc .dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-desc .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-orderable-asc span.dt-column-order, table.dataTable.table-sm > thead > tr td.dt-orderable-asc .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-orderable-desc span.dt-column-order, table.dataTable.table-sm > thead > tr td.dt-orderable-desc .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-ordering-asc span.dt-column-order, table.dataTable.table-sm > thead > tr td.dt-ordering-asc .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-ordering-desc span.dt-column-order { table.dataTable.table-sm > thead > tr td.dt-ordering-desc .dt-column-order {
right: 0.25rem; right: 0.25rem;
} }
table.dataTable.table-sm > thead > tr th.dt-type-date span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-type-numeric span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-type-date .dt-column-order, table.dataTable.table-sm > thead > tr th.dt-type-numeric .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-type-date span.dt-column-order, table.dataTable.table-sm > thead > tr td.dt-type-date .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-type-numeric span.dt-column-order { table.dataTable.table-sm > thead > tr td.dt-type-numeric .dt-column-order {
left: 0.25rem; left: 0.25rem;
} }
@ -594,7 +594,8 @@ div.dt-scroll-head table.table-bordered {
} }
div.table-responsive > div.dt-container > div.row { div.table-responsive > div.dt-container > div.row {
margin: 0; margin-left: 0;
margin-right: 0;
} }
div.table-responsive > div.dt-container > div.row > div[class^=col-]:first-child { div.table-responsive > div.dt-container > div.row > div[class^=col-]:first-child {
padding-left: 0; padding-left: 0;

4
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net/js/dataTables.min.js

File diff suppressed because one or more lines are too long

22
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-form/jquery.form.min.js

File diff suppressed because one or more lines are too long

27
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/abp.jquery.validate.js

@ -0,0 +1,27 @@
$.validator.methods.range = function (value, element, param) {
if (this.optional(element)) {
return true;
}
// Remove thousands separators and convert decimal separators
var cleanValue = value.replace(/[.,](?=.*[.,])/g, '').replace(/[.,](?!.*[.,])/g, '.');
var numericValue = parseFloat(cleanValue);
// Check if conversion was successful and value is within range
return !isNaN(numericValue) && (numericValue >= param[0] && numericValue <= param[1]);
};
$.validator.methods.number = function (value, element) {
if (this.optional(element)) {
return true;
}
// 1. Period as decimal separator, comma as thousands separator (e.g., 1,234.56 or -1,234.56)
// 2. Comma as decimal separator, period as thousands separator (e.g., 1.234,56 or -1.234,56)
// 3. Pure numbers (integers)
var pattern1 = /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/;
var pattern2 = /^(?:-?\d+|-?\d{1,3}(?:\.\d{3})+)?(?:-?,\d+)?$/;
var pattern3 = /^-?\d+$/;
return pattern1.test(value) || pattern2.test(value) || pattern3.test(value);
}

777
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

6
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

24
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.css

@ -2,7 +2,7 @@
--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5); --swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);
--swal2-container-padding: 0.625em; --swal2-container-padding: 0.625em;
--swal2-backdrop: rgba(0, 0, 0, 0.4); --swal2-backdrop: rgba(0, 0, 0, 0.4);
--swal2-backdrop-transition: background-color 0.1s; --swal2-backdrop-transition: background-color 0.15s;
--swal2-width: 32em; --swal2-width: 32em;
--swal2-padding: 0 0 1.25em; --swal2-padding: 0 0 1.25em;
--swal2-border: none; --swal2-border: none;
@ -22,7 +22,7 @@
--swal2-input-transition: border-color 0.2s, box-shadow 0.2s; --swal2-input-transition: border-color 0.2s, box-shadow 0.2s;
--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; --swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;
--swal2-input-focus-border: 1px solid #b4dbed; --swal2-input-focus-border: 1px solid #b4dbed;
--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px $swal2-outline-color; --swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);
--swal2-progress-step-background: #add8e6; --swal2-progress-step-background: #add8e6;
--swal2-validation-message-background: #f0f0f0; --swal2-validation-message-background: #f0f0f0;
--swal2-validation-message-color: #666; --swal2-validation-message-color: #666;
@ -112,7 +112,7 @@ body.swal2-no-backdrop .swal2-container {
pointer-events: none; pointer-events: none;
} }
body.swal2-no-backdrop .swal2-container .swal2-popup { body.swal2-no-backdrop .swal2-container .swal2-popup {
pointer-events: all; pointer-events: auto;
} }
body.swal2-no-backdrop .swal2-container .swal2-modal { body.swal2-no-backdrop .swal2-container .swal2-modal {
box-shadow: 0 0 10px var(--swal2-backdrop); box-shadow: 0 0 10px var(--swal2-backdrop);
@ -855,7 +855,7 @@ div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long] {
border: var(--swal2-toast-border); border: var(--swal2-toast-border);
background: var(--swal2-background); background: var(--swal2-background);
box-shadow: var(--swal2-toast-box-shadow); box-shadow: var(--swal2-toast-box-shadow);
pointer-events: all; pointer-events: auto;
} }
.swal2-toast > * { .swal2-toast > * {
grid-column: 2; grid-column: 2;
@ -1012,25 +1012,21 @@ div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long] {
@keyframes swal2-show { @keyframes swal2-show {
0% { 0% {
transform: scale(0.7); transform: translate3d(0, -50px, 0) scale(0.9);
} opacity: 0;
45% {
transform: scale(1.05);
}
80% {
transform: scale(0.95);
} }
100% { 100% {
transform: scale(1); transform: translate3d(0, 0, 0) scale(1);
opacity: 1;
} }
} }
@keyframes swal2-hide { @keyframes swal2-hide {
0% { 0% {
transform: scale(1); transform: translate3d(0, 0, 0) scale(1);
opacity: 1; opacity: 1;
} }
100% { 100% {
transform: scale(0.5); transform: translate3d(0, -50px, 0) scale(0.9);
opacity: 0; opacity: 0;
} }
} }

777
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.all.js

File diff suppressed because one or more lines are too long

6
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.all.min.js

File diff suppressed because one or more lines are too long

775
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.js

File diff suppressed because it is too large

4
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.min.js

File diff suppressed because one or more lines are too long

775
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

2
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.min.css

File diff suppressed because one or more lines are too long

4
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.min.js

File diff suppressed because one or more lines are too long

29
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs

@ -31,6 +31,7 @@ using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.Authorization.Permissions; using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Caching; using Volo.Abp.Caching;
@ -55,7 +56,7 @@ namespace LY.MicroService.BackendAdmin;
public partial class BackendAdminHttpApiHostModule public partial class BackendAdminHttpApiHostModule
{ {
public static string ApplicationName { get; set; } = "BackendAdminService"; public static string ApplicationName { get; set; } = "AdminService";
protected const string DefaultCorsPolicyName = "Default"; protected const string DefaultCorsPolicyName = "Default";
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
@ -238,8 +239,11 @@ public partial class BackendAdminHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -449,14 +453,19 @@ public partial class BackendAdminHttpApiHostModule
} }
}); });
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{ {
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); configuration.GetSection("AntiForgery").Bind(options);
services });
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application") services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .SetApplicationName("LINGYUN.Abp.Application")
} .PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
private void ConfigureWrapper() private void ConfigureWrapper()

1
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs

@ -165,7 +165,6 @@ public partial class BackendAdminHttpApiHostModule : AbpModule
ConfigureCors(context.Services, configuration); ConfigureCors(context.Services, configuration);
ConfigureSwagger(context.Services, configuration); ConfigureSwagger(context.Services, configuration);
ConfigureDistributedLocking(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration);
ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment());
ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment());
} }

2
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30010", "applicationUrl": "http://localhost:30010",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

30
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json

@ -4,15 +4,15 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.Backend.Admin", "appId": "LINGYUN.Abp.Backend.Admin",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "BackendAdmin", "name": "BackendAdmin",
"tag": "BackendAdmin", "tag": "BackendAdmin",
"configCacheEncrypt": true "configCacheEncrypt": true
}, },
"App": { "App": {
"ShowPii": true, "ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"RefreshClaimsUrl": "http://127.0.0.1:30015" "RefreshClaimsUrl": "http://localhost:30015"
}, },
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
@ -26,10 +26,7 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
}, },
"CAP": { "CAP": {
"EventBus": { "EventBus": {
@ -41,10 +38,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "admin", "TableNamePrefix": "admin",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -55,23 +52,24 @@
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13" "Configuration": "localhost,defaultDatabase=13"
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "admin-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false, "RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client" "SwaggerClientId": "vue-oauth-client"
}, },
"RemoteServices": { "RemoteServices": {
"Platform": { "Platform": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
} }
}, },
@ -88,7 +86,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -110,7 +108,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.json

@ -1,10 +1,13 @@
{ {
"App": { "App": {
"CorsOrigins": "http://localhost:3100" "CorsOrigins": ["http://localhost:30000"]
}, },
"Clock": { "Clock": {
"Kind": "Local" "Kind": "Local"
}, },
"AntiForgery": {
"AutoValidate": false
},
"StringEncryption": { "StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra", "DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84", "InitVectorBytes": "s83ng0abvd02js84",

3
aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs

@ -15,6 +15,7 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.StackExchangeRedis; using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -122,7 +123,7 @@ public partial class IdentityServerHttpApiHostModule
mysql => mysql =>
{ {
// see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960
mysql.TranslateParameterizedCollectionsToConstants(); mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
}); });
}); });

29
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs

@ -28,6 +28,7 @@ using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.FeatureManagement; using Volo.Abp.FeatureManagement;
@ -164,8 +165,11 @@ public partial class LocalizationManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -355,19 +359,18 @@ public partial class LocalizationManagementHttpApiHostModule
} }
}); });
if (isDevelopment) Configure<AbpAntiForgeryOptions>(options =>
{ {
// services.AddAlwaysAllowAuthorization(); configuration.GetSection("AntiForgery").Bind(options);
} });
if (!isDevelopment) services.AddDataProtection()
{ .SetApplicationName("LINGYUN.Abp.Application")
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); .PersistKeysToStackExchangeRedis(() =>
services {
.AddDataProtection() return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
.SetApplicationName("LINGYUN.Abp.Application") },
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
} }
private void ConfigureWrapper() private void ConfigureWrapper()

2
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30030", "applicationUrl": "http://localhost:30030",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

30
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.Development.json

@ -4,15 +4,15 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.Localization", "appId": "LINGYUN.Abp.Localization",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "Localization", "name": "Localization",
"tag": "Localization", "tag": "Localization",
"configCacheEncrypt": true "configCacheEncrypt": true
}, },
"App": { "App": {
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"ShowPii": true, "ShowPii": true,
"RefreshClaimsUrl": "http://127.0.0.1:30015" "RefreshClaimsUrl": "http://localhost:30015"
}, },
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
@ -26,10 +26,7 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
}, },
"CAP": { "CAP": {
"EventBus": { "EventBus": {
@ -41,10 +38,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "lta", "TableNamePrefix": "lta",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -55,22 +52,23 @@
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13" "Configuration": "localhost,defaultDatabase=13"
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"RemoteServices": { "RemoteServices": {
"Platform": { "Platform": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
} }
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "localization-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false, "RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client" "SwaggerClientId": "vue-oauth-client"
@ -81,7 +79,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -103,7 +101,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.json

@ -5,8 +5,11 @@
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"
}, },
"AntiForgery": {
"AutoValidate": false
},
"App": { "App": {
"CorsOrigins": "http://localhost:3100" "CorsOrigins": ["http://localhost:30000"]
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"StringEncryption": { "StringEncryption": {

28
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs

@ -33,6 +33,7 @@ using System.Text.Unicode;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Caching; using Volo.Abp.Caching;
@ -190,8 +191,11 @@ public partial class PlatformManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -409,16 +413,18 @@ public partial class PlatformManagementHttpApiHostModule
}; };
}); });
// services.AddAlwaysAllowAuthorization(); Configure<AbpAntiForgeryOptions>(options =>
if (!isDevelopment)
{ {
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); configuration.GetSection("AntiForgery").Bind(options);
services });
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application") services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .SetApplicationName("LINGYUN.Abp.Application")
} .PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
private void ConfigureWrapper() private void ConfigureWrapper()

2
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30025", "applicationUrl": "http://localhost:30025",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

38
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.Development.json

@ -4,7 +4,7 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.Platform", "appId": "LINGYUN.Abp.Platform",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "Platform", "name": "Platform",
"tag": "Platform", "tag": "Platform",
"configCacheEncrypt": true "configCacheEncrypt": true
@ -14,12 +14,12 @@
"Forwarded": { "Forwarded": {
"ForwardedHeaders": 5, "ForwardedHeaders": 5,
"KnownProxies": [ "KnownProxies": [
"127.0.0.1" "localhost"
] ]
}, },
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"ShowPii": true, "ShowPii": true,
"RefreshClaimsUrl": "http://127.0.0.1:30015" "RefreshClaimsUrl": "http://localhost:30015"
}, },
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
@ -34,13 +34,13 @@
}, },
"RemoteServices": { "RemoteServices": {
"AbpIdentity": { "AbpIdentity": {
"BaseUrl": "http://127.0.0.1:30015/", "BaseUrl": "http://localhost:30015/",
"IdentityClient": "InternalServiceClient" "IdentityClient": "InternalServiceClient"
} }
}, },
"IdentityClients": { "IdentityClients": {
"InternalServiceClient": { "InternalServiceClient": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"RequireHttps": false, "RequireHttps": false,
"GrantType": "client_credentials", "GrantType": "client_credentials",
"Scope": "lingyun-abp-application", "Scope": "lingyun-abp-application",
@ -49,15 +49,12 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
}, },
"Features": { "Features": {
"Validation": { "Validation": {
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=8", "Configuration": "localhost,defaultDatabase=8",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
} }
} }
@ -72,10 +69,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "plt", "TableNamePrefix": "plt",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -86,16 +83,17 @@
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13" "Configuration": "localhost,defaultDatabase=13"
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "platform-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false, "RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client" "SwaggerClientId": "vue-oauth-client"
@ -106,9 +104,9 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"OssManagement": { "BlobManagement": {
"Provider": "FileSystem", "Provider": "FileSystem",
"FileSystem": { "FileSystem": {
"Bucket": "blobs", "Bucket": "blobs",
@ -135,7 +133,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

3
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.json

@ -5,6 +5,9 @@
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"
}, },
"AntiForgery": {
"AutoValidate": false
},
"AllowedHosts": "*", "AllowedHosts": "*",
"StringEncryption": { "StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra", "DefaultPassPhrase": "s46c5q55nxpeS8Ra",

2
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30020", "applicationUrl": "http://localhost:30020",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

30
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs

@ -35,6 +35,7 @@ using System.Text.Unicode;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.FeatureManagement; using Volo.Abp.FeatureManagement;
@ -226,8 +227,11 @@ public partial class RealtimeMessageHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -474,19 +478,19 @@ public partial class RealtimeMessageHttpApiHostModule
}; };
}); });
if (isDevelopment)
{
// services.AddAlwaysAllowAuthorization();
}
if (!isDevelopment) Configure<AbpAntiForgeryOptions>(options =>
{ {
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); configuration.GetSection("AntiForgery").Bind(options);
services });
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application") services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .SetApplicationName("LINGYUN.Abp.Application")
} .PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
private void ConfigureWrapper() private void ConfigureWrapper()
{ {

40
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.Development.json

@ -4,21 +4,21 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.Message", "appId": "LINGYUN.Abp.Message",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "Message", "name": "Message",
"tag": "Message", "tag": "Message",
"configCacheEncrypt": true "configCacheEncrypt": true
}, },
"App": { "App": {
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"Forwarded": { "Forwarded": {
"ForwardedHeaders": 5, "ForwardedHeaders": 5,
"KnownProxies": [ "KnownProxies": [
"127.0.0.1" "localhost"
] ]
}, },
"ShowPii": true, "ShowPii": true,
"RefreshClaimsUrl": "http://127.0.0.1:30015" "RefreshClaimsUrl": "http://localhost:30015"
}, },
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
@ -38,45 +38,43 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
}, },
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13" "Configuration": "localhost,defaultDatabase=13"
} }
}, },
"Features": { "Features": {
"Validation": { "Validation": {
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=8", "Configuration": "localhost,defaultDatabase=8",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
} }
} }
}, },
"Redis": { "Redis": {
"IsEnabled": true, "IsEnabled": true,
"Configuration": "127.0.0.1,defaultDatabase=8", "Configuration": "localhost,defaultDatabase=8",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"RemoteServices": { "RemoteServices": {
"Platform": { "Platform": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
} }
}, },
"SignalR": { "SignalR": {
"Redis": { "Redis": {
"IsEnabled": true, "IsEnabled": true,
"Configuration": "127.0.0.1,defaultDatabase=13,channelPrefix=abp-realtime-channel" "Configuration": "localhost,defaultDatabase=13,channelPrefix=abp-realtime-channel"
} }
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "message-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false, "RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client" "SwaggerClientId": "vue-oauth-client"
@ -87,8 +85,8 @@
"quartz.jobStore.dataSource": "tkm", "quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz", "quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz", "quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456", "quartz.dataSource.tkm.connectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement", "quartz.dataSource.tkm.connectionStringName": "Default",
"quartz.dataSource.tkm.provider": "MySqlConnector", "quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true", "quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json", "quartz.serializer.type": "json",
@ -113,10 +111,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "msg", "TableNamePrefix": "msg",
"ConnectionString": "Server=127.0.0.1;Database=Messages-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -130,7 +128,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -155,7 +153,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.json

@ -5,8 +5,11 @@
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"
}, },
"AntiForgery": {
"AutoValidate": false
},
"App": { "App": {
"CorsOrigins": "http://localhost:3100" "CorsOrigins": ["http://localhost:30000"]
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"StringEncryption": { "StringEncryption": {

2
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30040", "applicationUrl": "http://localhost:30040",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

36
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs

@ -1,6 +1,5 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using LINGYUN.Abp.BackgroundTasks; using LINGYUN.Abp.BackgroundTasks;
using LINGYUN.Abp.BlobStoring.BlobManagement;
using LINGYUN.Abp.ExceptionHandling; using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Localization.CultureMap; using LINGYUN.Abp.Localization.CultureMap;
@ -31,6 +30,7 @@ using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Caching; using Volo.Abp.Caching;
@ -153,8 +153,11 @@ public partial class TaskManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -294,15 +297,6 @@ public partial class TaskManagementHttpApiHostModule
{ {
Configure<AbpBlobStoringOptions>(options => Configure<AbpBlobStoringOptions>(options =>
{ {
// all container use oss management
options.Containers.ConfigureAll((containerName, containerConfiguration) =>
{
// use oss management
containerConfiguration.UseBlobManagement(config =>
{
config.ContainerName = configuration[BlobManagementBlobProviderConfigurationNames.ContainerName] ?? "tasks";
});
});
}); });
} }
@ -426,14 +420,18 @@ public partial class TaskManagementHttpApiHostModule
} }
}); });
if (!isDevelopment) Configure<AbpAntiForgeryOptions>(options =>
{ {
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); configuration.GetSection("AntiForgery").Bind(options);
services });
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application") services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .SetApplicationName("LINGYUN.Abp.Application")
} .PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
private void ConfigureWrapper() private void ConfigureWrapper()

48
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.Development.json

@ -4,15 +4,15 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.TaskManagement", "appId": "LINGYUN.Abp.TaskManagement",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "LINGYUN.Abp.TaskManagement", "name": "LINGYUN.Abp.TaskManagement",
"tag": "LINGYUN.Abp.TaskManagement", "tag": "LINGYUN.Abp.TaskManagement",
"configCacheEncrypt": true "configCacheEncrypt": true
}, },
"App": { "App": {
"ShowPii": true, "ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"RefreshClaimsUrl": "http://127.0.0.1:30015" "RefreshClaimsUrl": "http://localhost:30015"
}, },
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
@ -35,10 +35,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "tsk", "TableNamePrefix": "tsk",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -52,37 +52,30 @@
"quartz.jobStore.dataSource": "tkm", "quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz", "quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz", "quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "quartz.dataSource.tkm.connectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement", "quartz.dataSource.tkm.connectionStringName": "Default",
"quartz.dataSource.tkm.provider": "MySqlConnector", "quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true", "quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json" "quartz.serializer.type": "json"
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpTenantManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpTextTemplating": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
}, },
"RemoteServices": { "RemoteServices": {
"AbpOssManagement": { "AbpOssManagement": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"IdentityClient": "InternalServiceClient", "IdentityClient": "InternalServiceClient",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
}, },
"Platform": { "Platform": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
} }
}, },
"IdentityClients": { "IdentityClients": {
"InternalServiceClient": { "InternalServiceClient": {
"Authority": "http://127.0.0.1:44385", "Authority": "http://localhost:44385",
"RequireHttps": false, "RequireHttps": false,
"GrantType": "client_credentials", "GrantType": "client_credentials",
"Scope": "lingyun-abp-application", "Scope": "lingyun-abp-application",
@ -93,19 +86,18 @@
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15" "Configuration": "localhost,defaultDatabase=15"
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "task-service",
"Scopes": "lingyun-abp-application", "ValidAudiences": [ "lingyun-abp-application" ],
"SwaggerClientId": "InternalServiceClient", "SwaggerClientId": "vue-oauth-client",
"SwaggerClientSecret": "1q2w3E*",
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false "RequireHttpsMetadata": false
}, },
@ -122,13 +114,13 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"OpenTelemetry": { "OpenTelemetry": {
"IsEnabled": true, "IsEnabled": true,
"ZipKin": { "ZipKin": {
"Endpoint": "http://127.0.0.1:9411/api/v2/spans" "Endpoint": "http://localhost:9411/api/v2/spans"
} }
}, },
"Serilog": { "Serilog": {
@ -152,7 +144,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.json

@ -1,10 +1,13 @@
{ {
"App": { "App": {
"CorsOrigins": "http://localhost:3100" "CorsOrigins": ["http://localhost:30000"]
}, },
"Clock": { "Clock": {
"Kind": "Local" "Kind": "Local"
}, },
"AntiForgery": {
"AutoValidate": false
},
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"
}, },

2
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Properties/launchSettings.json

@ -15,7 +15,7 @@
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"applicationUrl": "http://127.0.0.1:30045" "applicationUrl": "http://localhost:30045"
} }
} }
} }

4
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/TenantHeaderParamter.cs

@ -1,5 +1,5 @@
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen; using Swashbuckle.AspNetCore.SwaggerGen;
using System.Collections.Generic; using System.Collections.Generic;
using Volo.Abp.AspNetCore.MultiTenancy; using Volo.Abp.AspNetCore.MultiTenancy;
@ -23,7 +23,7 @@ public class TenantHeaderParamter : IOperationFilter
{ {
if (_multiTenancyOptions.IsEnabled) if (_multiTenancyOptions.IsEnabled)
{ {
operation.Parameters = operation.Parameters ?? new List<OpenApiParameter>(); operation.Parameters = operation.Parameters ?? new List<IOpenApiParameter>();
operation.Parameters.Add(new OpenApiParameter operation.Parameters.Add(new OpenApiParameter
{ {
Name = _aspNetCoreMultiTenancyOptions.TenantKey, Name = _aspNetCoreMultiTenancyOptions.TenantKey,

56
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs

@ -23,16 +23,18 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.IdentityModel.Logging; using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi;
using Quartz; using Quartz;
using StackExchange.Redis; using StackExchange.Redis;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.FeatureManagement; using Volo.Abp.FeatureManagement;
@ -187,8 +189,11 @@ public partial class WebhooksManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -336,25 +341,16 @@ public partial class WebhooksManagementHttpApiHostModule
}); });
options.DocInclusionPredicate((docName, description) => true); options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName); options.CustomSchemaIds(type => type.FullName);
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme options.DescribeAllParametersInCamelCase();
{
Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"", var xmlDocFiles = new List<string>();
Name = "Authorization", xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "LINGYUN.Abp.*.xml"));
In = ParameterLocation.Header, xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "Volo.Abp.*.xml"));
Scheme = "bearer",
Type = SecuritySchemeType.Http, foreach (var xmlDocFile in xmlDocFiles)
BearerFormat = "JWT"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
{ {
{ options.IncludeXmlComments(xmlDocFile);
new OpenApiSecurityScheme }
{
Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" }
},
new string[] { }
}
});
options.OperationFilter<TenantHeaderParamter>(); options.OperationFilter<TenantHeaderParamter>();
}); });
} }
@ -472,14 +468,18 @@ public partial class WebhooksManagementHttpApiHostModule
} }
}); });
if (!isDevelopment) Configure<AbpAntiForgeryOptions>(options =>
{ {
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); configuration.GetSection("AntiForgery").Bind(options);
services });
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application") services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .SetApplicationName("LINGYUN.Abp.Application")
} .PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
private void ConfigureWrapper() private void ConfigureWrapper()

15
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.DataSeeder.cs

@ -1,15 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using LY.MicroService.WebhooksManagement.DataSeeder;
namespace LY.MicroService.WebhooksManagement;
public partial class WebhooksManagementHttpApiHostModule
{
private static void ConfigureSeedWorker(IServiceCollection services, bool isDevelopment = false)
{
if (isDevelopment)
{
services.AddHostedService<WebhooksManagementDataSeederWorker>();
}
}
}

1
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs

@ -130,7 +130,6 @@ public partial class WebhooksManagementHttpApiHostModule : AbpModule
ConfigureSwagger(context.Services, configuration); ConfigureSwagger(context.Services, configuration);
ConfigureDistributedLock(context.Services, configuration); ConfigureDistributedLock(context.Services, configuration);
ConfigureBackgroundTasks(context.Services, configuration); ConfigureBackgroundTasks(context.Services, configuration);
ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment());
ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment());
} }

38
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.Development.json

@ -4,15 +4,15 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.WebhooksManagement", "appId": "LINGYUN.Abp.WebhooksManagement",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "LINGYUN.Abp.WebhooksManagement", "name": "LINGYUN.Abp.WebhooksManagement",
"tag": "LINGYUN.Abp.WebhooksManagement", "tag": "LINGYUN.Abp.WebhooksManagement",
"configCacheEncrypt": true "configCacheEncrypt": true
}, },
"App": { "App": {
"ShowPii": true, "ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"RefreshClaimsUrl": "http://127.0.0.1:30015" "RefreshClaimsUrl": "http://localhost:30015"
}, },
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
@ -26,32 +26,29 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
}, },
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15" "Configuration": "localhost,defaultDatabase=15"
} }
}, },
"OpenTelemetry": { "OpenTelemetry": {
"IsEnabled": true, "IsEnabled": true,
"ZipKin": { "ZipKin": {
"Endpoint": "http://127.0.0.1:9411/api/v2/spans" "Endpoint": "http://localhost:9411/api/v2/spans"
} }
}, },
"RemoteServices": { "RemoteServices": {
"Platform": { "Platform": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
} }
}, },
"IdentityClients": { "IdentityClients": {
"InternalServiceClient": { "InternalServiceClient": {
"Authority": "http://127.0.0.1:44385", "Authority": "http://localhost:44385",
"RequireHttps": false, "RequireHttps": false,
"GrantType": "client_credentials", "GrantType": "client_credentials",
"Scope": "lingyun-abp-application", "Scope": "lingyun-abp-application",
@ -69,10 +66,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "wkm", "TableNamePrefix": "wkm",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -86,8 +83,8 @@
"quartz.jobStore.dataSource": "tkm", "quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz", "quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz", "quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", "quartz.dataSource.tkm.connectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement", "quartz.dataSource.tkm.connectionStringName": "Default",
"quartz.dataSource.tkm.provider": "MySqlConnector", "quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true", "quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json", "quartz.serializer.type": "json",
@ -96,12 +93,13 @@
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "webhook-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false, "RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client" "SwaggerClientId": "vue-oauth-client"
@ -119,7 +117,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -141,7 +139,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

3
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.json

@ -5,6 +5,9 @@
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"
}, },
"AntiForgery": {
"AutoValidate": false
},
"StringEncryption": { "StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra", "DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84", "InitVectorBytes": "s83ng0abvd02js84",

2
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/Properties/launchSettings.json

@ -13,7 +13,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30060", "applicationUrl": "http://localhost:30060",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

4
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/TenantHeaderParamter.cs

@ -1,5 +1,5 @@
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen; using Swashbuckle.AspNetCore.SwaggerGen;
using System.Collections.Generic; using System.Collections.Generic;
using Volo.Abp.AspNetCore.MultiTenancy; using Volo.Abp.AspNetCore.MultiTenancy;
@ -23,7 +23,7 @@ public class TenantHeaderParamter : IOperationFilter
{ {
if (_multiTenancyOptions.IsEnabled) if (_multiTenancyOptions.IsEnabled)
{ {
operation.Parameters = operation.Parameters ?? new List<OpenApiParameter>(); operation.Parameters = operation.Parameters ?? new List<IOpenApiParameter>();
operation.Parameters.Add(new OpenApiParameter operation.Parameters.Add(new OpenApiParameter
{ {
Name = _aspNetCoreMultiTenancyOptions.TenantKey, Name = _aspNetCoreMultiTenancyOptions.TenantKey,

59
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.Configure.cs

@ -13,20 +13,23 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.StackExchangeRedis; using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Logging; using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi;
using StackExchange.Redis; using StackExchange.Redis;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
@ -108,7 +111,7 @@ public partial class WechatManagementHttpApiHostModule
mysql => mysql =>
{ {
// see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960
mysql.TranslateParameterizedCollectionsToConstants(); mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
}); });
}); });
} }
@ -136,8 +139,11 @@ public partial class WechatManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -302,25 +308,16 @@ public partial class WechatManagementHttpApiHostModule
}); });
options.DocInclusionPredicate((docName, description) => true); options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName); options.CustomSchemaIds(type => type.FullName);
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme options.DescribeAllParametersInCamelCase();
{
Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"", var xmlDocFiles = new List<string>();
Name = "Authorization", xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "LINGYUN.Abp.*.xml"));
In = ParameterLocation.Header, xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "Volo.Abp.*.xml"));
Scheme = "bearer",
Type = SecuritySchemeType.Http, foreach (var xmlDocFile in xmlDocFiles)
BearerFormat = "JWT"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
{ {
{ options.IncludeXmlComments(xmlDocFile);
new OpenApiSecurityScheme }
{
Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" }
},
new string[] { }
}
});
options.OperationFilter<TenantHeaderParamter>(); options.OperationFilter<TenantHeaderParamter>();
}); });
} }
@ -426,14 +423,18 @@ public partial class WechatManagementHttpApiHostModule
} }
}); });
if (!isDevelopment) Configure<AbpAntiForgeryOptions>(options =>
{ {
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); configuration.GetSection("AntiForgery").Bind(options);
services });
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application") services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .SetApplicationName("LINGYUN.Abp.Application")
} .PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
private void ConfigureWrapper() private void ConfigureWrapper()

37
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.Development.json

@ -4,14 +4,14 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.WechatManagement", "appId": "LINGYUN.Abp.WechatManagement",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "LINGYUN.Abp.WechatManagement", "name": "LINGYUN.Abp.WechatManagement",
"tag": "LINGYUN.Abp.WechatManagement" "tag": "LINGYUN.Abp.WechatManagement"
}, },
"App": { "App": {
"ShowPii": true, "ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"RefreshClaimsUrl": "http://127.0.0.1:30015" "RefreshClaimsUrl": "http://localhost:30015"
}, },
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
@ -25,29 +25,24 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
}, },
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15" "Configuration": "localhost,defaultDatabase=15"
} }
}, },
"OpenTelemetry": { "OpenTelemetry": {
"IsEnabled": true, "IsEnabled": true,
"ZipKin": { "ZipKin": {
"Endpoint": "http://127.0.0.1:9411/api/v2/spans" "Endpoint": "http://localhost:9411/api/v2/spans"
} }
}, },
"RemoteServices": {}, "RemoteServices": {},
"IdentityClients": { "IdentityClients": {
"InternalServiceClient": { "InternalServiceClient": {
"Authority": "http://127.0.0.1:44385", "Authority": "http://localhost:44385",
"RequireHttps": false, "RequireHttps": false,
"GrantType": "client_credentials", "GrantType": "client_credentials",
"Scope": "lingyun-abp-application", "Scope": "lingyun-abp-application",
@ -65,10 +60,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "wechat", "TableNamePrefix": "wechat",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -77,16 +72,16 @@
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "wechat-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false, "RequireHttpsMetadata": false,
"SwaggerClientId": "InternalServiceClient", "SwaggerClientId": "vue-oauth-client"
"SwaggerClientSecret": "1q2w3E*"
}, },
"Logging": { "Logging": {
"Serilog": { "Serilog": {
@ -101,7 +96,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -123,7 +118,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

3
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.json

@ -5,6 +5,9 @@
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"
}, },
"AntiForgery": {
"AutoValidate": false
},
"StringEncryption": { "StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra", "DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84", "InitVectorBytes": "s83ng0abvd02js84",

2
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Properties/launchSettings.json

@ -15,7 +15,7 @@
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"applicationUrl": "http://127.0.0.1:30035" "applicationUrl": "http://localhost:30035"
} }
} }
} }

35
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs

@ -212,8 +212,11 @@ public partial class WorkflowManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{ {
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]); services.AddSingleton<IDistributedLockProvider>(_ =>
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase())); {
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
} }
} }
@ -461,12 +464,6 @@ public partial class WorkflowManagementHttpApiHostModule
private void ConfigureSecurity(IServiceCollection services, IConfiguration configuration, bool isDevelopment = false) private void ConfigureSecurity(IServiceCollection services, IConfiguration configuration, bool isDevelopment = false)
{ {
Configure<AbpAntiForgeryOptions>(options =>
{
options.AutoValidate = false;
//options.AutoValidateFilter = (type) => !type.Namespace.Contains("elsa", StringComparison.CurrentCultureIgnoreCase);
});
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddAbpJwtBearer(options => .AddAbpJwtBearer(options =>
{ {
@ -485,18 +482,18 @@ public partial class WorkflowManagementHttpApiHostModule
} }
}); });
//services.AddElsaJwtBearerAuthentication(options => Configure<AbpAntiForgeryOptions>(options =>
//{
//});
if (!isDevelopment)
{ {
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); configuration.GetSection("AntiForgery").Bind(options);
services });
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application") services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .SetApplicationName("LINGYUN.Abp.Application")
} .PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
private void ConfigureCors(IServiceCollection services, IConfiguration configuration) private void ConfigureCors(IServiceCollection services, IConfiguration configuration)

15
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.DataSeeder.cs

@ -1,15 +0,0 @@
using LY.MicroService.WorkflowManagement.DataSeeder;
using Microsoft.Extensions.DependencyInjection;
namespace LY.MicroService.WorkflowManagement;
public partial class WorkflowManagementHttpApiHostModule
{
private static void ConfigureSeedWorker(IServiceCollection services, bool isDevelopment = false)
{
if (isDevelopment)
{
services.AddHostedService<WorkflowManagementDataSeederWorker>();
}
}
}

48
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json

@ -4,14 +4,14 @@
"env": "DEV", "env": "DEV",
"appId": "LINGYUN.Abp.Workflow", "appId": "LINGYUN.Abp.Workflow",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "LINGYUN.Abp.Workflow", "name": "LINGYUN.Abp.Workflow",
"tag": "LINGYUN.Abp.Workflow" "tag": "LINGYUN.Abp.Workflow"
}, },
"App": { "App": {
"CorsOrigins": [ "http://127.0.0.1:5666" ], "CorsOrigins": [ "http://localhost:5666" ],
"ShowPii": true, "ShowPii": true,
"RefreshClaimsUrl": "http://127.0.0.1:30015" "RefreshClaimsUrl": "http://localhost:30015"
}, },
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
@ -25,15 +25,8 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None;SslMode=None", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None", "Workflow": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"WorkflowManagement": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None",
"AbpWorkflowCore": "Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456;SslMode=None",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
}, },
"Quartz": { "Quartz": {
"UsePersistentStore": false, "UsePersistentStore": false,
@ -41,8 +34,8 @@
"quartz.jobStore.dataSource": "tkm", "quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz", "quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz", "quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", "quartz.dataSource.tkm.connectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement", "quartz.dataSource.tkm.connectionStringName": "Default",
"quartz.dataSource.tkm.provider": "MySqlConnector", "quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true", "quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json", "quartz.serializer.type": "json",
@ -111,23 +104,23 @@
}, },
"Rebus": { "Rebus": {
"RabbitMQ": { "RabbitMQ": {
"Connection": "amqp://admin:123456@127.0.0.1:5672/" "Connection": "amqp://admin:123456@localhost:5672/"
} }
}, },
"Server": { "Server": {
"BaseUrl": "http://127.0.0.1:30035" "BaseUrl": "http://localhost:30035"
} }
}, },
"RemoteServices": { "RemoteServices": {
"AbpOssManagement": { "AbpOssManagement": {
"BaseUrl": "http://127.0.0.1:30025", "BaseUrl": "http://localhost:30025",
"IdentityClient": "InternalServiceClient", "IdentityClient": "InternalServiceClient",
"UseCurrentAccessToken": false "UseCurrentAccessToken": false
} }
}, },
"IdentityClients": { "IdentityClients": {
"InternalServiceClient": { "InternalServiceClient": {
"Authority": "http://127.0.0.1:44385", "Authority": "http://localhost:44385",
"RequireHttps": false, "RequireHttps": false,
"GrantType": "client_credentials", "GrantType": "client_credentials",
"Scope": "lingyun-abp-application", "Scope": "lingyun-abp-application",
@ -141,7 +134,7 @@
"DistributedLock": { "DistributedLock": {
"IsEnabled": true, "IsEnabled": true,
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15" "Configuration": "localhost,defaultDatabase=15"
} }
}, },
"CAP": { "CAP": {
@ -155,10 +148,10 @@
}, },
"MySql": { "MySql": {
"TableNamePrefix": "wf", "TableNamePrefix": "wf",
"ConnectionString": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None" "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
}, },
"RabbitMQ": { "RabbitMQ": {
"HostName": "127.0.0.1", "HostName": "localhost",
"Port": 5672, "Port": 5672,
"UserName": "admin", "UserName": "admin",
"Password": "123456", "Password": "123456",
@ -167,16 +160,15 @@
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10", "Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "workflow-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false, "RequireHttpsMetadata": false,
"Scopes": "lingyun-abp-application",
"ElsaClientId": "InternalServiceClient",
"SwaggerClientId": "vue-oauth-client" "SwaggerClientId": "vue-oauth-client"
}, },
"Logging": { "Logging": {
@ -192,7 +184,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -214,7 +206,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

3
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.json

@ -5,6 +5,9 @@
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"
}, },
"AntiForgery": {
"AutoValidate": false
},
"StringEncryption": { "StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra", "DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84", "InitVectorBytes": "s83ng0abvd02js84",

76
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/InternalGatewayModule.cs

@ -1,4 +1,6 @@
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; using Autofac.Core;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.Claims.Mapping;
using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
@ -10,7 +12,8 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models; using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi;
using StackExchange.Redis; using StackExchange.Redis;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -31,6 +34,7 @@ namespace LINGYUN.MicroService.Internal.Gateway;
[DependsOn( [DependsOn(
typeof(AbpSerilogEnrichersApplicationModule), typeof(AbpSerilogEnrichersApplicationModule),
typeof(AbpSerilogEnrichersUniqueIdModule), typeof(AbpSerilogEnrichersUniqueIdModule),
typeof(AbpClaimsMappingModule),
typeof(AbpAutofacModule), typeof(AbpAutofacModule),
typeof(AbpDataModule), typeof(AbpDataModule),
typeof(AbpSwashbuckleModule), typeof(AbpSwashbuckleModule),
@ -39,7 +43,7 @@ namespace LINGYUN.MicroService.Internal.Gateway;
)] )]
public class InternalGatewayModule : AbpModule public class InternalGatewayModule : AbpModule
{ {
public static string ApplicationName { get; set; } = "Services.ApiGateWay"; public static string ApplicationName { get; set; } = "InternalApiGateway";
public override void PreConfigureServices(ServiceConfigurationContext context) public override void PreConfigureServices(ServiceConfigurationContext context)
{ {
AbpSerilogEnrichersConsts.ApplicationName = ApplicationName; AbpSerilogEnrichersConsts.ApplicationName = ApplicationName;
@ -70,15 +74,14 @@ public class InternalGatewayModule : AbpModule
authority: configuration["AuthServer:Authority"], authority: configuration["AuthServer:Authority"],
scopes: new Dictionary<string, string> scopes: new Dictionary<string, string>
{ {
{"Account", "Account API"}, {"identity-service", "Identity Service API"},
{"Identity", "Identity API"}, {"admin-service", "Admin Service API"},
{"IdentityServer", "Identity Server API"}, {"localization-service", "Localization Service API"},
{"BackendAdmin", "Backend Admin API"}, {"platform-service", "Platform Service API"},
{"Localization", "Localization API"}, {"message-service", "Message Service API"},
{"Platform", "Platform API"}, {"task-service", "Task Service API"},
{"RealtimeMessage", "RealtimeMessage API"}, {"webhook-service", "Webhook Service API"},
{"TaskManagement", "Task Management API"}, {"wechat-service", "WeChat Service API"},
{"Webhooks", "Webhooks API"},
}, },
options => options =>
{ {
@ -87,30 +90,47 @@ public class InternalGatewayModule : AbpModule
options.CustomSchemaIds(type => type.FullName); options.CustomSchemaIds(type => type.FullName);
}); });
context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options => .AddJwtBearer(options =>
{
configuration.GetSection("AuthServer").Bind(options);
var validIssuers = configuration.GetSection("AuthServer:ValidIssuers").Get<List<string>>();
if (validIssuers?.Count > 0)
{
options.TokenValidationParameters.ValidIssuers = validIssuers;
options.TokenValidationParameters.IssuerValidator = TokenWildcardIssuerValidator.IssuerValidator;
}
var validAudiences = configuration.GetSection("AuthServer:ValidAudiences").Get<List<string>>();
if (validAudiences?.Count > 0)
{ {
configuration.GetSection("AuthServer").Bind(options); options.TokenValidationParameters.ValidAudiences = validAudiences;
}); }
});
if (hostingEnvironment.IsProduction()) context.Services.AddDataProtection()
{ .SetApplicationName("LINGYUN.Abp.Application")
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); .PersistKeysToStackExchangeRedis(() =>
context.Services {
.AddDataProtection() return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
.SetApplicationName("LINGYUN.Abp.Application") },
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
context.Services.AddCors(options => context.Services.AddCors(options =>
{ {
options.AddDefaultPolicy(builder => options.AddDefaultPolicy(builder =>
{ {
var corsOrigins = configuration.GetSection("App:CorsOrigins").Get<List<string>>();
if (corsOrigins == null || corsOrigins.Count == 0)
{
corsOrigins = configuration["App:CorsOrigins"]?
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToList() ?? new List<string>();
}
builder builder
.WithOrigins( .WithOrigins(corsOrigins
configuration["App:CorsOrigins"] .Select(o => o.RemovePostFix("/"))
.Split(",", StringSplitOptions.RemoveEmptyEntries) .ToArray()
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
) )
.WithAbpExposedHeaders() .WithAbpExposedHeaders()
.WithAbpWrapExposedHeaders() .WithAbpWrapExposedHeaders()

1
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/LINGYUN.MicroService.Internal.Gateway.csproj

@ -34,6 +34,7 @@
<ProjectReference Include="..\..\..\..\..\aspnet-core\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" /> <ProjectReference Include="..\..\..\..\..\aspnet-core\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\aspnet-core\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" /> <ProjectReference Include="..\..\..\..\..\aspnet-core\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />
<ProjectReference Include="..\..\..\..\..\aspnet-core\framework\mvc\LINGYUN.Abp.AspNetCore.Mvc.Wrapper\LINGYUN.Abp.AspNetCore.Mvc.Wrapper.csproj" /> <ProjectReference Include="..\..\..\..\..\aspnet-core\framework\mvc\LINGYUN.Abp.AspNetCore.Mvc.Wrapper\LINGYUN.Abp.AspNetCore.Mvc.Wrapper.csproj" />
<ProjectReference Include="..\..\..\..\..\aspnet-core\framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

23
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/appsettings.Development.json

@ -4,28 +4,21 @@
"env": "DEV", "env": "DEV",
"appId": "LY.MicroService.Internal.Gateway", "appId": "LY.MicroService.Internal.Gateway",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "BackendAdmin", "name": "BackendAdmin",
"tag": "BackendAdmin" "tag": "BackendAdmin"
}, },
"App": { "App": {
"CorsOrigins": "http://127.0.0.1:3100", "CorsOrigins": [ "http://localhost:5666" ],
"ShowPii": true "ShowPii": true
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
"AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456",
"AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456",
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpTextTemplating": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://auth-server:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "api-gateway",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false "RequireHttpsMetadata": false
}, },
@ -42,7 +35,7 @@
} }
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -65,7 +58,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

248
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/yarp.json

@ -1,11 +1,48 @@
{ {
"ReverseProxy": { "ReverseProxy": {
"Routes": { "Routes": {
"ai-management-route": {
"ClusterId": "ai-management-cluster",
"Match": {
"Path": "/api/ai-management/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat;Content-Type;Cache-Control"
}
]
},
"abp-route": { "abp-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/abp/{**everything}" "Path": "/api/abp/{**everything}"
}, },
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
},
{
"ResponseHeadersCopy": true
},
{
"ResponseHeader": "Set-Cookie",
"Append": true
}
]
},
"oidc-discovery-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/.well-known/{**everything}"
},
"Transforms": [ "Transforms": [
{ {
"HeaderPrefix": "X-Forwarded-", "HeaderPrefix": "X-Forwarded-",
@ -16,7 +53,7 @@
} }
] ]
}, },
"auth-server-route": { "oidc-token-route": {
"ClusterId": "auth-server-cluster", "ClusterId": "auth-server-cluster",
"Match": { "Match": {
"Path": "/connect/{**everything}" "Path": "/connect/{**everything}"
@ -31,8 +68,53 @@
} }
] ]
}, },
"account-external-logins-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/api/account/external-logins/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"account-oauth-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/api/account/oauth/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"account-qrcode-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/api/account/qrcode/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"account-route": { "account-route": {
"ClusterId": "auth-server-api-cluster", "ClusterId": "identity-service-cluster",
"Match": { "Match": {
"Path": "/api/account/{**everything}" "Path": "/api/account/{**everything}"
}, },
@ -47,7 +129,7 @@
] ]
}, },
"identity-route": { "identity-route": {
"ClusterId": "auth-server-api-cluster", "ClusterId": "identity-service-cluster",
"Match": { "Match": {
"Path": "/api/identity/{**everything}" "Path": "/api/identity/{**everything}"
}, },
@ -62,7 +144,7 @@
] ]
}, },
"identity-server-route": { "identity-server-route": {
"ClusterId": "auth-server-api-cluster", "ClusterId": "identity-service-cluster",
"Match": { "Match": {
"Path": "/api/identity-server/{**everything}" "Path": "/api/identity-server/{**everything}"
}, },
@ -76,8 +158,23 @@
} }
] ]
}, },
"openiddict-route": {
"ClusterId": "identity-service-cluster",
"Match": {
"Path": "/api/openiddict/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"cache-management-route": { "cache-management-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/caching-management/{**everything}" "Path": "/api/caching-management/{**everything}"
}, },
@ -92,7 +189,7 @@
] ]
}, },
"saas-route": { "saas-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/saas/{**everything}" "Path": "/api/saas/{**everything}"
}, },
@ -107,7 +204,7 @@
] ]
}, },
"auditing-route": { "auditing-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/auditing/{**everything}" "Path": "/api/auditing/{**everything}"
}, },
@ -122,7 +219,7 @@
] ]
}, },
"data-protected-route": { "data-protected-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/data-protection-management/{**everything}" "Path": "/api/data-protection-management/{**everything}"
}, },
@ -137,7 +234,7 @@
] ]
}, },
"text-template-route": { "text-template-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/text-templating/{**everything}" "Path": "/api/text-templating/{**everything}"
}, },
@ -152,7 +249,7 @@
] ]
}, },
"feature-management-route": { "feature-management-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/feature-management/{**everything}" "Path": "/api/feature-management/{**everything}"
}, },
@ -167,7 +264,7 @@
] ]
}, },
"permission-management-route": { "permission-management-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/permission-management/{**everything}" "Path": "/api/permission-management/{**everything}"
}, },
@ -182,7 +279,7 @@
] ]
}, },
"setting-management-route": { "setting-management-route": {
"ClusterId": "admin-api-cluster", "ClusterId": "admin-service-cluster",
"Match": { "Match": {
"Path": "/api/setting-management/{**everything}" "Path": "/api/setting-management/{**everything}"
}, },
@ -197,7 +294,7 @@
] ]
}, },
"localization-management-route": { "localization-management-route": {
"ClusterId": "localization-api-cluster", "ClusterId": "localization-service-cluster",
"Match": { "Match": {
"Path": "/api/localization/{**everything}" "Path": "/api/localization/{**everything}"
}, },
@ -212,7 +309,7 @@
] ]
}, },
"im-route": { "im-route": {
"ClusterId": "messages-api-cluster", "ClusterId": "messages-service-cluster",
"Match": { "Match": {
"Path": "/api/im/{**everything}" "Path": "/api/im/{**everything}"
}, },
@ -227,7 +324,7 @@
] ]
}, },
"notifications-route": { "notifications-route": {
"ClusterId": "messages-api-cluster", "ClusterId": "messages-service-cluster",
"Match": { "Match": {
"Path": "/api/notifications/{**everything}" "Path": "/api/notifications/{**everything}"
}, },
@ -241,8 +338,8 @@
} }
] ]
}, },
"signalr-route": { "signalr-hubs-route": {
"ClusterId": "messages-api-cluster", "ClusterId": "messages-service-cluster",
"Match": { "Match": {
"Path": "/signalr-hubs/{**everything}" "Path": "/signalr-hubs/{**everything}"
}, },
@ -262,8 +359,8 @@
} }
] ]
}, },
"webhooks-management-route": { "webhooks-route": {
"ClusterId": "webhooks-api-cluster", "ClusterId": "webhooks-service-cluster",
"Match": { "Match": {
"Path": "/api/webhooks/{**everything}" "Path": "/api/webhooks/{**everything}"
}, },
@ -278,7 +375,7 @@
] ]
}, },
"task-management-route": { "task-management-route": {
"ClusterId": "tasks-api-cluster", "ClusterId": "task-service-cluster",
"Match": { "Match": {
"Path": "/api/task-management/{**everything}" "Path": "/api/task-management/{**everything}"
}, },
@ -293,7 +390,7 @@
] ]
}, },
"platform-route": { "platform-route": {
"ClusterId": "platform-api-cluster", "ClusterId": "platform-service-cluster",
"Match": { "Match": {
"Path": "/api/platform/{**everything}" "Path": "/api/platform/{**everything}"
}, },
@ -307,10 +404,10 @@
} }
] ]
}, },
"oss-route": { "blob-management-route": {
"ClusterId": "platform-api-cluster", "ClusterId": "platform-service-cluster",
"Match": { "Match": {
"Path": "/api/oss-management/{**everything}" "Path": "/api/blob-management/{**everything}"
}, },
"Transforms": [ "Transforms": [
{ {
@ -323,7 +420,7 @@
] ]
}, },
"files-route": { "files-route": {
"ClusterId": "platform-api-cluster", "ClusterId": "platform-service-cluster",
"Match": { "Match": {
"Path": "/api/files/{**everything}" "Path": "/api/files/{**everything}"
}, },
@ -336,95 +433,142 @@
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat" "ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
} }
] ]
},
"wechat-route": {
"ClusterId": "wechat-service-cluster",
"Match": {
"Path": "/api/wechat/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"elsa-route": {
"ClusterId": "workflow-service-cluster",
"Match": {
"Path": "/elsa/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
} }
}, },
"Clusters": { "Clusters": {
"ai-management-cluster": {
"Destinations": {
"destination1": {
"Address": "http://localhost:30070",
"Metadata": {
"SwaggerEndpoint": "http://localhost:30070"
}
}
}
},
"auth-server-cluster": { "auth-server-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://auth-server:44385", "Address": "http://localhost:44385"
}
}
},
"identity-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://localhost:30015",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:44385" "SwaggerEndpoint": "http://localhost:30015"
} }
} }
} }
}, },
"auth-server-api-cluster": { "admin-service-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://auth-server-api:30015", "Address": "http://localhost:30010",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30015" "SwaggerEndpoint": "http://localhost:30010"
} }
} }
} }
}, },
"admin-api-cluster": { "localization-service-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://admin-api:30010", "Address": "http://localhost:30030",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30010" "SwaggerEndpoint": "http://localhost:30030"
} }
} }
} }
}, },
"localization-api-cluster": { "messages-service-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://localization-api:30030", "Address": "http://localhost:30020",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30030" "SwaggerEndpoint": "http://localhost:30020"
} }
} }
} }
}, },
"messages-api-cluster": { "webhooks-service-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://messages-api:30020", "Address": "http://localhost:30045",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30020" "SwaggerEndpoint": "http://localhost:30045"
} }
} }
} }
}, },
"webhooks-api-cluster": { "task-service-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://webhooks-api:30045", "Address": "http://localhost:30040",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30045" "SwaggerEndpoint": "http://localhost:30040"
} }
} }
} }
}, },
"tasks-api-cluster": { "platform-service-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://tasks-api:30040", "Address": "http://localhost:30025",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30040" "SwaggerEndpoint": "http://localhost:30025"
} }
} }
} }
}, },
"platform-api-cluster": { "workflow-service-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://platform-api:30025", "Address": "http://localhost:30050",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30025" "SwaggerEndpoint": "http://localhost:30050"
} }
} }
} }
}, },
"workflow-api-cluster": { "wechat-service-cluster": {
"Destinations": { "Destinations": {
"destination1": { "destination1": {
"Address": "http://workflow-api:30050", "Address": "http://localhost:30060",
"Metadata": { "Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30050" "SwaggerEndpoint": "http://localhost:30060"
} }
} }
} }

19
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.OpenApi.Gateway/OpenApiGatewayModule.cs

@ -41,7 +41,7 @@ namespace LINGYUN.MicroService.OpenApi.Gateway;
)] )]
public class OpenApiGatewayModule : AbpModule public class OpenApiGatewayModule : AbpModule
{ {
public static string ApplicationName { get; set; } = "Services.OpenApi.GateWay"; public static string ApplicationName { get; set; } = "OpenApiGateWay";
public override void PreConfigureServices(ServiceConfigurationContext context) public override void PreConfigureServices(ServiceConfigurationContext context)
{ {
AbpSerilogEnrichersConsts.ApplicationName = ApplicationName; AbpSerilogEnrichersConsts.ApplicationName = ApplicationName;
@ -94,15 +94,14 @@ public class OpenApiGatewayModule : AbpModule
authority: configuration["AuthServer:Authority"], authority: configuration["AuthServer:Authority"],
scopes: new Dictionary<string, string> scopes: new Dictionary<string, string>
{ {
{"Account", "Account API"}, {"identity-service", "Identity Service API"},
{"Identity", "Identity API"}, {"admin-service", "Admin Service API"},
{"IdentityServer", "Identity Server API"}, {"localization-service", "Localization Service API"},
{"BackendAdmin", "Backend Admin API"}, {"platform-service", "Platform Service API"},
{"Localization", "Localization API"}, {"message-service", "Message Service API"},
{"Platform", "Platform API"}, {"task-service", "Task Service API"},
{"RealtimeMessage", "RealtimeMessage API"}, {"webhook-service", "Webhook Service API"},
{"TaskManagement", "Task Management API"}, {"wechat-service", "WeChat Service API"},
{"Webhooks", "Webhooks API"},
}, },
options => options =>
{ {

22
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.OpenApi.Gateway/appsettings.Development.json

@ -4,27 +4,19 @@
"env": "DEV", "env": "DEV",
"appId": "LY.MicroService.Internal.Gateway", "appId": "LY.MicroService.Internal.Gateway",
"secret": "1q2w3E*", "secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000", "nodes": "http://localhost:5000",
"name": "BackendAdmin", "name": "BackendAdmin",
"tag": "BackendAdmin" "tag": "BackendAdmin"
}, },
"App": { "App": {
"CorsOrigins": "http://127.0.0.1:3100,http://localhost:9010", "CorsOrigins": "http://localhost:3100,http://localhost:9010",
"ShowPii": true "ShowPii": true
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456", "Default": "Server=localhost;Database=abp;User Id=root;Password=123456"
"AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456",
"AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456",
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpTextTemplating": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://auth-server:44385/", "Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application", "Audience": "lingyun-abp-application",
"MapInboundClaims": false, "MapInboundClaims": false,
"RequireHttpsMetadata": false "RequireHttpsMetadata": false
@ -62,11 +54,11 @@
}, },
"Redis": { "Redis": {
"IsEnabled": true, "IsEnabled": true,
"Configuration": "127.0.0.1,defaultDatabase=15", "Configuration": "localhost,defaultDatabase=15",
"InstanceName": "LINGYUN.Abp.Application" "InstanceName": "LINGYUN.Abp.Application"
}, },
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200" "NodeUris": "http://localhost:9200"
}, },
"Serilog": { "Serilog": {
"MinimumLevel": { "MinimumLevel": {
@ -89,7 +81,7 @@
{ {
"Name": "Elasticsearch", "Name": "Elasticsearch",
"Args": { "Args": {
"nodeUris": "http://127.0.0.1:9200", "nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true, "autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7" "autoRegisterTemplateVersion": "ESv7"

Loading…
Cancel
Save