Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add more Security options in swaggerparser #15605

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

Closed
defelmnq opened this issue Nov 20, 2024 · 0 comments · Fixed by #15660
Closed

add more Security options in swaggerparser #15605

defelmnq opened this issue Nov 20, 2024 · 0 comments · Fixed by #15660
Labels
api Area: HTTP API

Comments

@defelmnq
Copy link
Contributor

The CI currently runs a step which is validating swagger annotations - specifically the Security tag - https://github.com/coder/coder/blob/main/coderd/coderdtest/swaggerparser.go#L302

For now, the tag has to be set to CoderSessionToken without allowing any other option, excepted ignoring the whole endpoint.

Having some endpoints that are using PSK or ProvisionerKey - we need to be able to put these options too.

@coder-labeler coder-labeler bot added the api Area: HTTP API label Nov 20, 2024
defelmnq added a commit that referenced this issue Nov 26, 2024
Aims to resolve #15605 

There's currently one option valid for the `@Security` tag in
swaggerparser - which fails in the CI if we try to put any other value.

At least one of our endpoints does not accept `CoderSessionToken` as an
option for the authentication and so we need to add new possibilities in
order to keep the documentation up-to-date.

In this PR , I added `ProvisionerKey` which is the way our provisioner
daemon can authenticate to the backend - also modified a bit the code to
simplify other options later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant