Skip to content

Snyk provider auth not working #291

@garethr

Description

@garethr

It looks like there's been a change in behaviour when the HTTP client was changed to resty? The snyk provider in 0.5.1 appears to throw an authentication error.

GET  /rest/self?version=2022-09-15~experimental  HTTP/1.1
HOST   : api.snyk.io
HEADERS:
	Authorization: Bearer <token>
	User-Agent: bomber
BODY   :
***** NO CONTENT *****```

Note this is now using Bearer auth, rather than token, which is likely why this is failing.

Looking at the upstream project, we need to use `SetAuthScheme` and set to `token` I think.

I'll try and get a PR together unless someone gets there first. cc. @mcombuechen 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions