-
Notifications
You must be signed in to change notification settings - Fork 184
Address Security issues in Connector and Agent #4380
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
base: main
Are you sure you want to change the base?
Address Security issues in Connector and Agent #4380
Conversation
Signed-off-by: rithin-pullela-aws <[email protected]>
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.
LGTM
|
Failed because of irrelevant error: |
| if (parser.currentToken() != XContentParser.Token.VALUE_STRING | ||
| && parser.currentToken() != XContentParser.Token.VALUE_NULL) { | ||
| throw new IllegalArgumentException( | ||
| "Credential values must be strings, found invalid type: " + parser.currentToken() |
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.
Better to avoid putting credential token in the exception string ?
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.
parser.currentToken does not print the value itself but rather the type of object.
| }); | ||
| assertEquals("Connector protocol is null", exception.getMessage()); | ||
| assertEquals( | ||
| "Connector protocol is null. Please use one of [aws_sigv4, http, mcp_sse, mcp_streamable_http]", |
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.
Better to use ConnectorProtocols.VALID_PROTOCOLS here also, Otherwise we need to keep on changing this exception string here whenever we add new protocols.
Or use contains() API and remove the protocol list part.
Description
This PR addresses some security issues:
Connector:
Agent:
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.