It's weird.
Can you debug the app and inject the
IOptions<AbpAccountOptions
to see its values?
ok will check and update u
hi
The log says : Require
AbpIdentity.Users
permission to impersonate user!",What's your
ImpersonationUserPermission
value?Eg:
context.Services.Configure<AbpAccountOptions>(options => { //For impersonation in Saas module options.TenantAdminUserName = "admin"; options.ImpersonationTenantPermission = SaasHostPermissions.Tenants.Impersonation; //For impersonation in Identity module options.ImpersonationUserPermission = IdentityPermissions.Users.Impersonation; });
we are using the below
and added below as well in auth server
hi
IDX10214: Audience validation failed. A Audiences: 'IdentityService, AdministrationService, SaasService, EmployeeService, IncidentService, AttachmentService, ObservationsService, ActionService, UserTaskService, HSEPlansService, NCRService, CustomerService, InspectionService, Forms, FileManagement, AuthServer, RMService, TMService, PTWService'.
Did not match: validationParameters.ValidAudience: 'AccountService' or validationParameters.ValidAudiences: 'null'.
Your
access_token
seems to be missing theAccountService
audience.
Aftering doing the suggisted change
we are getting the below issues for our services
PermissionRequirement: EmployeeService.Employees.Create
2024-01-22 12:58:41.151 +05:30 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: EmployeeService.Employees.Create
2024-01-22 12:58:41.174 +05:30 [WRN] Could not find the localization resource LeptonX on the remote server!
2024-01-22 12:58:41.178 +05:30 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: EmployeeService.Employees.Create
2024-01-22 12:58:41.206 +05:30 [WRN] Could not find the localization resource LeptonX on the remote server!
2024-01-22 12:58:41.207 +05:30 [WRN] Could not find the localization resource LeptonX on the remote server!
2024-01-22 12:58:41.208 +05:30 [WRN] Could not find the localization resource LeptonX on the remote server!
2024-01-22 12:58:41.208 +05:30 [WRN] Could not find the localization resource LeptonX on the remote server!
2024-01-22 12:58:41.208 +05:30 [WRN] Could not find the localization resource LeptonX on the remote server!
2024-01-22 12:58:41.208 +05:30 [WRN] Could not find the localization resource LeptonX on the remote server!
2024-01-22 12:58:41.211 +05:30 [WRN] Could not find the localization resource LeptonX on the remote server!
2024-01-22 12:58:42.601 +05:30 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: ObservationsService.Observations
2024-01-22 12:58:42.601 +05:30 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: IncidentService.IncidentManagements
2024-01-22 12:58:42.601 +05:30 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: InspectionService.AuditsManagements
2024-01-22 12:58:42.602 +05:30 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: InspectionService.InspectionManagements
Still we proceeded and tried the same but getting the below error as well
{ "code": "Volo.Account:RequirePermissionToImpersonateUser", "message": "Require AbpIdentity.Users permission to impersonate user!", "details": null, "data": { "PermissionName": "AbpIdentity.Users" }, "validationErrors": null }
My first question is this functionality and steps valid for ABP7?
the log is as follows
2024-01-17 17:38:46.244 +05:30 [INF] IDX10242: Security token: '[PII of type 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]' has a valid signature.
2024-01-17 17:38:46.244 +05:30 [INF] IDX10239: Lifetime of the token is valid.
2024-01-17 17:38:46.244 +05:30 [ERR] IDX10214: Audience validation failed. Audiences: 'IdentityService, AdministrationService, SaasService, EmployeeService, IncidentService, AttachmentService, ObservationsService, ActionService, UserTaskService, HSEPlansService, NCRService, CustomerService, InspectionService, Forms, FileManagement, AuthServer, RMService, TMService, PTWService'. Did not match: validationParameters.ValidAudience: 'AccountService' or validationParameters.ValidAudiences: 'null'.
2024-01-17 17:38:46.245 +05:30 [INF] Failed to validate the token.
Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'IdentityService, AdministrationService, SaasService, EmployeeService, IncidentService, AttachmentService, ObservationsService, ActionService, UserTaskService, HSEPlansService, NCRService, CustomerService, InspectionService, Forms, FileManagement, AuthServer, RMService, TMService, PTWService'. Did not match: validationParameters.ValidAudience: 'AccountService' or validationParameters.ValidAudiences: 'null'.
at Microsoft.IdentityModel.Tokens.Validators.ValidateAudience(IEnumerable`1 audiences, SecurityToken securityToken, TokenValidationParameters validationParameters)
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateAudience(IEnumerable`1 audiences, JwtSecurityToken jwtToken, TokenValidationParameters validationParameters)
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateTokenPayload(JwtSecurityToken jwtToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateJWS(String token, TokenValidationParameters validationParameters, BaseConfiguration currentConfiguration, SecurityToken& signatureValidatedToken, ExceptionDispatchInfo& exceptionThrown)
--- End of stack trace from previous location ---
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, JwtSecurityToken outerToken, TokenValidationParameters validationParameters, SecurityToken& signatureValidatedToken)
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken)
at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
has context menu
Please advise.
Hi,
Sorry for that, I forgot it is not included in the downloaded source code.
You can tell me which files you want to remove and I will repackage and share it with you
Thats fine, actually we would like to exclude webpack://leptonx/./node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js
Also, I have some suggitions
Yes, you can remove unnecessary files and repackage using webpack
ok we will give a try, but if possible in future release try to come up with an option to replace files in a pre-defned bundles at run time.
also please do share any reference link for the process using webpack in a abp.io way