我尝试在Apache Nifi中使用OAuth 2.0访问Google API(Google AnalyticsAPI v4) . 我使用基于此文档的服务帐户:https://developers.google.com/identity/protocols/OAuth2ServiceAccount
如果使用OAuth 2.0 for Service Account(Google API),则有一个特定时刻:这些服务帐户方案需要创建和加密签名JSON Web令牌(JWT) . OAuth访问的最佳示例将使用NiFi JWT:
-
创建JWT
-
从Google OAuth 2.0授权服务器请求访问令牌
-
处理来自授权服务器的JSON响应
第1点(约JWT)最有趣 .
是否有针对Google Analytics的已实施流程的示例?
谢谢
1 回答
我不知道Google Analytics的具体内容,但有很多使用Apache NiFi的OAuth 1.0 / 2.0访问示例 . 通常,您将使用
InvokeHTTP
处理器执行GET
/POST
/ etc . 针对远程 endpoints 的HTTP操作 .如果没有指定您遇到的问题,我建议您阅读这些文章:
HCC: Using GetHTTP for Salesforce Integration with OAuth2.0 authentication parameter
OAuth 1.0A with Apache NiFi (Twitter API example)
How to set Twitter OAuth attributes to InvokeHttp processor for fetching twitter user profiles
NiFi OAuth 2.0 Template
Google Vision & Apache NiFi - Making Advanced Computer Vision Feasible