Azure / Azure/azure-functions-host
EasyAuth breaks test within portal Code + Test
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
#### Investigative information
Please provide the following:
- Timestamp:
- Function App version: 3
- Function App name: usos1fap01-tecsys-agvance-middleware
- Function name(s) (as appropriate): *any*
- Invocation ID:
- Region:
#### Repro steps
Provide the steps required to reproduce the problem:
1. enable azure ad auth for your function app per https://docs.microsoft.com/en-au/azure/app-service/configure-authentication-provider-aad?toc=/azure/azure-functions/toc.json making sure auth is required

2. nav to your app root so you can establish an auth'd session
2. attempt to test one of your apps functions in code + test flow
3. receive 401
#### Expected behavior
Expect auth to be integrated in some way so that we can successfully test functions protected by easyauth
#### Actual behavior
receive 401's
#### Known workarounds
no known workarounds
#### Related information
easy auth was added back in #33
i'm pretty sure this has a lot to do with recent devs in SameSite cookies, the ecma request across the domains no longer includes the cookie in most scenarios. I can't force the cookie header through that UX either. maybe test needs to go iframe or new tab when easy auth is enabled. another option would be to have test use the /admin/functions path (https://docs.microsoft.com/en-us/azure/azure-functions/functions-manually-run-non-http#define-the-request-location) which apparently skips/bypasses easy auth????
A better option might be to offer the code + test interface right on the same host as the app...obviously that has lots of security issues
docs probably need to call out that the test part of code + test won't work with easy auth enabled
Contributor guide
Research direction
Start with the repro steps for Azure AD EasyAuth and the portal Code + Test flow, then investigate how the authenticated session is carried into function-test requests. Done means protected functions can be tested successfully, or the documentation clearly states that Code + Test is unsupported when EasyAuth is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- authentication, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100