Need ability to set the DataPorta.SetPrincipal in report portal #3612
Replies: 1 comment 4 replies
-
@CProsRodneyWorkman I have converted this to a discussion, because I don't think this is a missing feature of CSLA as much as it is figuring out how to accomplish your goal within the context of Azure Functions and CSLA configuration. I haven't tried what you are doing, but can explain the basic expectations/behaviors of CSLA itself. The data portal can be configured in two ways. First and by default, the principal from the client doesn't flow to the server. This means that some code (yours? others?) has a way to flow the user identity from the client to the server. In this model, CSLA relies on the client and server environment to manage the user identity, and CSLA just picks up the identity from the environment. Second, with What I am hearing from your post is that you prefer the first option (which is good), and that you are having trouble passing the user identity from the client to the server using JWT when the server is hosted in an Azure Function. This is why I've converted this to a discussion, because the core problem here is how to pass a user identity into an Azure Function and set the current principal in the function before your code (and CSLA) starts to execute. I don't personally know the answer to this, but maybe someone else does? |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
I am using .Net 7 Azure Functions and Azure Functions does not allow me to use JWT authentication instead it is using Azure AD by default. I have been unable to get my Identity into the .Net Identities. As a measure of last resort I validate my JWT token and created my principal object. When I attached the principal to the ApplicationContext I get the NoPrincipalAllowedException.
Describe the solution you'd like
I would like a remote configuration option to attach my principal object without using EnableSecurityPrincipalFlowFromClient.
Describe alternatives you've considered
I am unable to configure Azure Functions to .AddAuthentication and to .UseAuthentication so .Net will not process my Bearer token. That is what I tried. What I found is that in a Azure Function I have no option to hook into the request pipeline before the function actually starts so I am unable to UseAuthentiaction.
Additional context
Add any other context or screenshots about the feature request here.
Beta Was this translation helpful? Give feedback.
All reactions