如何在不使用工作室的情况下更改上下文文件中的加密密码

发布于 2025-02-04 15:14:32 字数 99 浏览 1 评论 0 原文

我正在使用组上下文来配置数据库连接。数据库的密码具有密码类型。部署作业时,密码会在默认值中自动加密。 如果我想在不使用工作室(在客户端环境上)更改密码怎么办?我可以用什么来加密新密码?

I am using a group context to configure the db connection. The password of the db has a password type. When deploying the job, the password is automatically encrypted in the default.properties under the contexts folder.
What if i want to change the password without using the studio (on a client environment)? what can i use to encrypt the new password?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花开浅夏 2025-02-11 15:14:32

我能够通过使用TJAVA组件创建单独的加密作业和以下代码来做到这一点:

System.out.println(routines.system.PasswordEncryptUtil.encryptPassword(context.Password));

whene context.password是类型字符串的输入上下文变量。运行作业时,提示用户输入密码,然后打印加密的TALEND密码。它将具有以下格式:enc:groadine.encryption.key.v1:[EncryptedPassword]如果需要,可以通过以下链接修改例程加密密钥:

I was able to do it by creating a separate encryption job with a tjava component and the following code:

System.out.println(routines.system.PasswordEncryptUtil.encryptPassword(context.Password));

where context.Password is an input context variable of type String. When running the job, the user is prompted to enter a password and then the encrypted Talend password will be printed. It will have the following format: enc:routine.encryption.key.v1:[encryptedPassword] The routine encryption key can be modified if needed by following this link: https://help.talend.com/r/en-US/8.0/installation-guide-data-integration-windows/rotating-encryption-keys-in-talend-studio

放赐 2025-02-11 15:14:32

实际上,有几种方法:

myjob.sh - -Context_param mypassword = pass123

不幸的是,任何人都可以通过PS / Task Manager看到。

您还可以编辑上下文/上下文名称。这样,只有在您可以访问文件时才能看到上下文。

从理论上讲,两者都应该能够接受clearText/加密密码。

隐式上下文负载功能也可以用于加载上下文: https://help.talend.com/r/r/en-us/8.0/data-integration-job-job-examples/creating-job-anding-job-anding-job-and-defining-contining-context-context-variables < /a>

There's actually a few ways for this:

myJob.sh --context_param myPassword=pass123

this unfortunately can be seen by anyone via ps / task manager.

You can also edit the contexts/contextName.properties file and change the context parameters there. This way the context can only be seen if you have access to the file.

Theoretically both should be able to accept the cleartext/encrypted password.

Implicit context load feature can also be used to load contexts: https://help.talend.com/r/en-US/8.0/data-integration-job-examples/creating-job-and-defining-context-variables

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文