pgadmin-org / pgadmin-org/pgadmin4
Server gives application/json response when Kerberos Auth fails
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
Describe the bug
(At least some) Kerberos Login Errors result in a webserver response of Content-Type application/json .
To Reproduce
Steps to reproduce the behavior:
- Remove Kerberos Auth Keytab File
- In Your browser, load the login page
- The Browser will reveive a response with Content-Type
application/jsonand content
{
"success": 0,
"errormsg": "Object of type MissingCredentialsError is not JSON serializable",
"info": "",
"result": null,
"data": null
}
Expected behavior
Some meaningful error message of Content-Type text/html should be sent.
Desktop (please complete the following information):
- OS: Windows 11
- pgAdmin version: 9.17 Docker Image
- Mode: Server
- Browser Chrome
- Package type: Container
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in the pgAdmin 9.17 Docker image by removing the Kerberos keytab and loading the login page. Trace the Kerberos login error response; done means the failure returns a meaningful text/html message instead of an application/json serialization error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100