Deprecate skip_auth in favor of unauthenticated request option#501
Open
heyitsaamir wants to merge 2 commits into
Open
Deprecate skip_auth in favor of unauthenticated request option#501heyitsaamir wants to merge 2 commits into
heyitsaamir wants to merge 2 commits into
Conversation
Add dangerously_allow_unauthenticated_requests as the preferred option and support DANGEROUSLY_ALLOW_UNAUTHENTICATED_REQUESTS for env-based configuration. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Apps SDK authentication configuration by deprecating skip_auth in favor of a clearer, explicitly dangerous option (dangerously_allow_unauthenticated_requests), including support for enabling it via an environment variable.
Changes:
- Introduces
dangerously_allow_unauthenticated_requests(andDANGEROUSLY_ALLOW_UNAUTHENTICATED_REQUESTS) and normalizes internal option parsing/wiring. - Updates
HttpServerinitialization and request handling to use the new unauthenticated-request flag. - Updates unit tests and package README to reflect the new option and the deprecated compatibility path.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apps/src/microsoft_teams/apps/options.py | Adds env-var parsing + deprecated alias handling while mapping skip_auth to the new option. |
| packages/apps/src/microsoft_teams/apps/http/http_server.py | Switches server auth gating to dangerously_allow_unauthenticated_requests for JWT validation behavior. |
| packages/apps/src/microsoft_teams/apps/app.py | Wires the App’s resolved option into HttpServer.initialize(). |
| packages/apps/tests/test_app.py | Adds coverage for env-var configuration and deprecated skip_auth behavior; updates existing init tests. |
| packages/apps/tests/test_http_server.py | Updates server tests to use the new flag and adjusts related descriptions. |
| packages/apps/README.md | Documents how to disable JWT validation for local development using the new option/env var. |
Comment on lines
70
to
75
| def initialize( | ||
| self, | ||
| credentials: Optional[Credentials] = None, | ||
| skip_auth: bool = False, | ||
| cloud: Optional[CloudEnvironment] = None, | ||
| dangerously_allow_unauthenticated_requests: bool = False, | ||
| ) -> None: |
corinagum
approved these changes
Jul 9, 2026
lilyydu
approved these changes
Jul 9, 2026
Keep HttpServer as an internal implementation detail while preserving public HTTP adapter exports. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dangerously_allow_unauthenticated_requestsas the preferred app option.DANGEROUSLY_ALLOW_UNAUTHENTICATED_REQUESTSfor env-based configuration.skip_authas a deprecated alias withDeprecationWarning, while normalizing internal server wiring to the new option.Validation
uv run ruff checkuv run pyrightuv run pytest packagesuv run ruff format --checkstill reports pre-existing unrelated formatting drift in:examples/formatted-messaging/src/main.pypackages/api/src/microsoft_teams/api/models/entity/quoted_reply_entity.pypackages/api/tests/unit/test_message_activities.py