Problem
An app workspace can give its sandbox a custom secret by overriding Workspace.get_secret_refs(). For example, a per-rep OAuth service connection that the secrets proxy swaps in on one host:
from druks.sandbox.models import SecretRef # internal module
class SalesforceWorkspace(Workspace):
@classmethod
async def get_secret_refs(cls, subject):
return [SecretRef(name="sf_access_token", secret_id=subject.connection_id, host="org.my.salesforce.com")]
The hook works, but its return type is not public. druks.sandbox exports only Sandbox, so apps must import druks.sandbox.models. software_factory does the same. The author guide does not document get_secret_refs(), custom host entries, or the variable name, which is name.upper().
Tried
Adding SecretRef to druks/sandbox/__init__.py causes a circular import: druks.sandbox.client → druks.sandbox.host.
Proposal
- Make the type importable from a public namespace without the import cycle. This could be a lazy export, or a small datastructure like
RequiredMcpServer that the workspace maps to the ORM row.
- Document
get_secret_refs() in "Customize the workspace": the vault row, host, the derived variable, and the bearer header.
- Add it to the "Stable author imports" table.
Problem
An app workspace can give its sandbox a custom secret by overriding
Workspace.get_secret_refs(). For example, a per-rep OAuth service connection that the secrets proxy swaps in on one host:The hook works, but its return type is not public.
druks.sandboxexports onlySandbox, so apps must importdruks.sandbox.models.software_factorydoes the same. The author guide does not documentget_secret_refs(), customhostentries, or the variable name, which isname.upper().Tried
Adding
SecretReftodruks/sandbox/__init__.pycauses a circular import:druks.sandbox.client→druks.sandbox.host.Proposal
RequiredMcpServerthat the workspace maps to the ORM row.get_secret_refs()in "Customize the workspace": the vault row,host, the derived variable, and the bearer header.