Skip to content

Commit 2def130

Browse files
sitolejakubno
andauthored
Flag for securing envd access with auth token (#688)
Waiting until secure flag will be available in production cluster. --------- Co-authored-by: Jakub Novák <[email protected]>
1 parent af0773b commit 2def130

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1897
-146
lines changed

.changeset/brave-clocks-burn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@e2b/python-sdk': minor
3+
'e2b': minor
4+
---
5+
6+
Added ability to secure communication with sandbox envd

packages/cli/src/commands/sandbox/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const listCommand = new commander.Command('list')
8282
})
8383

8484
export async function listSandboxes(): Promise<
85-
e2b.components['schemas']['RunningSandbox'][]
85+
e2b.components['schemas']['ListedSandbox'][]
8686
> {
8787
ensureAPIKey()
8888

packages/js-sdk/src/api/schema.gen.ts

Lines changed: 109 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/js-sdk/src/envd/api.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,15 @@ class EnvdApiClient {
9898
readonly version: string | undefined
9999

100100
constructor(
101-
config: Pick<ConnectionConfig, 'apiUrl' | 'logger'>,
101+
config: Pick<ConnectionConfig, 'apiUrl' | 'logger' | 'accessToken'> & { fetch?: (request: Request) => ReturnType<typeof fetch>, headers?: Record<string, string> },
102102
metadata: {
103103
version?: string
104-
}
104+
},
105105
) {
106106
this.api = createClient({
107107
baseUrl: config.apiUrl,
108+
fetch: config?.fetch,
109+
headers: config?.headers,
108110
// keepalive: true, // TODO: Return keepalive
109111
})
110112
this.version = metadata.version

0 commit comments

Comments
 (0)