Repository navigation
[Draft] Default web-service-key auth and consolidate API test fixes - #12612
Closed
Prangshuman Das (t-prda) wants to merge 10 commits into
Closed
Prangshuman Das (t-prda) wants to merge 10 commits into
Prangshuman Das (t-prda) wants to merge 10 commits into
Conversation
Consolidate reviewed API re-enablement and fixture fixes on latest main. Prepare test-user keys in the runner transaction without committing fixtures. Bound the draft branch validation independently of the platform SQL fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Use the enum default, remove the no-op provider and runner coupling, and create keys only when missing or expired. Remove obsolete build-auth tests and AI feature tags; preserve clean-tenant execution. Correct Windows project keys for the bounded validation run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Resolve conflicts with #12323 (Http Web Request Mgt. -> HttpRequestMessage): - APITestAuthProviderTests: keep branch tests, use HttpRequestMessage - ExpenseAPITestAuthHelper: keep deletion (superseded by default web-key provider) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
- Remove unused 'Microsoft Test Environment' enum value; default implementation covers it - Restore 12 whitespace-only test files and LOCAL_DEV_ENV.md from main - CU 139494: rename first-use test, drop redundant server-mode and no-commit tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
After #12323 the API test library uses native HttpClient. The platform refuses to send SecretText headers to non-HTTPS endpoints, so every authenticated request to the local http:// test server failed before sending ('connecting endpoint violates security requirements', status 0). Keep credentials as SecretText and unwrap only the final header value in a NonDebuggable procedure, matching the previous Http Web Request Mgt. behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
TestExpandPdfDocument in Bl. Purch. Orders, Purch. Quotes and Purch. Ret. Shpts. E2E got 409 Conflict (record in Purchase Header / Return Shipment Header is being updated): under codeunit isolation the fixture lock is still held when the HTTP session's PDF rendering updates the header. Match APIV2 - PDF Document E2E (RequiredTestIsolation = Disabled) so fixture Commit() is effective. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Since #12323 the API test library uses native AL HttpClient, whose anti-SSRF validation blocks calls to local/private addresses. Every API test request to the container's own web services failed with 'connecting endpoint violates security requirements' (status 0). Set NavHttpClientAntiSSRFEnabled=false in the disposable test container, matching NAV Eng/Core/Scripts/RunALTests.ps1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
The security block was anti-SSRF, not SecretText headers; keep API Test Auth Context identical to main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
The API request is authenticated by a separate server session that only sees committed data, so a key created in the caller's open transaction caused 401 (unknown user) on the first request after creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Contributor
Author
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.
DO NOT MERGE - standalone authentication validation
AB#646383
AB#653393
This is a new branch directly from current
main(efc984a5d18e7f4ef3009a1917fbfd6c057a310b), not a stacked PR and not an uptake of the SQL diagnostic branch.Authentication
DefaultImplementation, with value zeroDefault. Remove the hardcoded library selection and theNone/no-op provider. Remove the unused explicitMicrosoft Test Environmentvalue; custom enum implementations remain supported.Key creation can participate in an existing caller transaction. First-use visibility to the independent HTTP session remains a required runtime check; this PR does not hide a fixture commit or claim concurrent key creation for the same tenant/user is serialized.
Consolidated reviewed fixes
Bounded diagnostic CI
This draft intentionally skips the ordinary heavy PR build only for this branch. Run the existing
CICD.yamlmanually once:These branch-only CI controls are diagnostic scaffolding to remove before promotion. Other branches retain their existing project selection and matrix limits.
Validation and remaining evidence
The initial run 37921988088 failed during project discovery, before any AL build or test: AL-Go retained explicitly listed project keys as supplied but normalized test-project targets to Windows separators. This revision corrects the project keys; the pinned discovery functions and all five target mappings were checked locally, including reproducing the old mismatch.
The obsolete credential PowerShell tests are deleted rather than replaced with new build-authentication code. Existing clean-tenant execution code remains unchanged. Static source/dependency checks and
git diff --checkpass; they are not runtime authentication evidence.AL compilation and real-server execution are pending. The earlier web-key experiment produced 401s; local platform IL exposed an unsafe caller-transaction path, but did not establish historical causality. This PR must prove first-use cross-session visibility and fixture isolation on the target runtime. Authentication results must be classified separately from the known SQL initialization race; retries or workflow green alone are not stability evidence.
The existing expanded-API experiment and the separate fixed-platform uptake experiment remain independent.