[chat] Integrate "On Behalf Of" Bearer Token usage with AG-UI authorization flow AG-UI#11524
Conversation
|
Persistent review updated to latest commit 599b878 |
✅ All unit tests passing
|
|
The CI failures are not related to the code changes, @seraphjiang @SuZhou-Joe @cwperks would you review the new commit using OBO token? |
|
Another thing in my mind is we need to consider about multiple data source. With MDS, it supports different authentication method. It will not use the token for current login user instead of the credential for datasource.
@cwperks will OBO support cross cluster which means OBO token issued at cluster A and it could use in cluster B? |
If they share the same |
| ); | ||
| expect(mockTransportRequest).toHaveBeenCalledWith({ | ||
| method: 'POST', | ||
| path: '/_plugins/_security/api/generateonbehalfoftoken', |
There was a problem hiding this comment.
nit: can we use the endpoint /_plugins/_security/api/obo/token. Its the same endpoint, without all the verbiage of this and introduced in the same release (3.6.0)
|
@mingshl the latest changes lgtm. Is there any way to e2e test this on the agent server side in an automated way? |
Signed-off-by: Eric Pugh <epugh@opensourceconnections.com>
Signed-off-by: Eric Pugh <epugh@opensourceconnections.com>
Signed-off-by: Eric Pugh <epugh@opensourceconnections.com>
Signed-off-by: Eric Pugh <epugh@opensourceconnections.com>
Signed-off-by: Eric Pugh <epugh@opensourceconnections.com>
Signed-off-by: Mingshi Liu <mingshl@amazon.com>
Signed-off-by: Mingshi Liu <mingshl@amazon.com>
Signed-off-by: Mingshi Liu <mingshl@amazon.com>
599b878 to
4ea0801
Compare
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 4ea0801.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
Persistent review updated to latest commit 4ea0801 |
|
@cwperks Thanks for the review! I added use /_plugins/_security/api/obo/token instead . @eric has a chorus open source dashboard that can allow you to test the new changes with E2E workflow. @epugh Let us know when it's ready to test. Thank you!! |
|
I am going to go through https://docs.opensearch.org/latest/security/access-control/authentication-tokens/ and I might ping you on Friday @cwperks before my working session with @mingshl. Thanks team! |
Works for me. FYI I am making slight alterations to those docs for 3.6: opensearch-project/documentation-website#12109 |
|
We had an offline section that pull up this PR along with some new commits on security plugin and we can verify some test cases that the OBO token is working, Would you review and approve if no major concerns? We are hoping to get in the 3.6 release by EOD. |
|
THANKYOU SO MUCH! |
Description
Users need to make calls to OpenSearch using their current logged in identity via the Chat plugin.
The flow is OSD --> Chat --> OpenSearch Agent Server --> OpenSearch MCP Tools Service --> OpenSearch.
This specifically integrates the OBO token flow by requesting this secure token via:
OSD --> Chat --> Security Plugin OBO --> Chat --> OpenSearch Agent Server --> OpenSearch MCP Tools Service --> OpenSearch
Issues Resolved
n/a
Screenshot
n/a
Testing the changes
Set up a secure OpenSearch server and OpenSearch Dashboards. Configure Agent Server and MCP Tool Server and send tool chain through. The
forwardCredentialsis the key thing:opensearch_dashboards.yml:
We did End 2 End testing using the Chorus reference implementation: o19s/chorus-opensearch-edition#175 to validate all the data flows.
Changelog
Check List
yarn test:jestyarn test:jest_integration