我有一个控制台应用程序,具有在VM上运行的日志记录,调度等。它与实体框架,Azure SQL Server,Azure blob存储和大量外部API一起使用。
我想把它变成一项服务。
我知道可以使用辅助角色来完成此操作,但是在查看有关辅助角色的各种教程时,似乎需要大量工作来重写整个内容。
如果我只是将其发布为网络作业,那么假设我没有任何公开的端点,这是否安全?我需要确保活动目录之外的任何人都不能访问它。
有没有一种方法可以创建一个没有端点的虚拟应用程序服务并将其发布在那里?
如果我只是将其发布为网络作业,那么假设我没有任何公开的端点,这是否安全?我需要确保活动目录之外的任何人都不能访问它。
正如Peter Bons所说,如果它不公开API或端点,则没有人可以访问它。
有没有一种方法可以创建一个没有端点的虚拟应用程序服务并将其发布在那里?
通常,我们在Azure App Service Web应用程序中运行WebJobs,并且可以通过URL访问/浏览该Azure App Service Web应用程序。如果要阻止用户浏览到该Azure App Service Web应用程序,可以将重写规则添加到站点的web.config中以阻止Web访问。
<rule name="Block unauthorized traffic to staging sites" stopProcessing="true">
<match url=".*" />
<conditions>
<!-- Enter your site host name here as the pattern-->
<add input="{HTTP_HOST}" pattern="^sitehostname\." />
<!-- Enter your white listed IP addresses -->
<add input="{REMOTE_ADDR}" pattern="123\.123\.123\.1" negate="true"/>
<!-- Add the white listed IP addresses with a new condition as seen below -->
<!-- <add input="{REMOTE_ADDR}" pattern="123\.123\.123\.2" negate="true"/> -->
</conditions>
<action type="CustomResponse" statusCode="403" statusReason="Forbidden"
statusDescription="Site is not accessible" />
</rule>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句