Skip to content
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

External URL allow list service #69411

Closed
streamich opened this issue Jun 17, 2020 · 10 comments · Fixed by #81234
Closed

External URL allow list service #69411

streamich opened this issue Jun 17, 2020 · 10 comments · Fixed by #81234
Assignees
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed

Comments

@streamich
Copy link
Contributor

streamich commented Jun 17, 2020

We need to create a global allow list of external URLs to which Kibana users will be allowed to navigate away from Kibana. One user of such service will be URL drilldown but I believe there are many more potential users. For example, all Markdown links could be checked against this allow list before navigating to an external URL.

Food for thought:

  • The service could be opt-in or opt-out.
  • List of allowed external URLs* could live in kibana.yml.
  • How granular should we verify the URL? Should we verify origin—protocol + domain + port?
  • Should we support wildcards http://google.com/*?
  • Shall there be an option to allow all URLs *?
  • Will the service be available on client or server? Or only on the server?

I'm pinging Security and Platform teams as in our discussion these two teams were considered as likely owners of this service.

@streamich streamich added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed labels Jun 17, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@streamich
Copy link
Contributor Author

streamich commented Jun 17, 2020

@elastic-jb we will need this implemented by Security or Platform team for URL drilldown to support external URL allow list

@streamich streamich changed the title External URL whitelist External URL whitelist service Jun 17, 2020
@arisonl
Copy link
Contributor

arisonl commented Jun 30, 2020

Watcher has a relevant setting too: xpack.http.whitelist

@legrego
Copy link
Member

legrego commented Jun 30, 2020

Thanks for opening this @streamich.

  • The service could be opt-in or opt-out.

++, I think we could default to a permissive allow-list which allows all external URLs.

  • List of allowed external URLs* could live in kibana.yml.

This makes sense to me as well. I could see a future where this becomes a space-aware advanced setting, but it doesn't strike me as something we necessarily want to expose right now, since we don't have granular access controls over these settings today.

  • How granular should we verify the URL? Should we verify origin—protocol + domain + port?

I haven't given this a ton of thought yet, but I think we could ideally support the host-source formats that CSP permits. This gives the flexibility of optionally specifying scheme and port (I think we can ignore the path property for this)

  • Should we support wildcards http://google.com/*?

I think wildcards for scheme and host are acceptable (see previous answer regarding host-source), but I don't know if we need the granularity of path restrictions. I'm not saying we don't, but we can potentially reduce scope by omitting that for the first phase if it makes sense to do so.

  • Shall there be an option to allow all URLs *?

Yeah, I think this could be the default experience, which gives the impression of opting out of this service, without having to explicitly disable it.

  • Will the service be available on client or server? Or only on the server?

This might live in both places. I expect we would want to ensure that any redirects that the server attempts to issue comply with the specified rule set. Again, I haven't given this a ton of thought yet, though.

@joshdover
Copy link
Contributor

Just a friendly reminder that Elastic is moving away from loaded terminology like "whitelist" and "blacklist". We have decided to use "allowlist" and "blocklist" instead.

@elastic-jb
Copy link

elastic-jb commented Jul 8, 2020 via email

@streamich streamich changed the title External URL whitelist service External URL allow list service Jul 12, 2020
@legrego legrego self-assigned this Oct 14, 2020
@legrego
Copy link
Member

legrego commented Oct 16, 2020

Discussed with @streamich and we think we can start with a client-side approach to fulfill their needs initially. This will also alleviate the immediate need for #45815, since the client will always know what Kibana's public URL is.

@joshdover I'm expecting that this will be a core service. Do you have any opinions on where this should live within core? core.externalUrl, core.http.externalUrl, or someplace else altogether?

@pmuellr
Copy link
Member

pmuellr commented Nov 20, 2020

Alerting has a similar setting, xpack.actions.allowedHosts - so we should figure out how to eventually deprecate that one and switch to this new one.

We're also trying to figure out how to enable all the various ssl/tls configuration options, that kinda go along with this, probably good to have all this stuff in the same place, eventually: #80120

@legrego
Copy link
Member

legrego commented Nov 30, 2020

I agree @pmuellr, consolidating these various config options over time makes a lot of sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants