Activities of "otee@urvin.finance"

After upgrading all my packages i get this in my application: Our solution is a microservice and this occurs in all services

We want to update the content in the grid on admin identity management page. We want to manipulate the data returned, use if for creating a link to a customized user's profile. We are finding it difficult to implement because our changes do not reflect on the page. We are making changes in the index.js file that does the call to get the list of users. We have put console log on the script but we didn't get any.

Note:

  1. Our application is Blazor Server
  2. We have downloaded the source code Volo.Identity.Pro
  3. We can't see where this application references the Volo.Identity.Pro.Web from our Blazor app. The only thing that comes close is Volo.Abp.Identity.Pro.Blazor.Server

In all how do we make a change to client/html on this page?

Question

Hello Support,

We get an error when will filter data on the admin section of our application it throws an error as below:

Severity = ERROR InvariantSeverity = ERROR SqlState = 0A000 MessageText = nondeterministic collations are not supported for substring searches File = varlena.c Line = 1209 Routine = text_position_setup

We are using postgres db and we don't get this error in our application because we set the collation used in filtering. We changed our db collation to Provider (icu), Locale(en-u-ks-primary). This ensures our db is case insensitive.

This is one of the points we get this error IdentityUserAppService.GetListAsyncfound in Volo.Abp.Identity namespace

We get same error in other location but once we fix this we can handle others. In this method the error comes up calling UserRepository.GetCountAsync method

In our own code to prevent this error we do something like the code below for filtering:

 queryable = queryable.Where(u => EF.Functions.Collate(u.Name, "default").ToLower().Contains(filter)
              || EF.Functions.Collate(u.Surname, "default").ToLower().Contains(filter));

Hello Support,

We are ready to deploy our application on Azure Kubernetes. We have a challenge with certificate. How do we deploy our microservice so they communicate via http and the services don't expect a certificate.

We get the error below when the application is starting:

[01:51:50 INF] Initialized all ABP modules. [01:51:51 FTL] UrvinFinance.DataService.HttpApi.Host terminated unexpectedly! Interop+Crypto+OpenSslCryptographicException: error:2006D080:BIO routines:BIO_new_file:no such file at Interop.Crypto.CheckValidOpenSslHandle(SafeHandle handle) at Internal.Cryptography.Pal.OpenSslX509CertificateReader.FromFile(String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Certificates.CertificateConfigLoader.LoadCertificate(CertificateConfig certInfo, String endpointName) at Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.LoadDefaultCert() at Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.Reload() at Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.Load() at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at UrvinFinance.DataService.Program.Main(String[] args) in /Users/robertbordeaux/localProd/urvin/UrvinTerminal/services/data/src/UrvinFinance.DataService.HttpApi.Host/Program.cs:line 40

Regards, Otee

I added this line of code in PreConfigureServices section of AuthServer

PreConfigure<IdentityOptions>(builder => { builder.Lockout = new LockoutOptions { AllowedForNewUsers = Convert.ToBoolean(configuration.GetSection("UserLockOutOptions:AllowedForNewUsers").Value), MaxFailedAccessAttempts = Convert.ToInt32(configuration.GetSection("UserLockOutOptions:MaxFailedAccessAttempts").Value), }; });

It should set LockoutEnabled to false for new users but this still remains true. I also tried same in PostConfigureServices and ConfigureServices

I read this suggestion here https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4029 one of the suggestions is similar to my implementation. The second one is using AbpZero . I might need a license for it and not sure it will work.

I created an IExtensionGrantValidator using the code below. I want the code to be hit **ValidateAsync ** when i request a token using the grant type named delegation.

public class DelegationGrantValidator : IExtensionGrantValidator
    {
        private readonly UserManager<IdentityUser> _userManager;

        public string GrantType => "delegation";

        public DelegationGrantValidator(UserManager<IdentityUser> userManager)
        {
            _userManager = userManager;
        }
        
        public async Task ValidateAsync(ExtensionGrantValidationContext context)
        {
            var userId = context.Request.Raw.Get("user_id");

            var user = await _userManager.FindByIdAsync(userId);

            if (user == null)
            {
                context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant);
                return;
            }
            else
            {
                var userClaims = await _userManager.GetClaimsAsync(user);
                var claimsIdentity = new ClaimsIdentity(userClaims);
                var claimsPrincipal = new ClaimsPrincipal(claimsIdentity);
                context.Result = new GrantValidationResult(claimsPrincipal);

                return;
            }
        }
    }

