grafana/pkg/setting
Ben Sully 632ca67e3f
Add a separate grafana.com API URL setting (#59506)
The GrafanaComURL setting is currently used in two places:

- the /api/gnet endpoint, which proxies all requests to the URL
  configured in GrafanaComURL
- OAuth logins using grafana.com, where the auth URL, token URL and
  redirect URL are all configured to use the GrafanaComURL.

This has worked fine until now because almost all Grafana instances have
just used the default value, https://grafana.com. However, we now have a
few different grafana.com's, some of which are behind IAP. The IAP
causes the /api/gnet proxy to fail because the required cookies are not
present in the request (how could they be?). Setting the
[grafana_net.url] setting to an internal-only URL improves the situation
slightly - the proxy works again just fine - but breaks any OAuth logins
using grafana.com, because the user must be redirected to a publicly
accessible URL.

This commit adds an additional setting, `[grafana_com.api_url]`,
which can be used to tell Grafana to use the new API URL when proxying
requests to the grafana.com API, while still using the existing
`GrafanaComURL` setting for other things.

The setting will fall back to the GrafanaComURL setting + "/api" if unset.
2022-12-01 18:06:12 +01:00
..
testdata Config: Show user-friendly error message instead of stack trace (#16564) 2019-04-25 08:29:07 +02:00
date_formats_test.go setting: Fix tests on Mac (#28886) 2020-11-09 14:39:56 +01:00
date_formats.go Prometheus: Support 1ms resolution intervals (#44707) 2022-06-29 07:39:50 +02:00
dynamic_settings_test.go Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
expanders_test.go Handle ioutil deprecations (#53526) 2022-08-10 15:37:51 +02:00
expanders.go Handle ioutil deprecations (#53526) 2022-08-10 15:37:51 +02:00
provider.go FeatureToggls: remove IsFeatureToggleEnabled from SettingsProvider (#44574) 2022-02-01 10:24:59 -08:00
setting_azure_test.go Migrate to Grafana Azure SDK (#47232) 2022-04-04 11:23:13 +02:00
setting_azure.go Migrate to Grafana Azure SDK (#47232) 2022-04-04 11:23:13 +02:00
setting_dashboard_previews.go Previews: refactor (#47728) 2022-04-25 01:55:10 +04:00
setting_data_proxy.go Datasource: Remove deprecated max_idle_connections_per_host setting (#49948) 2022-05-31 18:19:12 +02:00
setting_feature_toggles_test.go FeatureFlags: define features outside settings.Cfg (take 3) (#44443) 2022-01-26 09:44:20 -08:00
setting_feature_toggles.go FeatureFlags: define features outside settings.Cfg (take 3) (#44443) 2022-01-26 09:44:20 -08:00
setting_grafana_javascript_agent.go Frontend Logging: Integrate grafana javascript agent (#50801) 2022-06-28 03:25:30 -04:00
setting_plugins_test.go Backend Plugins: Plugin configuration using Grafana config (#23451) 2020-04-14 18:04:27 +02:00
setting_plugins.go NavTree: Make it possible to configure where in nav tree plugins live (#55484) 2022-09-28 08:29:35 +02:00
setting_quota.go Chore: Refactor quota service (#58643) 2022-11-14 21:08:10 +02:00
setting_search.go Search: Add search index configuration options (#55525) 2022-09-20 19:09:55 -04:00
setting_secure_socks_proxy.go Plugins: add option to proxy ds connections through a secure socks proxy (#59254) 2022-11-29 23:50:59 -06:00
setting_sentry.go Frontend Logging: Integrate grafana javascript agent (#50801) 2022-06-28 03:25:30 -04:00
setting_session_test.go Logging: Unify logging fakes (#48822) 2022-05-06 17:44:22 +02:00
setting_smtp.go Email: Allow configuration of content types for email notifications (#34530) 2021-07-19 13:31:51 +03:00
setting_storage.go Storage: externalize allow_unsanitized_svg_upload (#52703) 2022-07-25 21:11:17 +04:00
setting_test.go Add a separate grafana.com API URL setting (#59506) 2022-12-01 18:06:12 +01:00
setting_unified_alerting_test.go Refactor time durations (#58484) 2022-11-22 15:09:15 +08:00
setting_unified_alerting.go Refactor time durations (#58484) 2022-11-22 15:09:15 +08:00
setting.go Add a separate grafana.com API URL setting (#59506) 2022-12-01 18:06:12 +01:00