-
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
[Connectors] moves the connector deprecation check to the server side #130541
[Connectors] moves the connector deprecation check to the server side #130541
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
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.
API docs changes LGTM!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Uptime changes LGTM !!
💚 Build SucceededMetrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
@@ -146,6 +149,7 @@ describe('updateActionRoute', () => { | |||
name: 'My name', | |||
config: { foo: true }, | |||
isPreconfigured: false, | |||
isDeprecated: false, |
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.
Should we test at least one of the routes with a isDeprecated: true
result?
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.
As we have a few of those in the end-to-end tests I didn't think it was critical to have every possible output covered in the unit test as well at route level (it is tested on the client itself).
Thanks Ersin!
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 we think that a positive test case is not required in for some test cases the rest LGTM :)
export const isConnectorDeprecated = ( | ||
connector: RawAction | ConnectorWithOptionalDeprecation | ||
): boolean => { | ||
if (connector.actionTypeId === '.servicenow' || connector.actionTypeId === '.servicenow-sir') { |
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.
Do we not need to worry about .servicenow-itom
?
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.
I don't know - I just moved the existing check to the server side.
@cnasikas ?
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.
Christos is on PTO, so I'll leave that enhancement to another time (seeing as this is the existing functionality on main
).
Thanks for the feedback @ymao1
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 @gmmorris for this PR 🚀 ! .servicenow-itom
does not use an application so we do not have to worry about it.
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.
Security Solution changes LGTM
…elastic#130541) This PR fixes a UI glitch where preconfigured connectors couldn't show a deprecation warning on SN connectors as the check on the client side couldn't support them.
Summary
This PR moves the deprecation check for connectors to the server side.
This is groundwork needed to address an issue raised by this cases PR: #130372
With Cases supporting PreConfigured connectors again they need to be able to identify deprecated connectors even when they are PreConfigured.
This change is required as the deprecation check for ServiceNow relies on the configuration of the connector, and exposing this configuration to users can be problematic from a security perspective. While this is relatively safe with regular connectors, as we can perform a privilege check for these, it's less secure for preconfigured connectors, as these are not space aware.
To address this this PR:
is_deprecated
field on APIs such asget
,getAll
,create
etc.Checklist
Delete any items that are not applicable to this PR.
Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportAny UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker listThis renders correctly on smaller devices using a responsive layout. (You can test this in your browser)This was checked for cross-browser compatibilityFor maintainers