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

Cannot connect via authenricated role and JWT without password from psql CLI #26

Open
maximum-pixels opened this issue Jan 9, 2025 · 0 comments

Comments

@maximum-pixels
Copy link

Steps to reproduce

  • Generate valid JWT for example via getToken() method
  • Attempt connection via Neon provided connection string like this:
export TOKEN=........
export PGOPTIONS="-c pg_session_jwt.jwk=$TOKEN"
psql postgresql://authenticated@[host]/[db]?sslmode=require

Expected result

connection established as user that had the JWT generated

Actual result

CLI prompts for password submitting an empty password this happens:

Password for user authenticated: 
psql: error: connection to server at "neon hsotname here" (x.x.x.x), port 5432 failed: SSL SYSCALL error: EOF detected

When the -w parameter is passed to psql to connect without password, this error is produced psql: error: connection to server at "neon hostname here" (x.x.x.x), port 5432 failed: fe_sendauth: no password supplied

Environment

docker run --rm -it postgres bash

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

No branches or pull requests

1 participant