Get JWT token without public and private keys? #137
-
Hi team, I am wondering if all our pods are exposed by Ingress using https internally, or another case if all pods communication are secured by service mesh with mTLS. Does it make sense or still secured to provide a flag (or some better ways) to allow us skipping those two flags
Simply providing |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi Hongbo :) Encryption (e.g. TLS or HTTPS) don't save the same problem as the auth tokens (they can only authenticate the server via certificates, not the clients) The tokens are used to authenticate and authorize(via token types) who's allowed to make changes through OPAL (it's the authorization of the authorization 😅). That said, if you provide authentication in another way e.g. (API gateway, VPN, ssh tunnel, zerotrust network) it might be okay... The fear here is that users that don't fully understand the security model will turn this off by mistake without taking the right measures. Perhaps we can create the flag with a name that makes it clear it's risky to use, e.g. @asafc what do you think? |
Beta Was this translation helpful? Give feedback.
-
@orweis @hongbo-miao regarding the suggested I think this is a good opportunity for me to document and explain about the JWTSigner. What these encryption keys are for?The encryption keys provided by
What is the JWT Signer?JWTSigner is a (very) simple AuthN/AuthZ mechanism used between OPAL server and its connected peers (OPAL client, microservices pushing updaters, etc). We use the signed JWT and its claims to make sure that an entity pushing updates or an entity pulling policy and data is actually allowed to do so. We could have used other methods but we wanted something simple for now. Why do we need AuthN or AuthZ for OPAL?Since OPAL is trusted to manipulate OPA - OPAL is a very sensitive microservice in your network. OPA is responsible for authorization data and policies - if OPA/OPAL are compromised, so is your app. That is why OPAL must verify that sensitive actions (pushing updates, receiving updates to policy or data) are done only by a trusted and verified entity. Can i switch the JWT signer off?Yes, you can already do this from the very first version of OPAL. However, this is not recommended in production environment. If you do not set both env vars Maybe we can change the environment variables names - they are indeed confusing. |
Beta Was this translation helpful? Give feedback.
@orweis @hongbo-miao regarding the suggested
OPAL_DANGEROUS_NO_AUTH_TOKENS_MODE
, this is already supported.Read on, i explained below under "Can I Switch the JWTSigner off?".
I think this is a good opportunity for me to document and explain about the JWTSigner.
What these encryption keys are for?
The encryption keys provided by
OPAL_AUTH_PRIVATE_KEY
andOPAL_AUTH_PUBLIC_KEY
are used by the JWTSigner. They have absolutely nothing to do with SSL/TLS/HTTPs.