【问题标题】:How to hide manifest variables, so that it is less exposed?如何隐藏清单变量,使其暴露更少?
【发布时间】:2017-04-03 18:32:40
【问题描述】:

我将我的 oauth 凭据存储在 Cloud Foundry 的 env 变量中。我使用的服务器是 TomCat。如何在我的清单文件中屏蔽我的环境变量,以便我的 clientId 和 secrets 不会被暴露?我见过用户使用属性占位符的例子。

 spring:
    profiles:
      active: dev
    thymeleaf:
      prefix: classpath:/templates/
      suffix: .html
      mode: HTML5
      encoding: UTF-8
      content-type: text/html
      cache: true

  env:        
    accessTokenUri: https://mytokenURI
    apiUrl: https://apiUrls/
    clientId: someID
    clientSecret: NotTellingYou
    scope: scope

尝试

在我的系统环境变量中,我添加了键“accessTokenUri”和值。

 env:        
   accessTokenUri: ${accessTokenUri}
   apiUrl: https://apiUrls/
   clientId: someID
   clientSecret: NotTellingYou
   scope: scope

//output
Property '${accessTokenUri}' found in manifest. This feature is no longer supported. Please remove it and try again.

【问题讨论】:

  • 你使用的是哪个服务器?
  • 我正在使用 tomcat 将其部署到云代工厂

标签: spring properties manifest cloud-foundry


【解决方案1】:

【讨论】:

  • 加密是一种很好的方法。我猜不可能使用属性占位符?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-03-30
  • 1970-01-01
  • 2016-09-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多