Safely bypass Vercel deployment protection
# support
m
We need to dynamically set the server URL of tool functions, so we use ephemeral assistants. To bypass Vercel's deployment protection on preview deployments, one can just pass an extra header
x-vercel-protection-bypass
with a bypass secret. We can set this header as part of the CreateAssistantDTO. However, using the bypass secret on the client compromise it, and we might as well turn off deployment protection instead. How should we deal with this?
v
Hey! I couldn't find enough details to help you safely bypass Vercel deployment protection. I'm escalating your query to one of our team members who can assist you further 😊
m
I guess my question is actually more generally about securing ephemeral assistants. Since the assistant is fully configured in the client and then just sent to Vapi using the public key, anyone can use my account to generate arbitrary assistants by simply grabbing my public key.
Also thinking this will not work with ephemeral assistants https://docs.vapi.ai/server-url/server-authentication Eg. no point in passing a secret from the client to Vapi as it is compromised from the start.
Oooh, just found org level server URls, maybe the answer is there https://dashboard.vapi.ai/org/settings
I got the vercel bypass working by setting the header in the org level settings. I had to set an arbitrary Server URL to be able to save the headers though. I just set it to "https://example.com".
This also covers setting up the x-vapi-secret to validate function calls authenticity.
The remaining questions is how to think protecting against people grabbing my public API key and creating arbitrary ephemeral voice assistants.
c
Using your public key, people cannot create assistants; they can only create calls that you can limit to the assistant and/or the domains/origins. Let me know what you think about this.
4 Views