-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Provide alternative for e2e #8109
Copy link
Copy link
Closed
Labels
confidential-clientIssues regarding ConfidentialClientApplicationsIssues regarding ConfidentialClientApplicationsfeature-unconfirmedmsal-angularRelated to @azure/msal-angular packageRelated to @azure/msal-angular packagemsal-browserRelated to msal-browser packageRelated to msal-browser packagepublic-clientIssues regarding PublicClientApplicationsIssues regarding PublicClientApplicationsquestionCustomer is asking for a clarification, use case or information.Customer is asking for a clarification, use case or information.
Metadata
Metadata
Assignees
Labels
confidential-clientIssues regarding ConfidentialClientApplicationsIssues regarding ConfidentialClientApplicationsfeature-unconfirmedmsal-angularRelated to @azure/msal-angular packageRelated to @azure/msal-angular packagemsal-browserRelated to msal-browser packageRelated to msal-browser packagepublic-clientIssues regarding PublicClientApplicationsIssues regarding PublicClientApplicationsquestionCustomer is asking for a clarification, use case or information.Customer is asking for a clarification, use case or information.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Core Library
MSAL.js (@azure/msal-browser)
Wrapper Library
MSAL Angular (@azure/msal-angular)
Public or Confidential Client?
Confidential, Public
Description
In msal-angular 3.0.16 I could fake a valid login by putting a custom json into the localStorage.
With 4.0.20, encryption was added, So I no longer have the option to run my tests.
Checking the documentation, I was shocked. In my opinion, you cannot expect people to create a test user and store those credentials in code.
Relying on a fully functional productive login would also require a connection to the microsoft services.
What if the connection is unstable and my Tests are flaky/flipping?
Also having the need for a test user would create cost for a license, no?
Since the user needs to be able to login and have permissions. Which would also be a security issue, if all the company members could login with the test user and change data "anonymous".
There should be a better way to create a valid login for e2e. Since we mock all requests to our API, we will never have any problems with a user which does not actually exist. Permission checks are always executed on the server, so even if that code would leak into propduction and users could fake their login, they cannot pass the api