我正在尝试使用具有默认配置文件的 Gossamer3 SSO 工具设置 AWS SSO。当我第一次这样做时,效果很好。与 AWS 的连接是在 AWS CLI 中建立的(使用最新版本:aws-cli/2.14.6)。但是,默认情况下,它会设置一个小时的过期令牌,然后一小时后我无法再次登录。
因此,我删除了路径
.aws
中的.gossamer3.yaml
文件夹和C:\Users\<user_id>
文件,并尝试再次在这里设置,这创建了相同的文件夹和文件。现在无法从 CLI 登录 AWS。
gossamer3 configure
此配置在用户路径中创建了一个
.gossamer3.yaml
文件。
接下来,当我尝试使用 gossamer3 登录 AWS 时,如下所示,但失败了。
gossamer3 login -a default
它在用户路径中创建了一个文件夹
.aws
。
凭证文件内容。
错误:
level=error msg="error logging into aws role using saml assertion: failed to create session: LoadCustomCABundleError: failed to open custom CA bundle PEM file\ncaused by: open C:\\Users\\<USER>\\Documents\\RootCert.pem: The system cannot find the file specified.\n"
请帮我解决这个问题。谢谢!
问题已解决。实际上,在设置 AWS CLI 和 Gossamer3 时,不知何故在 Windows 环境变量中设置了一个环境变量
AWS_CA_BUNDLE
。我删除了它,它起作用了。
如果您查看该错误,它预计 Root_Cert.pem 文件存在于 Documents 文件夹中,但该文件夹不存在,因此会引发该错误。