-
Notifications
You must be signed in to change notification settings - Fork 55
LCORE-283: Introduce authentication to LS-stack API #189
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
Conversation
tisnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks ok-ish. Would be nice to be "clean" on CI, but probably ok for now (I can fix it later I guess)
@manstis PTAL - it will affect you too
This patch introduce authentication mechanisms to the Lightspeed-stack
API.
Following what is in road-core/service, all 3 methods have been
reintroduced:
* noop - Which is just a No-op method, used for development
* noop-with-token - Similar to No-op but require a Authorization
Header to be passed as part of the request. For development use
only
* k8s - Which authenticates with Kubernetes/OCP
A few notes about this patch:
1. noop is the default authentication method. In road-core/service the
default method was "k8s" but, since this is not a "k8s" first project
2. The "skip_user_id_check" was removed from the AuthInterface return
values because it wasn't used anywhere
3. The "k8s.py" file contains a lot of pyright warnings, 58 to be exact.
This file was basically c&p from the existing one in
road-core/service.So I left those to be fixed later. We may want to
refactor how we do things there.
4. No dev_config has been introduced as part of this patch
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
When I looked at CI, there were some linter failures. Now are gone -> we are ok. thanks |
|
@tisnik ah sorry, it was conflict from other patches that merged before. I fixed it now. I thought it was something to clean in the code itself, my bad |
tisnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one!
|
@manstis please take a look at this one. From my perspective it's perfectly ok, but it might affect you |
manstis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM 👍
It would be nice to document how the k8s authentication works.
It's not clear (to me) what I might need to do in k8s for this to work!?!
Fix the K8SAuthDependency docstring to include information about the authentication/authorization process for the k8s authentication module. Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
tisnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one
Since d11c09d (lightspeed-core#189), the "`auth`" tuple returned by `AuthInterface` contains the user ID, user name, and token. We want to pass the token to the MCP server, but we accidentally passed the entire stringified tuple instead, causing the MCP server to fail to authenticate the request. This commit fixes that issue by unpacking the `auth` tuple to extract the token before passing it to `get_response`.
Since d11c09d (lightspeed-core#189), the "`auth`" tuple returned by `AuthInterface` contains the user ID, user name, and token. We want to pass the token to the MCP server, but we accidentally passed the entire stringified tuple instead, causing the MCP server to fail to authenticate the request. This commit fixes that issue by unpacking the `auth` tuple to extract the token before passing it to `get_response`.
Since d11c09d (lightspeed-core#189), the "`auth`" tuple returned by `AuthInterface` contains the user ID, user name, and token. We want to pass the token to the MCP server, but we accidentally passed the entire stringified tuple instead, causing the MCP server to fail to authenticate the request. This commit fixes that issue by unpacking the `auth` tuple to extract the token before passing it to `get_response`.
Since d11c09d (lightspeed-core#189), the "`auth`" tuple returned by `AuthInterface` contains the user ID, user name, and token. We want to pass the token to the MCP server, but we accidentally passed the entire stringified tuple instead, causing the MCP server to fail to authenticate the request. This commit fixes that issue by unpacking the `auth` tuple to extract the token before passing it to `get_response`.
Since d11c09d (lightspeed-core#189), the "`auth`" tuple returned by `AuthInterface` contains the user ID, user name, and token. We want to pass the token to the MCP server, but we accidentally passed the entire stringified tuple instead, causing the MCP server to fail to authenticate the request. This commit fixes that issue by unpacking the `auth` tuple to extract the token before passing it to `get_response`.
Since d11c09d (lightspeed-core#189), the "`auth`" tuple returned by `AuthInterface` contains the user ID, user name, and token. We want to pass the token to the MCP server, but we accidentally passed the entire stringified tuple instead, causing the MCP server to fail to authenticate the request. This commit fixes that issue by unpacking the `auth` tuple to extract the token before passing it to `get_response`.
Since d11c09d (lightspeed-core#189), the "`auth`" tuple returned by `AuthInterface` contains the user ID, user name, and token. We want to pass the token to the MCP server, but we accidentally passed the entire stringified tuple instead, causing the MCP server to fail to authenticate the request. This commit fixes that issue by unpacking the `auth` tuple to extract the token before passing it to `get_response`.
Description
This patch introduce authentication mechanisms to the Lightspeed-stack API.
Following what is in road-core/service, all 3 methods have been reintroduced:
A few notes about this patch:
Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing