Imagine I'm an idiot. I want to get management API...
# orm-help
j
Imagine I'm an idiot. I want to get management API secured. I have read in the docs and accordingly set managementApiSecret in docker-compose.yml and after running prisma deploy, nothing is different. What am I missing?
h
Let me quickly brief you about how you can secure your Prisma service and server in various ways:- 1. Prisma service endpoint can be secured by using service secret as documented here: https://www.prisma.io/docs/prisma-graphql-api/reference/authentication-ghd4/#service-secret 2. The Prisma server can be secured against unauthorized deployments by using the management API token as documented here: https://www.prisma.io/docs/prisma-server/authentication-and-security-kke4/#management-api-token 3. If we are using Prisma behind a GraphQL server (Usually graphql-yoga or apollo-server 2) or any other client (express app, CLI app) then we can create any custom authentication solution. Here is an example of the same: https://github.com/prisma/prisma-examples/tree/master/typescript/graphql-auth Please let me know if you have any further questions.
d
@James You need to run
docker-compose up -d
after updating the
docker-compose.yml
file. Can you please share the link to the docs that you followed? Maybe they can be improved to include this step.
j
Thanks guys. I mistakenly thought I had run docker-compose up -d in my effort to find a solution on my own, but apparently I did not. I do believe it would be helpful to briefly remind people like me (idiots) that it's necessary if we hope to see any changes effected. As for securing the service and authenticating the client, even my tiny brain was able to sort that out. The docs referenced above as number 2 could be improved by also mentioned that one needs to use PRISMA_MANAGEMENT_SECRET env variable to deploy and other management tasks. Dont remember where I originally saw it.
👍 1
d
Improvement to this part of docs can be tracked here: https://github.com/prisma/prisma-content-feedback/issues/72