我正在运行一个shell脚本,以在okta + aws / s3之间启用cli sso(单点登录),如下所示,
#!/bin/bash
PREFIX=~/.okta bash <(curl -fsSL https://raw.githubusercontent.com/oktadeveloper/okta-aws-cli-assume-role/master/bin/install.sh) -i
cat >>.bash_profile <<EOF
#OktaAWSCLI
if [[ -f "$HOME/.okta/bash_functions" ]]; then
. "$HOME/.okta/bash_functions"
fi
if [[ -d "$HOME/.okta/bin" && ":$PATH:" != *":$HOME/.okta/bin:"* ]]; then
PATH="$HOME/.okta/bin:$PATH"
fi
EOF
cp ~/.okta/config.properties ~/.okta/config.properties_bck
cat >~/.okta/config.properties <<EOF
OKTA_ORG=dev-728773-admin.okta.com
OKTA_AWS_APP_URL=https://dev-728773.okta.com/home/amazon_aws/0oah1fb9k5nxiyKMk356/272
OKTA_ENV_MODE=true
EOF
source .bash_profile
但是我的脚本更有可能需要验证java,okta,aws cli,aws cli,脚本应该配置PATH和env变量,以便访问您推送到〜/ .okta /目录中的代码。 执行命令“ okta-aws,我应该获得以上所有输出。