Skip to content

SDK doesn't return child folders (API does) #13

@4-9

Description

@4-9

How can I fetch all secrets from the base secret path /, the SDK however doesn't return any secret_paths or any secrets with them.
The API does, but requires turning on SSE, which still doesn't fix this issue in the SDK.

Example curl for the API query:

curl -s "https://api.phase.dev/v1/secrets/?app_id=some-guid&env=development" -H "Authorization: Bearer ${token}" | jq .
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "key": "ROLE",
    "value": "1157869835531845754",
    "comment": "",
    "tags": [
      "bob"
    ],
    "override": null,
    "path": "/mySpecialPath",
    "keyDigest": "abc",
    "version": 2,
    "createdAt": "2025-01-16T19:02:40.684526Z",
    "updatedAt": "2025-01-16T19:08:19.488552Z",
    "environment": "00000000-0000-0000-0000-000000000000",
    "folder": "00000000-0000-0000-0000-000000000000"
  },
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "key": "MY_TOKEN",
    "value": "M8",
    "comment": "",
    "tags": [
      "bob"
    ],
    "override": null,
    "path": "/",
    "keyDigest": "abc",
    "version": 2,
    "createdAt": "2025-01-16T19:09:03.722350Z",
    "updatedAt": "2025-01-16T19:09:10.305269Z",
    "environment": "00000000-0000-0000-0000-000000000000",
    "folder": null
  }
]

Searching with the same values in the SDK only results with a path of /

phase_client = Phase(
    init=False,
    host=PHASE_API_URL,
    pss=config['phase_secrets']['service_token']
)
opts = GetAllSecretsOptions(
    app_id='some-guid',
    env_name='development'
)
secrets = self.phase_client.get_all_secrets(opts)
...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions