-
Notifications
You must be signed in to change notification settings - Fork 15
refactor(PLATENG-800): replace platform-sdk-fetch with integration-sdk-http-client #1188
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
Open
tokio-on-jupiter
wants to merge
62
commits into
main
Choose a base branch
from
feat/PLATENG-800-replace-lifeomic-alpha
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
6971902
feat(PLATENG-800): Replace @lifeomic/alpha with @jupiterone/platform-…
tokio-on-jupiter a5d54cd
feat: Create standalone canary release workflow for public repo
tokio-on-jupiter edc838f
security: Add authorization checks and environment protection
tokio-on-jupiter bbb421d
fix: Update platform-sdk-fetch to released version and fix compression
tokio-on-jupiter 8c8f89f
fix: Resolve TypeScript errors with bunyan logger method spreads
tokio-on-jupiter fe0bf10
fix: resolve TypeScript build errors from platform-sdk-fetch types
tokio-on-jupiter 64f4c70
test: update tests to remove axios dependency
tokio-on-jupiter 3dc152a
fix: Use platform-sdk-fetch canary with rawBody support
tokio-on-jupiter 913c41a
chore: trigger new canary release for rawBody fix
tokio-on-jupiter 7dfa433
fix: Default compressUploads to true to match Alpha behavior
tokio-on-jupiter cc4bd3c
chore: Update platform-sdk-fetch to 6.0.5-canary-490-1.0
tokio-on-jupiter a75e659
fix: Address Copilot review comments
tokio-on-jupiter 9c1ff51
chore: Update package-lock.json for new canary version
tokio-on-jupiter 79fb2a0
chore: Update platform-sdk-fetch to released version 6.0.5
tokio-on-jupiter 0cc75ac
Address Copilot review feedback
tokio-on-jupiter 9092e54
Update packages/integration-sdk-testing/src/logger.ts
tokio-on-jupiter f32a192
Fix npm install by overriding platform-sdk-logging version
tokio-on-jupiter 709d8f6
Fix npm auth in CI workflow
tokio-on-jupiter 58887b2
Fix test mocks to return proper RequestClientResponse objects
tokio-on-jupiter 4197e28
Fix remaining test mock type issues
tokio-on-jupiter 9283abd
fix: pin transitive dependencies and update tests for compression def…
tokio-on-jupiter 2e8950e
fix: address PR review comments
tokio-on-jupiter a4f4a83
fix: address mscottford review feedback
tokio-on-jupiter 6e5c211
feat: add createMockApiClient utility to integration-sdk-testing
tokio-on-jupiter f9b63dd
fix: address PR review comments (items 1-6)
tokio-on-jupiter a030e3f
fix: remove all as any violations from PR diff
tokio-on-jupiter 6a25049
fix: replace err: any with unknown in cleanRequestError
tokio-on-jupiter 57df822
fix: add skipLibCheck to tsconfig.json files for CI build compatibility
tokio-on-jupiter c5b812c
fix: use isRequestClientError type guard in cleanRequestError
tokio-on-jupiter c2106ff
fix: warn instead of throw for deprecated alphaOptions/proxyUrl
tokio-on-jupiter c76c257
fix: use process.emitWarning instead of console.warn
tokio-on-jupiter acc9b2e
fix: upgrade fast-xml-parser to 5.3.4 for CVE-2026-25128
tokio-on-jupiter 2c90c03
refactor: add mockApiClient subpath export to avoid polly conflict
tokio-on-jupiter 3d3ddef
Update package.json
tokio-on-jupiter 425f112
refactor: migrate from Lerna to NX build system
tokio-on-jupiter cb40d4b
fix: retain lerna.json for canary workflow compatibility
tokio-on-jupiter eb4d1aa
chore: remove unnecessary npm overrides
tokio-on-jupiter 2453844
feat(runtime): add JupiterOneApiClient scaffold with constructor and …
tokio-on-jupiter dcdff8d
feat(runtime): add post/get methods with response mapping and rawBody…
tokio-on-jupiter ed8ccb2
test(runtime): add gzip rawBody tests for JupiterOneApiClient
tokio-on-jupiter bcca06d
refactor(runtime): replace platform-sdk-fetch with JupiterOneApiClient
tokio-on-jupiter c5fd1a4
chore(runtime): remove platform-sdk-fetch dependency
tokio-on-jupiter b8fab32
fix(runtime): remove unnecessary await on sync getAuthorizationHeaders
tokio-on-jupiter 5703ada
fix(testing): remove stale ts-expect-error directive in logger
tokio-on-jupiter fac25ab
fix(cli): replace platform-sdk-fetch type imports with runtime ApiClient
tokio-on-jupiter e954207
fix(build): add http-client to runtime tsconfig references and fix bu…
tokio-on-jupiter ebee73a
fix(cli): remove stale platform-sdk-fetch reference from test comment
tokio-on-jupiter 39141de
fix(deps): bump axios 1.13.4 → 1.13.5 (CVE-2026-25639)
tokio-on-jupiter 1aa509a
refactor(runtime): address PR review feedback
tokio-on-jupiter 4f9d2cd
pinned nx to 22.5.3
tokio-on-jupiter d5f101e
fix(deps): regenerate lockfile for nx 22.5.3 with npm 10
tokio-on-jupiter 3539b1f
fix(deps): pin minimatch to 10.2.4 (CVE-2026-27903, CVE-2026-27904)
tokio-on-jupiter 69dc77e
fix(deps): align @sinclair/typebox to 0.32.30 across workspace
tokio-on-jupiter 9ab7064
chore: format files to pass prettier check
tokio-on-jupiter fe6e553
fix(runtime): address PR review — restore retryOptions/proxyUrl, refa…
tokio-on-jupiter 7ec50b1
fix(runtime): remove all as-any casts and eslint-disable overrides fr…
tokio-on-jupiter 6217e7d
fix(runtime): remove unnecessary async from TestableApiClient overrid…
tokio-on-jupiter c9b85e3
fix(deps): upgrade lerna to v9 to resolve octokit CVEs
tokio-on-jupiter bf43e49
fix(runtime): move rawBody support into BaseAPIClient, remove node-fe…
tokio-on-jupiter 824c025
fix(runtime): remove unnecessary async from request override
tokio-on-jupiter b4134d0
fix(testing): add node-fetch as devDependency for recording tests
tokio-on-jupiter 0d58081
fix(deps): upgrade lerna to v9 to resolve octokit CVEs
tokio-on-jupiter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,3 +16,7 @@ yarn-error.log | |
| *.bak.* | ||
|
|
||
| tsconfig.tsbuildinfo | ||
| *.tsbuildinfo | ||
|
|
||
| # NX | ||
| .nx/ | ||
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
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
167 changes: 167 additions & 0 deletions
167
docs/plans/2026-02-06-platform-sdk-public-publishing-design.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,167 @@ | ||
| # Platform SDK Public Publishing Design | ||
|
|
||
| **Date:** 2026-02-06 **Status:** Approved for implementation **Authors:** Toks | ||
| Fawibe, Ryan McAfee (security analysis) **Context:** PLATENG-800 — PR #1188 adds | ||
| `@jupiterone/platform-sdk-fetch` (private) as a dependency of `@jupiterone/sdk` | ||
| (public). External consumers cannot install private transitive deps. | ||
|
|
||
| --- | ||
|
|
||
| ## Problem | ||
|
|
||
| `@jupiterone/sdk` is public on npm. PR #1188 replaces `@lifeomic/alpha` with | ||
| `@jupiterone/platform-sdk-fetch`, which has | ||
| `publishConfig.access: "restricted"`. Five of its transitive `@jupiterone/*` | ||
| dependencies are also restricted. External consumers cannot `npm install` the | ||
| SDK after this change merges. | ||
|
|
||
| ## Decision | ||
|
|
||
| Make 17 platform-sdk packages public with MPL-2.0 license. This was chosen over: | ||
|
|
||
| - **Vendoring the RequestClient** (~400 lines) — Viable but creates maintenance | ||
| burden and divergence from upstream. | ||
| - **Using `undici` directly** — Requires rewriting ~460 lines + tests. | ||
| Unnecessary complexity. | ||
| - **Bundling with tsdown/tsup** — 8-15 days effort, fragile DTS inlining, | ||
| massive bundle from unused AWS SDK clients. Not recommended. | ||
| - **Native `fetch`** — Experimental on Node 18-20 (SDK's target range). Not | ||
| viable until engine constraint is raised to >=21. | ||
|
|
||
| ## Security Assessment | ||
|
|
||
| Ryan McAfee performed a full assessment of all 21 platform-sdk packages. | ||
| Independent verification audit confirmed his findings across 107+ source files. | ||
|
|
||
| ### Classification | ||
|
|
||
| | Tier | Count | Packages | | ||
| | ------------------------ | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | Safe to publish | 14 | config-reader, errors, fetch, graphql, koa, logging, message-codec, service, service-plugin-errors, service-plugin-health, service-types, sqs-consumer, test-tools, framework | | ||
| | Safe after minor cleanup | 3 | aws, headers, iam | | ||
| | Keep restricted | 2 | elasticsearch, observability | | ||
| | Keep private | 2 | benchmark, examples | | ||
|
|
||
| ### Findings Summary | ||
|
|
||
| - Zero HIGH or CRITICAL issues across all 17 packages | ||
| - All hardcoded credentials found are verified LocalStack mocks (`test`/`test`) | ||
| - All URLs in source/tests are generic placeholders (`example.com`, `localhost`) | ||
| - Common LOW finding: `development@jupiterone.com` team email in `package.json` | ||
| author fields (standard npm convention) | ||
| - Common INFORMATIONAL: GitHub usernames and Jira ticket prefixes in CHANGELOGs | ||
|
|
||
| ## Implementation Plan | ||
|
|
||
| ### Execution Order | ||
|
|
||
| Packages must be published bottom-up (dependencies before dependents): | ||
|
|
||
| ``` | ||
| Layer 1 (no @jupiterone deps): | ||
| config-reader, errors, service-types, test-tools, headers*, iam* | ||
|
|
||
| Layer 1.5: | ||
| aws* (depends on config-reader) | ||
|
|
||
| Layer 2 (depends on Layer 1): | ||
| logging (-> errors) | ||
|
|
||
| Layer 3 (depends on Layer 2): | ||
| fetch (-> logging, errors, aws) | ||
| message-codec (-> logging, errors) | ||
| koa (-> logging, errors) | ||
| graphql (-> errors) | ||
| service-plugin-errors (-> errors) | ||
| service-plugin-health (-> errors) | ||
| sqs-consumer (-> logging) | ||
| service (-> logging, errors) | ||
|
|
||
| Layer 4 (depends on Layer 3): | ||
| framework (-> config-reader, errors, iam, logging) | ||
|
|
||
| * = caution packages requiring minor code fixes | ||
| ``` | ||
|
|
||
| Since platform-sdk uses NX with independent versioning in a single monorepo, all | ||
| changes go in one PR and publish together. | ||
|
|
||
| ### Changes | ||
|
|
||
| **All 17 packages** — `package.json`: | ||
|
|
||
| ```diff | ||
| - "license": "UNLICENSED", | ||
| + "license": "MPL-2.0", | ||
|
|
||
| "publishConfig": { | ||
| - "access": "restricted" | ||
| + "access": "public" | ||
| } | ||
| ``` | ||
|
|
||
| **`platform-sdk-aws`** — `src/config.ts:44`: | ||
|
|
||
| ```diff | ||
| - (awsProfile === 'jupiterone-dev' ? 'us-east-1' : undefined) | ||
| + (process.env.AWS_DEFAULT_REGION || undefined) | ||
| ``` | ||
|
|
||
| **`platform-sdk-headers`** — `src/index.ts:120-121`: | ||
|
|
||
| ```diff | ||
| - // The JupiterOne-Forwards-acirciapo header is set by our CF distribution and gateways | ||
| - // based on how many additional forwards there are between the CF distribution and the lambda: | ||
| + // The JupiterOne-Forwards-acirciapo header is set by the CDN distribution and gateways | ||
| + // based on how many additional forwards there are between the CDN distribution and the handler: | ||
| ``` | ||
|
|
||
| **`platform-sdk-iam`** — No code change. The `lifeomic-*` header names are a | ||
| runtime contract across all consumers. Renaming would be a breaking change. Not | ||
| a security vulnerability. | ||
|
|
||
| **Root** — Add `LICENSE` file with MPL-2.0 text. Update root `package.json` | ||
| license to `MPL-2.0`. | ||
|
|
||
| ### PR Strategy | ||
|
|
||
| Single PR to `platform-sdk` repo: | ||
|
|
||
| - Title: `chore: publish 17 packages as public with MPL-2.0 license` | ||
| - 17 `package.json` updates | ||
| - 2 code fixes (aws, headers) | ||
| - Root LICENSE file + root package.json license field | ||
|
|
||
| ### Validation | ||
|
|
||
| **Before merge:** | ||
|
|
||
| 1. CI passes (all existing tests) | ||
| 2. Verify `platform-sdk-aws` config change doesn't break tests | ||
| 3. `npm pack` dry-run on a few packages to inspect tarball contents | ||
|
|
||
| **After platform-sdk publishes:** 4. Verify public access from unauthenticated | ||
| environment: | ||
|
|
||
| ``` | ||
| npm view @jupiterone/platform-sdk-fetch | ||
| npm view @jupiterone/platform-sdk-errors | ||
| npm view @jupiterone/platform-sdk-logging | ||
| ``` | ||
|
|
||
| 5. Trigger new SDK canary on PR #1188, deploy to dev, check NR logs | ||
| 6. External consumer simulation: | ||
| `npm install @jupiterone/integration-sdk-runtime@canary` in a clean directory | ||
| without `.npmrc` auth | ||
|
|
||
| ### Rollback | ||
|
|
||
| npm allows deprecating or unpublishing within 72 hours. Security audit confirmed | ||
| no sensitive data, so rollback is unlikely to be needed. | ||
|
|
||
| ### Timeline | ||
|
|
||
| 1. Create platform-sdk PR — ~1 hour | ||
| 2. Review & merge — same day | ||
| 3. Publish completes — automated via CI | ||
| 4. Validate SDK canary — ~30 minutes |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.