From efdae5a96f494f7e0e0997cf10241fd07f2646d1 Mon Sep 17 00:00:00 2001 From: Pieter Lange Date: Mon, 11 Jun 2018 17:19:12 +0200 Subject: [PATCH] Fix example os.urandom sometimes returns more bytes and its generally encouraged to use python3's `secrets` module. Also double64 encode to prevent messing up the environment variables with binary data --- docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml b/docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml index ed367b563..82549f40e 100644 --- a/docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml +++ b/docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml @@ -28,7 +28,7 @@ spec: value: - name: OAUTH2_PROXY_CLIENT_SECRET value: - # python -c 'import os,base64; print base64.b64encode(os.urandom(16))' + # docker run -ti --rm python:3-alpine python -c 'import secrets,base64; print(base64.b64encode(base64.b64encode(secrets.token_bytes(16))));' - name: OAUTH2_PROXY_COOKIE_SECRET value: SECRET image: docker.io/colemickens/oauth2_proxy:latest