-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Obs AI Assistant] Use cookie auth for internal APIs in serverless tests #203275
[Obs AI Assistant] Use cookie auth for internal APIs in serverless tests #203275
Conversation
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
940a9b9
to
f8b1bc7
Compare
24bd659
to
1981617
Compare
@@ -70,10 +58,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { | |||
await deleteInferenceEndpoint({ es, name: AI_ASSISTANT_KB_INFERENCE_ID }); | |||
|
|||
const res = await observabilityAIAssistantAPIClient | |||
.slsUser({ | |||
.slsAdmin({ |
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.
If admin privileges are required to access the status endpoint, what happens when users with the editor
role call it? The status endpoint is called when starting a conversation to ensure the KB has been setup. Do we have a problem there?
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.
Hey @sorenlouv
Thanks for reviewing.
admin
privileges are not required to check the KB status (I've verified this locally).
And I updated the test to check the status with the editor
role.
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.
Thank you!
2bda15d
to
b7ba179
Compare
💚 Build Succeeded
Metrics [docs]
History
cc @viduni94 |
Looks great! Thanks! |
…sts (elastic#203275) ## Summary ### Problem Cookie authentication was introduced in Kibana for serverless internal API tests via elastic#192727. The serverless tests for Obs AI Assistant still uses API key based auth. ### Solution Change authentication to cookie based auth for internal APIs in serverless tests. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
…sts (elastic#203275) ## Summary ### Problem Cookie authentication was introduced in Kibana for serverless internal API tests via elastic#192727. The serverless tests for Obs AI Assistant still uses API key based auth. ### Solution Change authentication to cookie based auth for internal APIs in serverless tests. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…sts (elastic#203275) ## Summary ### Problem Cookie authentication was introduced in Kibana for serverless internal API tests via elastic#192727. The serverless tests for Obs AI Assistant still uses API key based auth. ### Solution Change authentication to cookie based auth for internal APIs in serverless tests. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Problem
Cookie authentication was introduced in Kibana for serverless internal API tests via #192727.
The serverless tests for Obs AI Assistant still uses API key based auth.
Solution
Change authentication to cookie based auth for internal APIs in serverless tests.
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:*
label is applied per the guidelines