IBM / java-sdk-core

Core functionality required by Java code generated by the IBM Cloud OpenAPI SDK Generator (openapi-sdkgen)
https://ibm.github.io/java-sdk-core/
Apache License 2.0
20 stars 21 forks source link

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

Closed padamstx closed 3 years ago

padamstx commented 3 years ago

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 an Authorization containing the access token.

padamstx commented 3 years ago

@dpopp07 @pyrooka I've pushed a commit to this PR that refactors the VpcInstanceAuthenticator class so that it does in fact subclass the TokenRequestBasedAuthenticator base class, similar to the CP4D authenticator. Our webex session today opened my eyes a bit and I realized that I could use the CP4D pattern here without any problems. The result is that I was able to remove some of the code within VpcInstanceAuthenticator, and avoid some duplication.

ibm-devx-sdk commented 3 years ago

:tada: This PR is included in version 9.14.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: