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

Add real HTTP authentication backend #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add real HTTP authentication backend #34

wants to merge 2 commits into from

Conversation

cowbon
Copy link
Collaborator

@cowbon cowbon commented Feb 27, 2025

Add real HTTP authentication backend based on services/auth, and relocate the Authentication check to a middleware. This allows users to pick the authentication scheme (none or basic, as defined in RFC7617) for ratsd.

Add HTTP authentication library for ratsd. It currently support 3 modes,
`passthrough`, `none` and `basic`. `passthrough` backend does not
perform any authentication, allowing all requests. `none` is an alias
for `passthrough`, and `basic` implements the Basic HTTP authentication
scheme defined in RFC7617.

Signed-off-by: Ian Chin Wang <ian.chin.wang@oracle.com>
Replace bogus HTTP header check with the real HTTP auth middleware, add
the option to support various auth backend type, and remove unnecessary
unit test for missing authorization header. Add `auth` as the option to
config.yaml for API authentication and authorization mechanism
configuration. If this is not specified, the `passthrough` backend will
be used (i.e. no authentication will be performed). See auth config from
[readme](https://github.com/veraison/services/blob/main/auth/README.md).
Note `role` is not used in ratsd, and thus can be removed from config.yaml

Signed-off-by: Ian Chin Wang <ian.chin.wang@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant