feat(nas): support access point rrsa authentication#1613
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: iltyty The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
08de0b4 to
e9aa17c
Compare
|
/retest |
| if op == nil || op.AuthConfig == nil { | ||
| return handler(ctx, op) | ||
| } | ||
| if op.AuthConfig.AuthType != rrsaAuthType && (op.AuthConfig.AccessKey == "" || op.AuthConfig.AccessSecret == "") { | ||
| return handler(ctx, op) | ||
| } |
There was a problem hiding this comment.
Can we combine these two if statements? There doesn't seem to be any difference between them
| return | ||
| } | ||
|
|
||
| if op.AuthConfig != nil && op.AuthConfig.AuthType == rrsaAuthType { |
There was a problem hiding this comment.
Can we move these statements into a switch block? Just emit an error if the credential file doesn't exist.
| RoleArn: tea.String(roleArn), | ||
| RoleSessionName: tea.String(session), | ||
| } | ||
| resp, err := i.stsClient.AssumeRoleWithOIDC(req) |
There was a problem hiding this comment.
Will there be a scenario where a node doesn't have AssumeRoleWithOIDCRequests policys?
| RoleSessionName: tea.String(session), | ||
| } | ||
| resp, err := i.stsClient.AssumeRoleWithOIDC(req) | ||
| if err != nil || resp.Body == nil || resp.Body.Credentials == nil { |
There was a problem hiding this comment.
We should at least log the error, so that we can identify why request failed
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Support NAS access point RRSA authentication.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: