-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Actions] Research on the different OAuth authentication flows to find the best fits for the actions API functionality. #79372
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Have we talked to security folks about this? They likely have some thoughts. I'd think anything involving a callback url BACK to Kibana will end up being problematic. Might work for some deployments, but one obvious problem is Kibana instances not visible on the public internet - servicenow wouldn't be able to connect to invoke the callback url. I think right now, cloud deployments are publicly visible, however who knows - we might end up supporting some story for cloud where deployments could be exposed through a customer's VPN, which would make them not publicly visible again. The option of using a refresh token and access token seem like they could work, but would we store the access token in the secrets? That doesn't quite seem right, since in theory ANY actionType might want to use OAUTH access. I wonder if the access and refresh tokens would be better stored elsewhere, like where we plan to store per-action/server/whatever TLS options. |
@elastic/kibana-security any thoughts or existing tools to support OAuth on the Kibana level? |
Unfortunately we don't have anything OIDC related in Kibana that you could leverage for your use case since heavy lifting and back channel communication is done on the Elasticsearch side. Having said that I'm not sure if you really need to deal with any OAuth flows that involve browser/callbacks, it seems what you really need is |
Cool, that SN Rest OAuth looks like the usual refresh/access token flow, no need for a callback. I expect a lot of APIs that support "OAuth" will work this way. I guess what we should do is add all the OAuth goodness to the SN connector first, the next connector that needs this, we can then abstract that out into a reusable set of modules. We need to think about:
|
Blocked by #80120 |
I'm wondering how many other actions could be affected, besides ServiceNow and webhook. Thinking that these might also need it: Jira, IBM Resilient, PagerDuty, MS Teams. Presumably we can enable these as needed, by adding the appropriate code in the actions plugins / ui. Do we need a management interface for this? Something to list the current OAuth grants, allow them to be "deleted / invalidated" (for security / off-boarding use cases), or to explicitly refresh them? And in general, just to see what grants are being used. I don't think we would be "creating" them here, they would get created when an action specifies it wants to auth with OAuth instead of user/pass. If we store the grant info in a SO, presumably it would be keyed off the connector id. Which means after a connector is deleted, we should also delete the grant info SO. We could do this specifically in the connector delete logic - not sure if there's a reason why we would want to keep an old version around. What happens if a user switches from user/pass to OAuth then back to user/pass then back to OAuth - should we keep all the OAuth info around? Seems like we probably would. |
Based on the comparison of the different OAuth flows which supports server-to-server communication (not require a user consent interaction like OAuth Authorization Code flow), without a complicated handling of the access/refresh tokens lifetime bottlenecks, meets the customers security requirements (not use OAuth
|
A Client has requested support for OAuth authentication feature in the ServiceNow and Webhook connectors.
Their security requirements do not allow the use of user credentials as a means of authentication for connectors to ServiceNow, Webhook.
Cost of delay:
This is turns out to be a blocker for their adoption of ESS given we don't have a way to support OAuth.
I've investigated how it could be done for ServiceNow in the REST API:
https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/security/concept/c_OAuthAuthorizationCodeFlow.html
Some research on OAuth error paths that we can use to figure out how to deal with, diagnose, remediate errors: #109919
Update (11/04/2021):
The resent research come up with the alternative approach to the OAuth Authorization Code Flow - OAuth JSON Web Token flow, which is better designed and fitted for our server to external server communication.
The details could be found in the POC description #117469
The text was updated successfully, but these errors were encountered: