Skip to content
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

feat(authorization): Create a v1 authorization service #19815

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented Oct 24, 2020

Closes #19812

This PR introduces a new package, v1/authorization, that provides an implementation of influxdb.AuthorizationService for managing v1 authorization tokens. It is a private API, exposed via /private/legacy/authorizations, with the same operations as /api/v2/authorizations for creating, reading, updating and deleting data.

Note that this commit does not hook up the service to the v1 /query and /write, which will occur in a subsequent PR .

@stuartcarnie stuartcarnie added the area/2.x OSS 2.0 related issues and PRs label Oct 24, 2020
@stuartcarnie stuartcarnie self-assigned this Oct 24, 2020
@stuartcarnie stuartcarnie marked this pull request as ready for review October 26, 2020 18:42
This service is a private API for managing authorization tokens
for v1 API requests.

Note that this commit does not hook up the service to the v1
`/query` and `/write`, which will occur in a subsequent PR.

Closes #19812
Copy link
Contributor

@GeorgeMac GeorgeMac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good Stuart. I appreciate mostly a lift and drop from authorizations right?
All the mounting looks correct to me :)

@stuartcarnie
Copy link
Contributor Author

I appreciate mostly a lift and drop from authorizations right?

Correct – I figured that code did mostly what we needed. I considered if there were ways to abstract some of the implementation, but then considered it was likely to cause more problems, if the two diverged.

@stuartcarnie stuartcarnie merged commit 5c63c21 into master Oct 27, 2020
@stuartcarnie stuartcarnie deleted the sgc/issues/19812 branch October 27, 2020 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/2.x OSS 2.0 related issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create V1 Authorizations service and HTTP API
2 participants