Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(VpcInstanceAuthenticator): add support for new VPC authentication flow #139

Merged
merged 6 commits into from
Nov 8, 2021

Conversation

padamstx
Copy link
Member

This commit introduces the VpcInstanceAuthenticator.
This authenticator implements the authentication flow
within a VPC-managed compute resource that is configured to
use the compute resource identity feature.
This involves the use of the compute resource's local
VPC Instance Metadata Service API to retrieve an instance identity
token, and then exchange that token for an IAM access token.
The IAM access token is then used to authenticate outbound REST
API requests by adding to the request in the Authorization header.

"SERVICE7_CLIENT_ID": "iam-client2",
"SERVICE7_CLIENT_SECRET": "iam-secret2",
"SERVICE7_SCOPE": "scope2 scope3",
"SERVICE8_AUTH_TYPE": "VPC",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only added the entries for service8. The rest of the changes are just due to formatting differences.

@@ -491,7 +491,7 @@ func TestConvertSliceBadInput(t *testing.T) {
assert.Nil(t, convertedSlice)

// map[string]byte
myByteMap := map[string][]byte{"myByteArray": []byte{01, 02, 03, 04}}
myByteMap := map[string][]byte{"myByteArray": {01, 02, 03, 04}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just fixed a warning coming from vscode

@padamstx
Copy link
Member Author

cc: @jorge-ibm for awareness

@padamstx padamstx force-pushed the vpc-authenticator branch 2 times, most recently from d5fb1a5 to a7394a0 Compare October 7, 2021 15:35
…n flow

This commit introduces the VpcInstanceAuthenticator.
This authenticator implements the authentication flow
within a VPC-managed compute resource that is configured to
use the compute resource identity feature.
This involves the use of the compute resource's local
VPC Instance Metadata Service API to retrieve an instance identity
token, and then exchange that token for an IAM access token.
The IAM access token is then used to authenticate outbound REST
API requests by adding to the request in the Authorization header.
@padamstx padamstx force-pushed the vpc-authenticator branch 2 times, most recently from f109e17 to 6e2d7c6 Compare October 22, 2021 19:00
@padamstx padamstx merged commit 9906ab3 into main Nov 8, 2021
@padamstx padamstx deleted the vpc-authenticator branch November 8, 2021 17:23
ibm-devx-sdk pushed a commit that referenced this pull request Nov 8, 2021
# [5.8.0](v5.7.2...v5.8.0) (2021-11-08)

### Features

* **VpcInstanceAuthenticator:** add support for new VPC authentication flow ([#139](#139)) ([9906ab3](9906ab3))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 5.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants