Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose JWT_ISSUER, JWT_AUDIENCE, and SECRET env vars to all services #2055

Merged
merged 1 commit into from
Apr 6, 2021

Conversation

humphd
Copy link
Contributor

@humphd humphd commented Mar 30, 2021

In Satellite we have isAutenticated() middleware that depends on a service knowing some info about our JWT setup. Also, we're adding the ability for a service token to be created in each service, which means we need to share even more details with the services. To do this, we expect environment variables to be set in Satellite. Previously we weren't doing this, but this PR adds them in.

Future services will also require this (FYI @c3ho for Parser and @izhuravlev for Search).

We were also missing some NODE_ENV=production variables, which I've added. They will always need to be production in production, so it's best to do it in the docker-compose file vs. the env.

Finally, I've stubbed out (with comments) the APM values we'll need later on when we add those, so it's clear what's missing.

birtony
birtony previously approved these changes Mar 31, 2021
@HyperTHD
Copy link
Contributor

HyperTHD commented Apr 4, 2021

I'm assuming we plan on updating the posts service's routes as well as the any other future service to only be accessed by an authenticated user with this change

@humphd
Copy link
Contributor Author

humphd commented Apr 5, 2021

Yeah, we need to add middleware for the JWT stuff in all routes that modify any data, or should be hidden behind admin.

@humphd
Copy link
Contributor Author

humphd commented Apr 5, 2021

DevelopingSpace/satellite#10 just landed and needs this.

manekenpix
manekenpix previously approved these changes Apr 5, 2021
@humphd humphd dismissed stale reviews from manekenpix and birtony via e2d73e7 April 5, 2021 22:50
@humphd humphd force-pushed the envs-for-satellite branch from b41ca6f to e2d73e7 Compare April 5, 2021 22:50
@humphd humphd merged commit 1427fb1 into Seneca-CDOT:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants