feat(apps): add Testiny connector with a raw-header auth strategy - #466
Open
biztex wants to merge 1 commit into
Open
feat(apps): add Testiny connector with a raw-header auth strategy#466biztex wants to merge 1 commit into
biztex wants to merge 1 commit into
Conversation
Testiny's REST API (app.testiny.io/api/v1) authenticates with an API key sent raw in the X-Api-Key header - no Bearer prefix - which no existing AuthStrategy covers. Add a generic Header variant that injects the credential into a provider-named header, and use it for the Testiny provider. The variant also unblocks other raw-header providers (e.g. MantisHub's raw Authorization token, onecli#298). The permission catalog mirrors Testiny's uniform CRUD: per-entity read and write tools for projects, test cases and folders, test runs, test plans, milestones, and comments, plus the POST /find query endpoints as a read tool. The finds travel as POST, so the GET-only read wildcard is deliberately not a superset (Jira JQL precedent); the write wildcard gates every mutating method under /api/v1/* and is a true superset. Closes onecli#422
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.
I have read the CONTRIBUTING.md file.
YES
What kind of change does this PR introduce?
Feature — a new app connector, plus a small gateway auth-strategy addition it needs. Closes #422.
What is the current behavior?
Testiny is not in the app catalog. Its REST API (
app.testiny.io/api/v1) authenticates with an API key sent raw in theX-Api-Keyheader — noBearerprefix — and no existingAuthStrategy(Bearer / BasicXAccessToken / None) can express that, so the gateway has no way to inject a Testiny credential today.What is the new behavior?
Gateway: a generic
AuthStrategy::Header { name }variant that injects the raw credential into a provider-named header. It slots in beside the existing strategies (both injection match sites), with unit tests (providers_for_testiny_host,testiny_uses_raw_x_api_key_header). This also unblocks other raw-header providers — e.g. MantisHub (#298), whose API takes the raw token inAuthorization, would just beHeader { name: "authorization" }.A Testiny connector following the existing api_key shape (cf. Resend / Fly.io / Cloudflare):
X-Api-Keyonapp.testiny.io. Metadata is best-effort fromGET /api/v1/project(first visible project name); non-fatal./api/v1/<entity>, so the catalog has per-entity read and write tools for projects, test cases + folders, test runs (incl. recording results), test plans, milestones, and comments — plus thePOST /api/v1/<entity>/findquery endpoints as a read tool. The finds are reads that travel as POST, so the GET-only read wildcard is deliberately not advertised as a complete umbrella (same situation as Jira's JQL search, per thewildcardCoversGroupdocs); the write wildcard (POST/PUT/PATCH/DELETE /api/v1/*) is a true superset — over-gating the POST finds is the fail-closed direction. Verified by the wildcard-coverage suites (180 apps tests pass locally).Additional context
read_testruns+search_entities, which selective mode can grant without any write access.