401 from upstream while validating credentials in REST request body should not result in 502
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 218
- Forks
- 72
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 427
Description
Description
User invoked PATCH /v2/nvcf/accounts/{ncaId}/registry-credentials/{rcId} with a request body that contains a secret with a base64 encoded value that had a newline. While validating the credential, NVCF API called NGC and presented the base64 encoded secret with a newline.
NGC correctly responded with a 401. However, NVCF API reported 502 to the user.
There is a separate issue filed to reject request that contains a newline in the base64 encoded secret value with 400 / Bad Request. This ticket is for making sure that a 401 from NGC(or any upstream registry) does not get mapped to 502.
Definition of Done
- Update code
- Add a unit/integration test
By submitting this issue, you acknowledge that you are an assigned member of the NVCF development team and agree to follow our code of conduct and our contributing guidelines.
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 at the PATCH /v2/nvcf/accounts/{ncaId}/registry-credentials/{rcId} entry point and trace how upstream registry responses are translated. Add a unit or integration test covering an upstream 401, and consider the issue done when that response is returned to the user instead of being mapped to 502.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100