Repository navigation
feat(agent-vault): require the Agent Vault project with project_id - #68
Conversation
|
💬 Discussion in Slack: #pr-review-python-sdk-official-68-feat-agent-vault-choose-the-agent-vault-project Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel. |
[Medium impact] The PR appears safe to merge.
|
scott-ray-wilson
left a comment
There was a problem hiding this comment.
Ran the project-level Agent Vault methods from this branch against Infisical/infisical#9160 locally (proxies, access bundles, every delegation method, sessions create, list and revoke), and tests/test_agent_vault.py passes. One small gap: AgentVaultSession and CreatedAgentVaultSession don't include projectId, which the server now returns when a session is created, so it's dropped. The guides in Infisical/infisical#9160 already call project_id=, so this needs to release before or with that PR.
|
Added |
Adds a required
project_idto the Agent Vault methods that list or create something in a project, now that an organization can have several Agent Vault projects. Like the CLI, the SDK needs the project named on every one of these calls, so this is a breaking change for Agent Vault callers:proxies.list/proxies.createsessions.list/sessions.createaccess_bundles.list/access_bundles.createdelegationsmethod, since a delegation is addressed by its machine identity, which can be in several projectsproject_idis keyword-only and comes after the existing parameters, so positional arguments keep their places and a call without it raisesTypeErrorbefore any request.Lists send it as
projectIdin the query and creates in the JSON body. Delegations always send it in the query, whatever the method, because that's where the server reads it on those routes. Methods that take a proxy, session or access bundle ID are unchanged: the server reads the project from that.To send a query string on PUT, POST and DELETE,
InfisicalRequestswrite methods take an optionalparams.Infisical PR: Infisical/infisical#9160
CLI PR: Infisical/cli#488
Node SDK PR: Infisical/node-sdk-v2#47