Nifi:如何独立于环境读取AWSCredentialsProviderControlerService的访问/密钥 [英] Nifi: How to read access/secret key for AWSCredentialsProviderControlerService independent of environment

查看:136
本文介绍了Nifi:如何独立于环境读取AWSCredentialsProviderControlerService的访问/密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们当前正在设置属性文件的路径,该文件包含AWSCredentialsProviderControlerService的凭据文件的秘密/访问密钥.问题是,每次运行nifi工作流程时,我们都在更改prod和non prod的属性路径.尝试不更改凭据文件路径上的配置,以便无论prod和non prod都将读取访问/秘密密钥.由于凭据文件将不支持Nifi Expresion语言,因此尝试利用访问密钥/秘密属性$ {ENV:equalsIgnoreCase("prod"):ifElse($ {ACESS_PROD},$ {ACESS_NONPROD})}我们面临的问题,我们无法将这些访问密钥/秘密密钥存储到注册表.因此无法实施此更改.无论Nifi中的环境如何,都有什么方法可以读取访问/秘密密钥.当前,我们将1个属性文件用于非prod nifi,将2nd个属性文件用于prod属性.在此设置中,当从生产切换到非生产时,需要手动将其更改为凭证文件路径.尝试无缝工作而不更改凭据文件的路径.有什么办法可以做到这一点?

We are currently set path of properties file which contains secret/access key for Credentials File for AWSCredentialsProviderControlerService . Issue, is we are changing properties path for prod and non prod each time we run nifi workflow. trying to come up no change on Configuration on Credential File path, so that access/secret key would be read regardless of prod and non prod. Since credential file wont support Nifi Expresion language, trying to make use of ACCESS KEY/SECRET properties ${ENV:equalsIgnoreCase("prod"):ifElse(${ACESS_PROD},${ACESS_NONPROD})} Issue we are facing, we are not able to store these access key/secret keys to the registry. Hence unable to implement this change. Is there any way to read access/secret key regardless of environment in Nifi. Curently we are using 1 property file for non prod nifi and 2nd property file for prod properties. In this set up, manually need to changed to credential file path when switching from prod to non prod. Trying to seamlessly work without changing path of credential file. Is there any way to make this happen?

在此处输入图片描述

推荐答案

使用AWSCredentialsProviderControlerService的过程不支持参数或变量,但会使用AWSCredentialsProviderControlerService凭据文件".属性支持参数上下文"作为条目,请在您的解决方案中使用它.

The process that uses the AWSCredentialsProviderControlerService does not support param or variables, but the AWSCredentialsProviderControlerService "credential file" property supports "Parameters Context" as entries, make use of this for your solution.

示例:

触发某些问题->RouteOnAttribute->如果是Prod(运行executestreamcmd并更改参数上下文值以指向prod credfile),否则如果是DEV(运行executestreamcmd并更改参数上下文值以指向prod credfile)->然后运行您的AWS处理器.

Trigger something --> RouteOnAttribute --> If Prod (run executestreamcmd and change the Parameter Context Value to point to prod credfile) else if DEV(run executestreamcmd and change the Parameter Context Value to point to prod credfile) --> then run you AWS Processor.

您可以使用工具包客户端来编辑参数上下文或事件nipyapi python模块.Tohu不会很快.

You can use the toolkit client to edit the parameter context, or event nipyapi python module. It will not be fast tohu.

这篇关于Nifi:如何独立于环境读取AWSCredentialsProviderControlerService的访问/密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