Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Jan 27, 2024
2 parents c78622c + 7558c4b commit d425e39
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
3 changes: 3 additions & 0 deletions cmd/ack-ram-tool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/AliyunContainerService/ack-ram-tool/pkg/ctl/rrsa"
"github.com/AliyunContainerService/ack-ram-tool/pkg/ctl/version"
"github.com/AliyunContainerService/ack-ram-tool/pkg/log"
vs "github.com/AliyunContainerService/ack-ram-tool/pkg/version"
"github.com/spf13/cobra"
)

Expand All @@ -29,6 +30,8 @@ More info: https://github.com/AliyunContainerService/ack-ram-tool`,
golog.Println(err)
os.Exit(1)
}
log.Logger.Debugf("Version: %s GitCommit: %s", vs.Version, vs.GitCommit)
log.Logger.Debugf("argv: %v", os.Args)
},
}
)
Expand Down
27 changes: 14 additions & 13 deletions examples/rrsa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
Examples for RRSA Usage.


| sub-directory | description |
|-------------------|---------------------------------------------------------------------------------------------------------------------------|
| go-sdk | Using [Alibaba Could Go SDK](https://github.com/aliyun/alibabacloud-go-sdk) with RRSA Auth |
| oss-go-sdk | Using [aliyun-oss-go-sdk](https://github.com/aliyun/aliyun-oss-go-sdk) with RRSA Auth |
| log-go-sdk | Using [aliyun-log-go-sdk](https://github.com/aliyun/aliyun-log-go-sdk) with RRSA Auth |
| java-sdk | Using [Alibaba Could Java SDK](https://github.com/aliyun/alibabacloud-java-sdk) with RRSA Auth |
| oss-java-sdk | Using [aliyun-oss-java-sdk](https://github.com/aliyun/aliyun-oss-java-sdk) with RRSA Auth |
| log-java-sdk | Using [aliyun-log-java-sdk](https://github.com/aliyun/aliyun-log-java-sdk) with RRSA Auth |
| python3-sdk | Using [Alibaba Could Python 3 SDK](https://github.com/aliyun/alibabacloud-python-sdk) with RRSA Auth |
| nodejs-sdk | Using [Alibaba Could Node.js/TypeScript SDK](https://github.com/aliyun/alibabacloud-typescript-sdk) with RRSA Auth |
| kaniko-in-ack | Building docker image with [Kaniko](https://github.com/GoogleContainerTools/kaniko) then push image to ACR with RRSA Auth |
| aliyuncli-demo | Using [aliyun-cli](https://github.com/aliyun/aliyun-cli) with RRSA Auth |
| aliyunlogcli-demo | Using [aliyun-log-cli](https://github.com/aliyun/aliyun-log-cli) with RRSA Auth |
| sub-directory | description |
|----------------------------|---------------------------------------------------------------------------------------------------------------------------|
| go-sdk | Using [Alibaba Could Go SDK](https://github.com/aliyun/alibabacloud-go-sdk) with RRSA Auth |
| oss-go-sdk | Using [aliyun-oss-go-sdk](https://github.com/aliyun/aliyun-oss-go-sdk) with RRSA Auth |
| log-go-sdk | Using [aliyun-log-go-sdk](https://github.com/aliyun/aliyun-log-go-sdk) with RRSA Auth |
| java-sdk | Using [Alibaba Could Java SDK](https://github.com/aliyun/alibabacloud-java-sdk) with RRSA Auth |
| oss-java-sdk | Using [aliyun-oss-java-sdk](https://github.com/aliyun/aliyun-oss-java-sdk) with RRSA Auth |
| log-java-sdk | Using [aliyun-log-java-sdk](https://github.com/aliyun/aliyun-log-java-sdk) with RRSA Auth |
| python3-sdk | Using [Alibaba Could Python 3 SDK](https://github.com/aliyun/alibabacloud-python-sdk) with RRSA Auth |
| nodejs-sdk | Using [Alibaba Could Node.js/TypeScript SDK](https://github.com/aliyun/alibabacloud-typescript-sdk) with RRSA Auth |
| kaniko-in-ack | Building docker image with [Kaniko](https://github.com/GoogleContainerTools/kaniko) then push image to ACR with RRSA Auth |
| aliyuncli-demo | Using [aliyun-cli](https://github.com/aliyun/aliyun-cli) with RRSA Auth |
| aliyunlogcli-demo | Using [aliyun-log-cli](https://github.com/aliyun/aliyun-log-cli) with RRSA Auth |
| terraform-demo/rrsa-config | RRSA Configuration Via Terraform |

[//]: # (| ossutil-demo | Using [ossutil](https://github.com/aliyun/ossutil) with RRSA Auth |)

6 changes: 3 additions & 3 deletions pkg/ctl/rrsa/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ func AllowRRSAFeatureOrDie(ctx context.Context, clusterId string, client *openap
if c.State != types.ClusterStateRunning {
common.ExitByError(fmt.Sprintf("cluster state is not running: %s", c.State))
}
if c.ClusterType != types.ClusterTypeManagedKubernetes {
common.ExitByError("only support managed cluster")
}
//if c.ClusterType != types.ClusterTypeManagedKubernetes {
// common.ExitByError("only support managed cluster")
//}
return c
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/ramauthenticator/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func generatePreSignedReq(request *openapi.OpenApiRequest, params *openapi.Param
return nil, _err
}
if !tea.BoolValue(util.Empty(securityToken)) {
newReq.Headers["x-acs-accesskey-id"] = accessKeyId
//newReq.Headers["x-acs-accesskey-id"] = accessKeyId
newReq.Headers["x-acs-security-token"] = securityToken
}

Expand Down

0 comments on commit d425e39

Please sign in to comment.