sh 为Cloud Foundry UAA生成签名密钥和验证密钥

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 为Cloud Foundry UAA生成签名密钥和验证密钥相关的知识,希望对你有一定的参考价值。

#!/bin/bash
openssl genrsa -out privkey.pem 2048
openssl rsa -pubout -in privkey.pem -out pubkey.pem

SIGNING_KEY=$(cat privkey.pem)
VERIFICATION_KEY=$(cat pubkey.pem)

JWT_SIGNING_KEYS=$(cat <<EOF
jwt:
   token:
      signing-key: |
$(echo "$SIGNING_KEY" | awk '{printf "       %s\n", $0}') 
      verification-key: |
$(echo "$VERIFICATION_KEY" | awk '{printf "       %s\n", $0}')
EOF
)

echo "$JWT_SIGNING_KEYS" > uaa_config.yml

rm privkey.pem
rm pubkey.pem

以上是关于sh 为Cloud Foundry UAA生成签名密钥和验证密钥的主要内容,如果未能解决你的问题,请参考以下文章

Syslog 和 Cloud Foundry/Bluemix

Cloud Foundry平台中国唯一云供应商,阿里云持续链接Cloud Foundry/Kuber

Pivotal Cloud Foundry安全原理解析

Cloud FoundryCould Foundry学习——Could Foundry浅谈

Kubo更名为CFCR,成为Cloud Foundry部署Kubernetes的默认方案

Cloud FoundryCould Foundry学习——核心组件分析