What happened?
I want to use pomerium as an identity aware reverse proxy to one of my cloud run services.
The Authenticate and Authorize flows against Google IDP both work nicely. I get OAuth callback and redirected to upstream.
Upstream (cloud run service with authentication required) then denies access.
In the config.yaml
, I am using
pass_identity_headers: true
enable_google_cloud_serverless_authentication: true
google_cloud_serverless_authentication_service_account=<base64 encoded string??>
to make pomerium service authenticate against Cloud Run by a service account.
However I see following errors in the logs:
{"level":"warn","error":"record not found","time":"2024-03-25T12:36:23Z","message":"clearing session due to missing or invalid session or service account"}
{"level":"error","error":"error retrieving google cloud serverless token source: invalid character '\\n' in string literal","time":"2024-03-25T12:36:23Z","message":"error retrieving google cloud serverless headers"}
{"level":"warn","error":"record not found","time":"2024-03-25T12:36:28Z","message":"clearing session due to missing or invalid session or service account"}
{"level":"error","error":"error retrieving google cloud serverless token source: invalid character '\\n' in string literal","time":"2024-03-25T12:36:28Z","message":"error retrieving google cloud serverless headers"}
{"level":"error","error":"error retrieving google cloud serverless token source: invalid character '\\n' in string literal","time":"2024-03-25T12:36:29Z","message":"error retrieving google cloud serverless headers"}
What did you expect to happen?
I was hoping to get access to the underlying cloud run service.
As I cannot see the headers of the requests going upstream (is there a way?), I am not able to debug the pomerium â upstream requests.
Additional context
Using 0.25 via docker on local machine.
To generate the base64 service account credentials, I created a key file on Google Cloud console in the schema below and ran that through base64 encoder on my local machine.
{
"type": "service_account",
"project_id": ...
"private_key_id": ...
"private_key": "...."
"client_email": "...",
"client_id": "...",
"auth_uri": "...",
"token_uri": "...",
"auth_provider_x509_cert_url": "...",
"client_x509_cert_url": "...",
"universe_domain": "googleapis.com"
}
Any help very much appreciated!
Thanks in advance.