Hi
I created an internal issue for penetration tests and we will working on it, I will let you know if it's available.
You can see the PR is in the 7.0 patch branch, so it should be included in the 7.1.0 version. https://github.com/abpframework/abp/pull/15842
Hi,
It's easy to do, you can try:
var admin = context.Menu.GetAdministration();
var identity = admin.GetMenuItem(IdentityMenuNames.GroupName);
identity.AddItem(...)
Hi,
The Identityserver use CookieAuthentication and aspnet core identity.
And the cookie created by: https://github.com/dotnet/aspnetcore/blob/main/src/Security/Authentication/Cookies/src/CookieAuthenticationHandler.cs
If the token expires, what happens if you access the identity/users page?
Add a new migration for the Sub/Entity since the abp suite is not adding the migrations.
You can run the dotnet ef migrations add xxx command to add a new migration file.
How to do it keeping Module Sub isolated from the main application.
Do you mean that you want the module as a standalone application? if so, you can run the HttpApi.Host project, it will be used as an independent API service.
If I misunderstand please let me know.
Hi,
I didn't find this problem, can you share a minimal project that can reproduce the problem with me? thanks. shiwei.liang@volosofot.com
Hi,
this is a known issue because SAAS and Identity are two separate modules, the password cannot be verified in the module.
But you can custom it in your project:
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ITenantAppService))]
public class MyTenantAppService : TenantAppService
{
protected IOptions<IdentityOptions> IdentityOptions { get; }
private IdentityUserManager _userManager;
public MyTenantAppService(
ITenantRepository tenantRepository,
IEditionRepository editionRepository,
ITenantManager tenantManager,
IDataSeeder dataSeeder,
IDistributedEventBus distributedEventBus,
IOptions<AbpDbConnectionOptions> dbConnectionOptions,
IConnectionStringChecker connectionStringChecker,
IOptions<IdentityOptions> identityOptions, IdentityUserManager userManager) : base(tenantRepository, editionRepository, tenantManager, dataSeeder, distributedEventBus, dbConnectionOptions, connectionStringChecker)
{
IdentityOptions = identityOptions;
_userManager = userManager;
}
public async override Task<SaasTenantDto> CreateAsync(SaasTenantCreateDto input)
{
if (!input.AdminPassword.IsNullOrWhiteSpace())
{
await ValidPasswordAsync(input.AdminPassword);
}
return await base.CreateAsync(input);
}
public async override Task SetPasswordAsync(Guid id, SaasTenantSetPasswordDto input)
{
await ValidPasswordAsync(input.Password);
await base.SetPasswordAsync(id, input);
}
private async Task ValidPasswordAsync(string password)
{
var errors = new List<IdentityError>();
var isValid = true;
await IdentityOptions.SetAsync();
foreach (var passwordValidator in _userManager.PasswordValidators)
{
var result = await passwordValidator.ValidateAsync(_userManager, null, password);
if (!result.Succeeded)
{
if (result.Errors.Any())
{
errors.AddRange(result.Errors);
}
isValid = false;
}
}
if (!isValid)
{
IdentityResult.Failed(errors.ToArray()).CheckErrors();
}
}
}
It’s working now, right?