- ABP Framework version: v8.2
- UI Type: Blazor Server
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
I am working through a CI / CD implementation using Azure Deployment slots. I have a tiered application that I am trying to get deployed correctly. This is just a basic, no changes, out of the box 3 tier application generated by ABPSuite that I use as a base dev environment for testing.
First problem is that I can not see the full menu for the admin user in the tiered app on neither dev nor production. However in dev everything works as expected, I can create users, and I am authenticated as admin ( it seems ).
For reference, I created a single tier app, and I see the admin user menu as I would expect:
So I would expect to see this menu in my tiered app. They were created exactly the same time, same 8.2 version number, no code updates, just out of the box ABP. But I do not get the user / admin menu in my fresh and clean 3 tier app.
The real issue here is when I deploy a 3 tier app using Azure Deployment Slots to a staging environment on Azure. I can log in OK, and I get the same no options Admin menu as I got in my local dev environment:
However I can’t see any admin menu, and I get an Unauthorized exception after trying to do anything. Even though I seem to be logged in as the admin user.
After Refresh:
This to me seems like a configuration issue, but I can not seem to see any difference in config between environments.
Any insight would be much appreciated.
Thanks,
Karim Ainsworth
39 Answer(s)
-
0
hi
Please test the new commits in your stage environment.
https://github.com/Flo3Digital/Flo3BlazorDev/commits/master/
Thanks.
-
0
Hi,
OK I had some difficulty with GitHub Actions there, took me some time to get deployed to staging but I have merged the code you added into Staging, redeployed and have emailed you all 3 DEBUG logs now.
For some reason though, I don't see any of the JWTBearerOptions logging in the staging logs, similar to last time. And I cleaned out and reran this twice. However on dev I do see the logging:
Thanks,
Karim
-
0
hi
I don't see any of the JWTBearerOptions logging in the staging logs,
That's strange, We have to check the logs of staging apps.
We need to make sure the configuration is correct.
I have pushed the new commit. Can you try to deploy it again?
Thanks.
-
0
Hi,
OK i have updated and redeployed. I ran this in dev and I can see the logging you are trying to do, but there are no values for the Bearer Token or Issuer. Could that be it?
I still don't see anything in the deployed API logs, maybe you can see something, I have emailed both the DEV and STAGING API logs to you.
Thanks,
Karim
-
0
-
0
I have updated the new code to help you to check your configuration.
https://github.com/Flo3Digital/Flo3BlazorDev/commit/bc99a06899f4e60a1c7598ace3fd1cd27cf50e93
[09:37:43 ERR] AuthServer:Authority: https://localhost:44362 [09:37:43 ERR] JwtBearerOptions Authority: https://localhost:44362 [09:37:43 ERR] JwtBearerOptions Issuer: https://localhost:44362/ [09:37:43 ERR] JwtBearerOptions JwksUri: https://localhost:44362/.well-known/jwks [09:37:43 ERR] JwtBearerOptions ValidIssuers: https://localhost:44362/
-
0
Hi,
Ah yes, this was configured wrong:
Your AuthServer:Authority in the staging environment is https://fbd-auth.azurewebsites.net
I think this is the reason for the major errors on Staging. I have this configured correctly now, and also the new logging is working on the Staging environment. You can see now that I seem to be logged in as admin, and I can create a new Rock Star entity, so that is working.
However, as per the original question, there is no menu on the Admin profile. This is also the case in the dev environment. I can email you the current logs, for this screenshot with the updated logging, maybe you can see something in there that would cause this problem?
I see this in the Blazor App logs (FBD-STAGING), this looks like maybe why those menu items aren't showing, but how would those permissions not be set for the Admin user account?
Thanks,
Karim
-
0
hi
This is also the case in the dev environment.
Can I reproduce this with your
Flo3BlazorDev
project?If so, what are steps.
Thanks
-
0
Hi,
Yes you can. Just log in with admin , default password. You should get to that exact screen, where it does look like we are logged in however no profile menu. Use the staging branch, it is exactly what is deployed now.
Thanks,
Karim
-
0
-
0
Ah OK, that works, now the menu items are showing. However, when I click on My Account I am getting an exception thrown, also on Security Logs and Sessions, which seems like the same error from looking at the logs.
Seems like the currentUser isn't being set, is there something else we are missing here?
Thanks,
Karim
-
0
-
0
Hi,
Thank you, this all works now. Thanks for sticking with this, it was a long one, I appreciate your help.
Karim
-
0
Good news.