cloudfoundry / cloudfoundry/stratos
Malformed error message for invalid login credentials when deployed to SAP CF
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 267
- Forks
- 137
- Avg merge
- 5h 14m
- Merged PRs (30d)
- 77
Description
Frontend Deployment type
Deployed front end via cf push to SAP Cloud Foundry
- [ x] Cloud Foundry Application (cf push)
- Kubernetes, using a helm chart
- Docker, single container deploying all components
- npm run start
- Other (please specify below)
Backend (Jet Stream) Deployment type
Deployed front end via cf push to SAP Cloud Foundry
- [x ] Cloud Foundry Application (cf push)
- Kubernetes, using a helm chart
- Docker, single container deploying all components
- Other (please specify below)
Expected behaviour
When logging in to Stratos with SAP credentials, expect error message:
User authentication failed: Unauthorized - this is a custom message from SAP CF UAA.
Actual behaviour
When logging in to Stratos with SAP credentials, error message is malformed:
{"error":"invalid_grant","error_description":"User authentication failed: Unauthorized"}
Steps to reproduce the behavior
Deploy Stratos via cf push to SAP cloud. Attempt to log in to Stratos with invalid credentials e.g. SAP credentials with a typo.
Suspected problem
auth.go -> UAA response should be parsed and only the error description passed up to front end as the diaply error. It looks like the whole json UAA response is being returned instead. This does not occur when deployed in other environments, because they do not necesarily provide a custom UAA response, therefore the front-end displays our default error message.
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
Start in auth.go and trace how the UAA login response is passed to the frontend. Reproduce an invalid-credentials login after deploying with cf push to SAP Cloud Foundry, then verify that the displayed error contains only the UAA error_description rather than the encoded JSON response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, typescript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100