-
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
[Security solution] AWS Bedrock connector #166662
Merged
Merged
Changes from 41 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
00cdab0
wip
stephmilovic f907c46
Merge branch 'main' into bedrock
stephmilovic 45bb251
bootstrapping
stephmilovic 70c470f
working
stephmilovic 9f6c8fe
fix
stephmilovic 182d90e
fix url
stephmilovic 75ae921
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine c55a851
connector added to AI assistant
stephmilovic 16902ca
Merge branch 'bedrock' of github.com:stephmilovic/kibana into bedrock
stephmilovic 40ab64d
fix
stephmilovic e461297
dentist
stephmilovic 4f3019c
invokeAI method
stephmilovic 5991de8
rm log
stephmilovic be72b79
Merge branch 'main' into bedrock
stephmilovic e90395e
make langchain work
stephmilovic e884b94
about to combine connector selector components
stephmilovic f6aa152
condense connector selector logic
stephmilovic 95f5a97
undo type change
stephmilovic 90dfe25
remove dashboard and fix types
stephmilovic c5c65f7
fix stack_connectors tests
stephmilovic ed4773b
Merge branch 'main' into bedrock
stephmilovic 1c61a59
aws4 package instead of aws4-axios
stephmilovic 3863f09
fix type and lint
stephmilovic 36065f8
fix test
stephmilovic b7a8923
add aws region
stephmilovic f3257a0
fix stack connectors tests
stephmilovic f976db6
add bedrock api tests
stephmilovic 16f78ca
add docs
stephmilovic 6cc29a1
remove a .only whoops
stephmilovic 3ff4aa4
FIXES
stephmilovic 2585ec1
test fix
stephmilovic 6783179
more fixing
stephmilovic 2d57ffb
Merge branch 'main' into bedrock
stephmilovic c203549
fix tests on security side
stephmilovic edf8430
fix img address and add comments to ai subactions
stephmilovic 9594572
Merge branch 'main' into bedrock
angorayc ad54ca9
fix test
stephmilovic 79ec175
Merge branch 'bedrock' of github.com:stephmilovic/kibana into bedrock
stephmilovic da40bfb
Merge branch 'main' into bedrock
stephmilovic f310ac7
fix host protocol
stephmilovic d0549eb
Merge branch 'main' into bedrock
stephmilovic 4acbbc5
fix merge
stephmilovic 11ae8d7
add model to params form
stephmilovic c6d7e94
pr updates for ymao1
stephmilovic 30f93cc
rm console log
stephmilovic ac8eb76
the logo is here!
stephmilovic 9b872df
Merge branch 'main' into bedrock
stephmilovic ded3418
Merge branch 'main' into bedrock
kibanamachine bcb1c14
Merge branch 'main' into bedrock
kibanamachine 7492595
update screenshots
stephmilovic 2f88749
Merge branch 'main' into bedrock
kibanamachine 7ef8a09
Merge branch 'main' into bedrock
kibanamachine 5b58a3a
Merge branch 'main' into bedrock
kibanamachine ae9856e
Merge remote-tracking branch 'upstream/main' into bedrock
stephmilovic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
[[bedrock-action-type]] | ||
== AWS Bedrock connector and action | ||
++++ | ||
<titleabbrev>AWS Bedrock</titleabbrev> | ||
++++ | ||
:frontmatter-description: Add a connector that can send requests to AWS Bedrock. | ||
:frontmatter-tags-products: [kibana] | ||
:frontmatter-tags-content-type: [how-to] | ||
:frontmatter-tags-user-goals: [configure] | ||
|
||
|
||
The AWS Bedrock connector uses https://github.com/axios/axios[axios] to send a POST request to AWS Bedrock. The connector uses the <<execute-connector-api,run connector API>> to send the request. | ||
|
||
[float] | ||
[[define-bedrock-ui]] | ||
=== Create connectors in {kib} | ||
|
||
You can create connectors in *{stack-manage-app} > {connectors-ui}*. For example: | ||
|
||
[role="screenshot"] | ||
// TODO: need logo before screenshot | ||
image::management/connectors/images/gen-ai-connector.png[AWS Bedrock connector] | ||
|
||
[float] | ||
[[bedrock-connector-configuration]] | ||
==== Connector configuration | ||
|
||
AWS Bedrock connectors have the following configuration properties: | ||
|
||
Name:: The name of the connector. | ||
API URL:: The AWS Bedrock request URL. | ||
Default model:: The GAI model for AWS Bedrock to use. Current support is for the Anthropic Claude models, defaulting to Claude 2. The model can be set on a per request basis by including a "model" parameter alongside the request body. | ||
Region:: The AWS Bedrock request URL. | ||
Access Key:: The AWS access key for authentication. | ||
Secret:: The secret for authentication. | ||
|
||
[float] | ||
[[bedrock-action-configuration]] | ||
=== Test connectors | ||
|
||
You can test connectors with the <<execute-connector-api,run connector API>> or | ||
as you're creating or editing the connector in {kib}. For example: | ||
|
||
[role="screenshot"] | ||
// TODO: need logo before screenshot | ||
image::management/connectors/images/gen-ai-params-test.png[AWS Bedrock params test] | ||
|
||
The AWS Bedrock actions have the following configuration properties. | ||
|
||
Body:: A stringified JSON payload sent to the AWS Bedrock Invoke Model API URL. For example: | ||
+ | ||
[source,text] | ||
-- | ||
{ | ||
body: JSON.stringify({ | ||
prompt: `${combinedMessages} \n\nAssistant:`, | ||
max_tokens_to_sample: 300, | ||
stop_sequences: ['\n\nHuman:'] | ||
}) | ||
} | ||
-- | ||
Model:: An optional string that will overwrite the connector's default model. For | ||
|
||
[float] | ||
[[bedrock-connector-networking-configuration]] | ||
=== Connector networking configuration | ||
|
||
Use the <<action-settings, Action configuration settings>> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -838,6 +838,7 @@ | |
"antlr4ts": "^0.5.0-alpha.3", | ||
"archiver": "^5.3.1", | ||
"async": "^3.2.3", | ||
"aws4": "^1.12.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to add |
||
"axios": "^1.4.0", | ||
"base64-js": "^1.3.1", | ||
"bitmap-sdf": "^1.0.3", | ||
|
@@ -1269,6 +1270,7 @@ | |
"@types/adm-zip": "^0.5.0", | ||
"@types/archiver": "^5.3.1", | ||
"@types/async": "^3.2.3", | ||
"@types/aws4": "^1.5.0", | ||
"@types/babel__core": "^7.20.0", | ||
"@types/babel__generator": "^7.6.4", | ||
"@types/babel__helper-plugin-utils": "^7.10.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
to do before merge