Skip to content

Provide alternative for e2e #8109

@markusahrweileramcon

Description

@markusahrweileramcon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    confidential-clientIssues regarding ConfidentialClientApplicationsfeature-unconfirmedmsal-angularRelated to @azure/msal-angular packagemsal-browserRelated to msal-browser packagepublic-clientIssues regarding PublicClientApplicationsquestionCustomer is asking for a clarification, use case or information.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions