-
Notifications
You must be signed in to change notification settings - Fork 12.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
OAuth: Support JMES path lookup when retrieving user email #14683
OAuth: Support JMES path lookup when retrieving user email #14683
Conversation
844d91d
to
e4b20bf
Compare
this looks ok, thoughs @DanCech ? |
@bobmshannon this looks like a really interesting approach for supporting extraction of dynamic json properties and I also see that this can be useful for other use cases in Grafana. Sorry for this PR review to have stalled, but are you still up for trying to get this to a merge:able state? We'll be available for any kind of support and review you may need. Looks like CLA is not signed yet which is weird since you've previously commited/contributed to Grafana - Please double check CLA. Then solve conflicts/rebase on master Thank you in advance! |
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.
Don't know how I missed this, the idea seems great just needs some tidying up.
Hey all, thanks for taking a look at this. I'll address the comments and rebase against master soon so we can get this merged. |
awesome @bobmshannon! apologies for the delay in getting back to you |
@ryantxu I heard that you maybe were looking into dynamic transformation of json so JMES Path may be interesting for you to look into if you already haven't. |
I am looking at add a general API datasource -- essentially read JSON and transform it to our internal data format. I tried various JSON transformation libraries and had the most success with http://jsonata.org/ See grafana-graphql-datasource for examples of the JSONata input that will transform semi-complex github response format JAMES looks great for picking a value out of a json document (this use case), but I found it pretty difficult to use to transform a general JSON document. JAMES seems to be more widely used: both libraries have a go implementation. I'm not sure we need to use the same one everywhere. I will also try again to see if I can get JAMES working again. |
@bobmshannon Could you please rebase your commits on master and to resolve the issue with signing the CLA either add the email of your first commit to your GitHub account or rewrite/squash your commits after rebased with master. Thanks |
b47d967
to
c593d2c
Compare
Signed-off-by: Bob Shannon <bobs@dropbox.com>
943f7ce
to
97ee6f8
Compare
@marefr I've updated the PR to address the remaining comments. |
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.
Looks great 👍 Just a minor comment and then we should be able to merge this
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.
Very nice 🎉
Thank you for contributing to Grafana! Sorry it took quite a while for us, but really appreciate your help and attitude for getting this merged to master. |
Nice! Thanks @bobmshannon |
* grafana/master: OAuth: Support JMES path lookup when retrieving user email (grafana#14683) Emails: resurrect template notification (grafana#18686) Email: add reply-to and direct attachment (grafana#18715)
* grafana/master: QueryEditor: check if optional func toggleEditorMode is provided (grafana#18705) Emails: remove the yarn.lock (grafana#18724) OAuth: Support JMES path lookup when retrieving user email (grafana#14683) Emails: resurrect template notification (grafana#18686) Email: add reply-to and direct attachment (grafana#18715)
* grafana/master: QueryEditor: check if optional func toggleEditorMode is provided (grafana#18705) Emails: remove the yarn.lock (grafana#18724) OAuth: Support JMES path lookup when retrieving user email (grafana#14683) Emails: resurrect template notification (grafana#18686) Email: add reply-to and direct attachment (grafana#18715) Dashboard: Adds Logs Panel (alpha) as visualization option for Dashboards (grafana#18641) Heatmap: Add Cividis and Turbo color schemes (grafana#18710) Units: add counts/sec (cps) and counts/min (cpm) in Throughput (grafana#18702) Dev Docker: Use golang:1.12.9-alpine to prevent glibc mismatch. (grafana#18701) Docs: Fix broken link for the Grafana on RHEL or Ubuntu tutorial (grafana#18697) Fixes several usability issues with QueryField component (grafana#18681) convert teams section of user profile to react (grafana#18633) Singlestat/Gauge/BarGauge: Improvements to decimals logic and added test dashboard (grafana#18676) Emails: Change text (grafana#18683)
* grafana/master: @grafana/data: improve the CircularVector api (grafana#18716) QueryEditor: check if optional func toggleEditorMode is provided (grafana#18705) Emails: remove the yarn.lock (grafana#18724) OAuth: Support JMES path lookup when retrieving user email (grafana#14683) Emails: resurrect template notification (grafana#18686) Email: add reply-to and direct attachment (grafana#18715) Dashboard: Adds Logs Panel (alpha) as visualization option for Dashboards (grafana#18641) Heatmap: Add Cividis and Turbo color schemes (grafana#18710) Units: add counts/sec (cps) and counts/min (cpm) in Throughput (grafana#18702) Dev Docker: Use golang:1.12.9-alpine to prevent glibc mismatch. (grafana#18701) Docs: Fix broken link for the Grafana on RHEL or Ubuntu tutorial (grafana#18697) Fixes several usability issues with QueryField component (grafana#18681) convert teams section of user profile to react (grafana#18633) Singlestat/Gauge/BarGauge: Improvements to decimals logic and added test dashboard (grafana#18676) Emails: Change text (grafana#18683) Streaming: improve JSDocs for DataSourceAPI streaming support (grafana#18672) TimeSrv: Enable value time windowing in TimeSrv (grafana#18636) Explore: Fixes so Show context shows results again (grafana#18675) Graph: Updated y-axis ticks test dashboard (grafana#18677) Add typings to package.json in packages (grafana#18640)
* grafana/master: Explore: Use PanelQueryState to handle querying (grafana#18694) Chore: Improve err message for notifications (grafana#18757) @grafana/toolkit: add package versions to the ci report (grafana#18751) @grafana/data: Matchers and Transforms (grafana#16756) Docs: Document LDAP config reload in admin http api (grafana#18739) center NoDataSourceCallToActionCard in Explore (grafana#18752) DataLinks: enable data links in Gauge, BarGauge and SingleStat2 panel (grafana#18605) DashboardDatasource: reuse query results within a dashboard (grafana#16660) Plugins: show a clear error on the plugin page when it failed to load (grafana#18733) Chore: Use ruleId instead of alertId as log keyword (grafana#18738) @grafana/data: improve the CircularVector api (grafana#18716) QueryEditor: check if optional func toggleEditorMode is provided (grafana#18705) Emails: remove the yarn.lock (grafana#18724) OAuth: Support JMES path lookup when retrieving user email (grafana#14683) Emails: resurrect template notification (grafana#18686) Email: add reply-to and direct attachment (grafana#18715) Dashboard: Adds Logs Panel (alpha) as visualization option for Dashboards (grafana#18641)
Closes #13353
This PR aims to increase the generality of the generic OAuth provider by allowing users to specify a JMES Path that Grafana will use to search for an e-mail address.