mspnp / AzureNamingTool

The Azure Naming Tool is a .NET 8 Blazor application, with a RESTful API. The UI consists of several pages to allow the configuration and generation of Azure Resource names. The API provides a programmatic interface for the functionality.
https://aka.ms/azurenamingtool
MIT License
308 stars 604 forks source link

Azure App Service Logout #53

Closed koalajama closed 7 months ago

koalajama commented 7 months ago

Tool version 3.2.0

Describe the bug When logged in with Azure AD Authentication and users click the 'logout' button in the top right corner, the screen reloads and the "User: username@domain.com" banner goes away. I have my front-channel logout URL set to url/.auth/logout/complete, and after the user logs out, they are still able to use the tool.

To Reproduce Steps to reproduce the behavior:

  1. Setup Azure App Service Auth

Expected behavior Logging out would navigate to the Microsoft login screen. Requiring login before next use of the tool.

Screenshots If applicable, add screenshots to help explain your problem. NamingTool02 NamingTool01 NamingTool03

Installation Method Azure App Service

Additional context Add any other context about the problem here.

BryanSoltis commented 7 months ago

Hello @koalajama,

Thank you for your feedback. The Identity Provider support within the tool only looks at the incoming request and displays/associates activity with the identified user, if the specified headers are present (defined in the Admin utility). The tool does not "log" them in/out. If using Authentication with an Azure App Service, Azure Entra will inject a header into the incoming request. The Naming Tool will look for this header and, if present, display the user information. Additionally, if the user id is identified as an "admin", certain functionality will be available. When a user "logs out", they are telling the tool to not apply the Identity Provider information and function as a "normal" user.

You can find more details about the Identity Provider support in the following article:

https://soltisweb.com/blog/detail/2023-06-azurenamingtool-identityproviderintegrationdeepdive

Hope this helps!

-Bryan