I registered the grant as below:

public override void PostConfigureServices(ServiceConfigurationContext context)
    {
        var hostingEnvironment = context.Services.GetHostingEnvironment();
        
        context.Services.Configure<IIdentityServerBuilder>(builder =>
        {
            builder.AddExtensionGrantValidator<DelegationGrantValidator>();
        });
    }

I get an error when i call the token endpoint on AuthServer as below using :

2022-03-14 13:53:45.997 +01:00 [ERR] No validator is registered for the grant type{"grantType":"delegation"}, details: {"ClientId":"UrvinFinance_BlazorServer","ClientName":"UrvinFinance_BlazorServer","GrantType":"delegation","Scopes":null,"AuthorizationCode":"********","RefreshToken":"********","UserName":null,"AuthenticationContextReferenceClasses":null,"Tenant":null,"IdP":null,"Raw":{"grant_type":"delegation","username":"admin","token":"1q2w3E*","client_id":"UrvinFinance_BlazorServer","client_secret":"***REDACTED***"},"$type":"TokenRequestValidationLog"}
2022-03-14 13:53:46.009 +01:00 [INF] {"ClientId":"UrvinFinance_BlazorServer","ClientName":"UrvinFinance_BlazorServer","RedirectUri":null,"Endpoint":"Token","SubjectId":null,"Scopes":null,"GrantType":"delegation","Error":"unsupported_grant_type","ErrorDescription":null,"Category":"Token","Name":"Token Issued Failure","EventType":"Failure","Id":2001,"Message":null,"ActivityId":"0HMG5N6KTSCAB:00000002","TimeStamp":"2022-03-14T12:53:46.0000000Z","ProcessId":35236,"LocalIpAddress":"::1:44322","RemoteIpAddress":"::1","$type":"TokenIssuedFailureEvent"}

Note: I've registered the granttype for on the client. I also tried configuring in ConfigureService and PreConfigureService of AuthServer.

I also removed my code and followed the documentation on identity server. https://identityserver4.readthedocs.io/en/aspnetcore2/topics/extension_grants.html#refextensiongrants I got same error.

I've added two columns to my IdentityUser table on their separate columns. The columns are Title and Nickname,

How do i search IdentityUser table by the extended field named Nickname to return the user?

Regards, Otee

I've looked and confirmed all my packages are pointing to the downloaded source code.

The dll generated is version 1.0.0.0 because i downloaded the source code of Account & Identity. But for some reason the application is looking for 5.1.3.0.

I had to add binding redirect on the blazor server app web.config as below.

&lt;runtime&gt;
	&lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;&gt;
		&lt;dependentAssembly&gt;
			&lt;assemblyIdentity name=&quot;Volo.Abp.Identity.Pro.Application.Contracts&quot; culture=&quot;neutral&quot; publicKeyToken=&quot;null&quot;/&gt;
			&lt;bindingRedirect oldVersion=&quot;5.1.3.0&quot; newVersion=&quot;1.0.0.0&quot;/&gt;
		&lt;/dependentAssembly&gt;
	&lt;/assemblyBinding&gt;
&lt;/runtime&gt;

But still got same error.

[blazor_d19aee54-b]: System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.Identity.Pro.Application.Contracts, Version=5.1.3.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (0x80131040) [blazor_d19aee54-b]: File name: 'Volo.Abp.Identity.Pro.Application.Contracts, Version=5.1.3.0, Culture=neutral, PublicKeyToken=null'

All other apps work as they should but the blazor server app doesn't work.

I've seen suggestions that says i should download some other project because something else might be referencing version 5.1.3.0. I don't even know which project is affecting so i don't know which project to download.

Zobrazeno od 1 do 8 z celkem 8 záznamů
Made with ❤️ on ABP v8.2.0-preview Updated on března 25, 2024, 15:11