我已经有一个正在运行的AWS应用程序,并且我已经安装了Java 8。当我尝试onelogin-python-aws-assume role工具时,它工作得很好,并且我能够使用https://github.com/onelogin/onelogin-python-aws-assume-role登录
但由于某些原因,java one不能在https://github.com/onelogin/onelogin-aws-cli-assume-role上运行。
我遵循了这里的所有步骤,https://developers.onelogin.com/api-docs/1/samples/aws-cli
1-我创建了开发人员API密钥,2-我使用API密钥更新了onelogin.sdk.properties 3-下载了最新的onelogin-aws-cli.jar 4- Ran "java -jar onelogin-aws-cli.jar --配置文件主文件--appid 33333 --子域公司名--区域eu-west-2 --用户名我的用户名“
然后,我得到以下输出:
OneLogin AWS假设角色工具
15:12:33.727主调试com.onelogin.sdk.util.Settings属性文件onelogin.sdk.properties在线程" main“中加载成功异常{OAuthProblemException=‘未授权’,description=‘验证失败’,uri='null',com.onelogin.sdk.util.Settings=‘401’,scope='null',redirectUri='null',responseStatus=401,org.apache.oltu.oauth2.common.exception.OAuthProblemException.error(OAuthProblemException.java:59) at org.apache.oltu.oauth2.client.validator.OAuthClientValidator.validateErrorResponse(OAuthClientValidator.java:63) at org.apache.oltu.oauth2.client.validator.OAuthClientValidator.validate(OAuthClientValidator.java:48) at org.apache.oltu.oauth2.client.response.OAuthClientResponse.validate(OAuthClientResponse.java:127) at com.onelogin的parameters={}}.sdk.conn.OneloginOAuthJSONAccessTokenResponse.init(OneloginOAuthJSONAccessTokenResponse.java:24)在org.apache.oltu.oauth2.client.response.OAuthClientResponse.init(OAuthClientResponse.java:101)在org.apache.oltu.oauth2.client.response.OAuthAccessTokenResponse.init(OAuthAccessTokenResponse.java:60)在org.apache.oltu.oauth2.client.response.OAuthClientResponse.init(OAuthClientResponse.java:120)在org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory.createCustomResponse(OAuthClientResponseFactory.java:82) at com.onelogin.sdk.conn.OneloginURLConnectionClient.execute(OneloginURLConnectionClient.java:75) at com.onelogin.sdk.conn.Client.getAccessToken(Client.java:168) at com.onelogin.aws.assume.role.cli.OneloginAWSCLI.main(OneloginAWSCLI.java:160)
发布于 2018-11-03 16:52:21
我最终解决了这个问题..原来我用错了onelogin.sdk.properties
https://stackoverflow.com/questions/53115102
复制相似问题