Base solution for your next web application

Activities of "nagib.aouini"

Hi @elcinasyali , Did you find any solution for this keycloak integration issue?

Thanks

Question

Solved

Dear Support Team,

I am getting the unauthenticated error on localhost. I am able to create the access token using the https://localhost:44301/connect/token (screenshot 1) but the introspection is not working. It is giving an unauthorized error (screenshot 2).

Hi Team,

I am following below urls. https://support.aspnetzero.com/QA/Questions/9495/Identity-server4-integration-EntityFramework-EF-as-the-storage-mechanism https://github.com/aspnetboilerplate/aspnetboilerplate/issues/5757

I am implementing and creating the tables. I just wanted to confirm that am I on the right track? Is there any other help document which you can provide?

Hi This shows on error logs

Exceptions caught: 'System.NotSupportedException: IDX10634: Unable to create the SignatureProvider. Algorithm: 'HS256', SecurityKey: 'Microsoft.IdentityModel.Tokens.RsaSecurityKey, KeyId: '8754EC1B28DDFA079D97CF996304434D', InternalId: '9n57E3u1vGm2iMFnZ88ZR-wxeDNgPVQ1Z8zDUeKWTqs'.' is not supported. The list of supported algorithms is available here: https://aka.ms/IdentityModel/supported-algorithms at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateSignatureProvider(SecurityKey key, String algorithm, Boolean willCreateSignatures, Boolean cacheProvider) at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateForVerifying(SecurityKey key, String algorithm, Boolean cacheProvider) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(Byte[] encodedBytes, Byte[] signature, SecurityKey key, String algorithm, SecurityToken securityToken, TokenValidationParameters validationParameters) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) '. token: '{"alg":"HS256","typ":"JWT"}.{"sub":"2","name":"admin","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress":"[email protected]","aspnet.identity.securitystamp":"NTYXATPGVEXNZTKHHHVUE6DX6I3276UF","role":["Admin","2e4f924305dd44ec8270d07ddec8ae4d","fd553750180b45479df2f646d6cd782a"],"http://www.aspnetboilerplate.com/identity/claims/tenantId":"1","jti":"ebdc1c24-f310-4e52-9f0a-ef3b50ed4146","iat":1620030164,"token_validity_key":"e9ab3352-67c5-4b39-84ba-0d81be05e62a","user_identifier":"2@1","token_type":"0","refresh_token_validity_key":"7db0b7f6-1731-4ff2-bd9e-7784967a2125","nbf":1620030164,"exp":1620116564,"iss":"ADMIN","aud":"ADMIN"}'. at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken) at IdentityServer4.Validation.TokenValidator.ValidateJwtAsync(String jwt, IEnumerable`1 validationKeys, Boolean validateLifetime, String audience)

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 10.3
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core 5

Questions

  1. We activated the IdentitServer
  2. We access the .well-known/openid-configuration properly

"IdentityServer": { "IsEnabled": "true", "Authority": "https://localhost:44301/", "ApiName": "default-api",

The endpoint introspect https:/<app>/connect/introspect return an Error 404 ! like explained here https://identityserver4.readthedocs.io/en/latest/endpoints/introspection.html

<head> <title>ADMIN - Error</title>

&lt;link href=&quot;/view-resources/Views/Error/Index.css?v=8chyDsqrMk2dqzEb9NwpgKudCaENhDdlvh6dpWmjNzY&quot; rel=&quot;stylesheet&quot; /&gt;

</head> <div class="m-error_container"> <span class="m-error_title"> <h1> Error! </h1> </span> <p class="m-error_subtitle"> An internal error occurred during your request! </p> <p class="m-error_description"> </p> </div>

How we can access all IdentityServer endpoint so an external app can check accessToken and userInfo ?

Thanks for your support. was a uppercase pb on Linux agent for Azure devOPS

Hi We fixed tha path issue as it was requested /App on the dowload and linux VM look for /app

But this is not helping us

  • Can you please help us to make a functional Dockerfile for MVC project that include the npm run build for Azure Pipeline
  • same for Angular project

Does anyone have a full functional Azure pipeline that build and push docker image ?

Cheers

If i build on a Windows agent machine, it works, so i conclude a pb with path on ubuntu ? or linux ?

============================================================================== Task : Command line Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows Version : 2.182.0 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line

Generating script. ========================== Starting Command Output =========================== "C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a_temp\23803865-00f0-4939-8aef-7e44aca3150d.cmd"" The system cannot find the path specified.

[email protected] build D:\a\1\s\src\xxxxx.ADMIN.Web.Mvc yarn && gulp build

yarn install v1.17.3 warning package.json: No license field warning [email protected]: No license field [1/4] Resolving packages... success Already up-to-date. Done in 0.56s. [12:56:20] Using gulpfile D:\a\1\s\src\xxxxx.ADMIN.Web.Mvc\gulpfile.js [12:56:20] Starting 'build'... File not found: D:\a\1\s\src\xxxxx.ADMIN.Web.Mvc\node_modules\gridstack\dist\gridstack.jQueryUI.min.js File not found: D:\a\1\s\src\xxxxx.ADMIN.Web.Mvc\wwwroot\view-resources\Areas\App\Views\DynamicEntityProperties_CreateOrEditModal.js [12:59:12] Finished 'build' after 2.87 min Finishing: NPM RUN build task

Hi In Azure pipeline, it does not work to create a docker image --> Are you able to have a working Azure Pipeline which create a docker image ?

Step 23/40 : RUN npm --version ---> Running in 01488bb0eb64 7.5.1 Removing intermediate container 01488bb0eb64 ---> ee95627dd624 Step 24/40 : RUN gulp --version ---> Running in df3b02c8bf1a CLI version: 2.3.0 Local version: Unknown Removing intermediate container df3b02c8bf1a ---> bfc87e02ad2a Step 25/40 : RUN yarn && gulp build ---> Running in 9ddb87ca676a yarn install v1.22.5

Step 25/40 : RUN yarn && gulp build ---> Running in 9ddb87ca676a yarn install v1.22.5 warning package.json: No license field warning [email protected]: No license field [1/4] Resolving packages... [2/4] Fetching packages... warning [email protected]: Unable to read "./man" directory of module "json2" warning [email protected]: Unable to read "./man" directory of module "joosex-simplerequest" warning [email protected]: Unable to read "./man" directory of module "joose" warning [email protected]: Unable to read "./man" directory of module "joosex-namespace-depended" info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > [email protected]" has incorrect peer dependency "bootstrap@^3.1.1". warning " > [email protected]" has incorrect peer dependency "[email protected]". warning "js-url > [email protected]" has unmet peer dependency "grunt@>=1.0.3". [4/4] Building fresh packages... Done in 32.83s. [12:30:29] Using gulpfile /app/gulpfile.js [12:30:29] Starting 'build'... .....

[12:30:29] Error: Invalid glob argument: at Gulp.src (/app/node_modules/vinyl-fs/lib/src/index.js:20:11) at createScriptBundle (/app/gulpfile.js:150:23) at createScriptBundles (/app/gulpfile.js:139:13) at build (/app/gulpfile.js:270:23) at build (/app/node_modules/undertaker/lib/set-task.js:13:15) at bound (node:domain:416:15) at runBound (node:domain:427:12) at asyncRunner (/app/node_modules/async-done/index.js:55:18) at processTicksAndRejections (node:internal/process/task_queues:76:11) The command '/bin/sh -c yarn && gulp build' returned a non-zero code: 1 ##[error]The command '/bin/sh -c yarn && gulp build' returned a non-zero code: 1 ##[error]The process '/usr/bin/docker' failed with exit code 1 Finishing: Build and push an image to container registry

Showing 1 to 10 of 14 entries