Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Messaging] Fix Functions test host credential use #48389

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

jsquire
Copy link
Member

@jsquire jsquire commented Feb 21, 2025

Summary

The focus of these changes is to fix the approach used for token credential management in the Function extensions end-to-end tests for Event Hubs and Service Bus. The previous approach used simple logic to set in-memory configuration with assumptions about the test environment. These assumptions are no longer accurate with the security changes in the testing pipelines.

The new approach delegates to the test environment for credential management, as it has the conditional logic for environmental factors needed for credential selection and creation. The configuration-to-credential mapping and creation logic is part of the Microsoft.Extensions.Azure package and has full test coverage there; there is no benefit to duplicating test environment logic just to force Function configuration to control the credential locally for the test host.

References and resources

@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Functions test-reliability Issue that causes tests to be unreliable labels Feb 21, 2025
@jsquire jsquire added this to the 2025-03 milestone Feb 21, 2025
@jsquire jsquire self-assigned this Feb 21, 2025
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@jsquire
Copy link
Member Author

jsquire commented Feb 21, 2025

/azp run net - servicebus - functions - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

The focus of these changes is to fix the approach used for token credential
management in the Function extensions end-to-end tests for Event Hubs and Service
Bus.  The previous approach used simple logic to set in-memory configuration with
assumptions about the test environment.  These assumptions are no longer accurate
with the security changes in the testing pipelines.

The new approach delegates to the test environment for credential management, as
it has the conditional logic for environmental factors needed for credential
selection and creation.  The configuration-to-credential mapping and creation
logic is part of the `Microsoft.Extensions.Azure` package and has full test
coverage there; there is no benefit to duplicating test environment logic just to
force Function configuration to control the credential locally for the test host.
@jsquire jsquire force-pushed the servicebus/func-tests branch from 3a41948 to f492d32 Compare February 21, 2025 23:20
@jsquire
Copy link
Member Author

jsquire commented Feb 21, 2025

/azp run net - servicebus - functions - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jsquire
Copy link
Member Author

jsquire commented Feb 22, 2025

/azp run net - eventhub - functions - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jsquire jsquire marked this pull request as ready for review February 22, 2025 01:22
@jsquire jsquire merged commit 311d8f1 into Azure:main Feb 22, 2025
71 checks passed
@jsquire jsquire deleted the servicebus/func-tests branch February 22, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Functions test-reliability Issue that causes tests to be unreliable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants