如何在Azure功能上启用JCE无限强度策略? [英] How can I enable the JCE Unlimited Strength Policy on Azure Functions?

查看:156
本文介绍了如何在Azure功能上启用JCE无限强度策略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个执行某些自定义加密/解密功能的应用程序,并且需要安装JCE无限强度策略才能使其正常工作. Java(从1.8.0_151开始)具有内置功能,您可以通过config在有限/无限强度之间进行切换 (crypto.policy = unlimited),但是在此之前,您必须将几个JAR放置在所使用的Java JVM的jre/lib/security目录中.

I have a function app that does some custom encryption/decryption, and I need the JCE Unlimited Strength Policy installed for it to work.  Java (starting at 1.8.0_151) has it built-in, and you can switch between limited/unlimited strength via config (crypto.policy=unlimited), but before that you had to place a couple JARs in the jre/lib/security directory of the Java JVM you were using.

我无法通过Azure函数启用JCE无限强度策略.它可以在我的本地PC上正常运行,但是当我部署到Azure时失败.我要么需要将必需的JAR添加到Azure上的现有JVM,然后为 Azure来使用,或使用必需的JAR部署我自己的JVM,并告诉Azure使用它.

I'm having trouble enabling the JCE Unlimited Strength Policy with Azure Functions.  It runs fine on my local PC but fails when I deploy to Azure.  I either need to add the required JARs to the existing JVM on Azure, specify a different JVM for Azure to use, or deploy my own JVM with the required JARs and tell Azure to use that.

我无法弄清楚如何做这些事情-无法修改现有JVM内容,看不到告诉Azure使用哪个JVM的方法,也看不到让Azure兑现一个方法的方法.通过设置JAVA_HOME/JRE_HOME来设置不同的JVM.

I can't figure out how to do any of these things - I cannot modify the existing JVM contents, I cannot see a way to tell Azure which JVM to use, and I cannot see a way to get Azure to honor a different JVM by setting JAVA_HOME/JRE_HOME.

将Java Webapp部署到Azure时遇到了同样的问题,但是能够在那里解决它.使用该系统,我可以覆盖我的JAVA_HOME和JRE_HOME变量,以指向一个自定义JVM,该自定义JVM是我在安装JCE Unlimited的位置安装的 实力政策.如果我尝试在Azure Functions上做同样的事情,它实际上会重命名那些环境变量并添加前缀("APPSETTING_JAVA_HOME"和"APPSETTING_JRE_HOME"),这意味着它们实际上并没有按预期使用.

I had this same issue when deploying a Java webapp to Azure, but was able to resolve it over there.  With that system, I was able to override my JAVA_HOME and JRE_HOME variables to point at a custom JVM I installed where I had installed the JCE Unlimited Strength policy.  If I try to do the same thing on Azure Functions, it actually renames those environment variables and adds prefixes ('APPSETTING_JAVA_HOME' and 'APPSETTING_JRE_HOME'), meaning they don't actually get used as intended.

我该如何解决?

推荐答案

谢谢.我正在与功能产品"小组进行内部合作,以确定是否可行.了解更多信息后,我会及时更新. 
Thanks for the question. I am working internally with our Functions Product group to determine if this is possible. I will update you once I have more information. 


这篇关于如何在Azure功能上启用JCE无限强度策略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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