Can someone please explain the difference between ...
# orm-help
r
Can someone please explain the difference between the “secrets” and tokens. There is a
secret
property set in
prisma.yml
, then there is the
secret
prop when you create a server and passed into the
prisma-binding
instance, and finally there’s also the
managementApiSecret
in the docker-compose.yml file. Are these all the same thing?
d
Secret in
prisma.yml
is used to protect the deployed service, running
prisma token
in CLI would yield a token that can be sent as authorization header via playground (or any other client) to access the Prisma service. the
managementApiSecret
in
docker-compose.yml
is used to protect the
management
API which exists at
<prisma server url>/management
When the management secret is used in
docker-compose.yml
then the CLI must have the same secret as environment variable to be able to deploy services on the prisma server 🙂
Does that clear it for you..? 🙂
r
sort of. have to try it out and to fully understand. and how about the
secret
thats passed into the
new Prisma(...)
instance when creating a server. that’s the same as the one set in
prisma.yml
?
d
yes, since Prisma client or prisma-binding or playground are just clients of forms, all of them must fully this secret pattern in some way to interact with the underlying prisma service
r
thank you!