You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think this is the same as #1007 because in general my secrets are working.
The only secret that isn't working is the one that holds a JSON value which contains my Google service account config.
Locally, my features involving the service account are working and i'm using the same secrets manager so I think there is something weird going on with how this secret is handled during a kamal deploy.
When I do kamal secret print it looks ok -- as in, it looks like the example i share above. My terminal displays it as properly tabbed JSON and the newlines in the private key are \n.
When I do kamal shell and echo it looks like this:
GOOGLE_SERVICE_ACCOUNT_CONFIG=$(doppler secrets -p project-dev -c prd get GOOGLE_SERVICE_ACCOUNT_CONFIG --plain | jq -c . | sed 's/\\\\n/\\n/g')
I'm using AWS secrets manager and was running into a similar json problem to yours. My secrets are also in a JSON blob (as far as I can tell, that's all AWS supports). I tried a similar workaround, but I keep getting an error about jq not being found on my server. I verified that I installed jq on that machine, so I'm stumped about why kamal can't find it when it is fetching secrets. If I copy the "command" part of that statement and run it on my server, it works.
I don't think this is the same as #1007 because in general my secrets are working.
The only secret that isn't working is the one that holds a JSON value which contains my Google service account config.
Locally, my features involving the service account are working and i'm using the same secrets manager so I think there is something weird going on with how this secret is handled during a kamal deploy.
Context
DIFF
Here's the difference in what I'm seeing in console locally vs on the server for
ENV['GOOGLE_SERVICE_ACCOUNT_CONFIG']
ENV['GO...']
"{\n \"type\": \"service_account\",\n \"project_id\": \"project-dev\",\n \"private_key_id\": \"*****\",\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\n*****\\n*****\\n ... \\n-----END PRIVATE KEY-----\\n\",\n \"client_email\": \"[email protected]\",\n \"client_id\": \"******\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/connect%40project-dev.iam.gserviceaccount.com\",\n \"universe_domain\": \"googleapis.com\"\n}"
"{\\n \"type\": \"service_account\",\\n \"project_id\": \"project-dev\",\\n \"private_key_id\": \"*******\",\\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\\\n*****\\\\n*****\\\\n ... \\\\n-----END PRIVATE KEY-----\\\\n\",\\n \"client_email\": \"[email protected]\",\\n \"client_id\": \"*****\",\\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/connect%40project-dev.iam.gserviceaccount.com\",\\n \"universe_domain\": \"googleapis.com\"\\n}"
\n
\\n
\\n
\\\\n
When I do
kamal secret print
it looks ok -- as in, it looks like the example i share above. My terminal displays it as properly tabbed JSON and the newlines in the private key are\n
.When I do
kamal shell
andecho
it looks like this:Currently looking for a workaround. Got close with this:
but this results in an RSA error. The extra
\n
are removed at the key level but the private key still has\\\\n
in console.Will post if I find something that works.
Happy dig/share more if I can get some guidance. Thanks!
The text was updated successfully, but these errors were encountered: