prisma / prisma-templates

Prisma templates for major cloud providers
MIT License
52 stars 41 forks source link

Management API Authentication settings not working #7

Closed wawoon closed 6 years ago

wawoon commented 6 years ago

What I faced

I set managementApiSecret, however I got the error below.

Warning: Management API authentication is disabled. To protect your management server you should provide one (not both) of the environment variables 'CLUSTER_PUBLIC_KEY' (asymmetric, deprecated soon) or 'PRISMA_MANAGEMENT_API_JWT_SECRET' (symmetric JWT).

And I tried to deploy prisma service without secret key, and deployment succeeded.

Possible Causes

The management api secret is loaded from PRISMA_MANAGEMENT_API_JWT_SECRET.

https://github.com/prismagraphql/prisma/blob/b58e9f7c8bd58619f7df343dfea83590f5216ca3/server/libs/prisma-config/src/main/scala/com/prisma/config/ConfigLoader.scala#L67

but cloud formation template sets secret key as MANAGEMENT_API_SECRET.

https://github.com/prismagraphql/prisma-templates/blob/master/aws/fargate.yml#L274

dpetrick commented 6 years ago

Thanks, fixed in 851438eea4171a0ef40de887e999318e2e9e03a7.

wawoon commented 6 years ago

Thank you very much.

patrick-samy commented 5 years ago

I'm experiencing the same behavior after setting managementApiSecret in my config map for my Kubernetes pod, using the image: prismagraphql/prisma:1.13

Any ideas?