Skip to content

feat(auth): add new IAM profile selector to VPC Instance Auth#250

Merged
diatrcz merged 5 commits into
mainfrom
lt/vpc-auth-extensions
Jul 16, 2026
Merged

feat(auth): add new IAM profile selector to VPC Instance Auth#250
diatrcz merged 5 commits into
mainfrom
lt/vpc-auth-extensions

Conversation

@diatrcz

@diatrcz diatrcz commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Adds IAM Profile selector to the VPC Instance Authenticator.

  • The name of the linked trusted IAM profile to be used as the identity of the compute resource.
  • At most one of IAMProfileCRN, IAMProfileID, or IAMProfileName may be specified.
  • If none is specified, the default IAM profile of the compute resource will be used.

diatrcz added 3 commits July 7, 2026 13:51
Signed-off-by: Lídia Tarcza <100163235+diatrcz@users.noreply.github.com>
Signed-off-by: Lídia Tarcza <100163235+diatrcz@users.noreply.github.com>
Signed-off-by: Lídia Tarcza <100163235+diatrcz@users.noreply.github.com>
@diatrcz
diatrcz requested review from Andris28 and pyrooka July 7, 2026 12:21
Signed-off-by: Lídia Tarcza <100163235+diatrcz@users.noreply.github.com>

@pyrooka pyrooka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The PR looks good, but we should address the two minor issues from my review before merging.

if (StringUtils.isNotEmpty(getIamProfileId())) {
counter++;
}
if (StringUtils.isNoneEmpty(getIamProfileName())) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should stick to the other function that we already use :)

Suggested change
if (StringUtils.isNoneEmpty(getIamProfileName())) {
if (StringUtils.isNotEmpty(getIamProfileName())) {

public void validate() {
// At most one of iamProfileCrn or iamProfileId may be specified.
if (StringUtils.isNotEmpty(getIamProfileCrn()) && StringUtils.isNotEmpty(getIamProfileId())) {
// At most one of iamProfileCrn or iamProfileI or iamProfileName may be specified.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👀

Suggested change
// At most one of iamProfileCrn or iamProfileI or iamProfileName may be specified.
// At most one of iamProfileCrn or iamProfileId or iamProfileName may be specified.

if (counter > 1) {
throw new IllegalArgumentException(
String.format(ERRORMSG_ATMOST_ONE_PROP_ERROR, "iamProfileCrn", "iamProfileId"));
String.format(ERRORMSG_ATMOST_ONE_PROP_ERROR, "iamProfileCrn", "iamProfileId", "iamProfileName"));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One more thing: the ERRORMSG_ATMOST_ONE_PROP_ERROR constant should be updated to handle 3 arguments. Previously it was just 2.

Signed-off-by: Lídia Tarcza <100163235+diatrcz@users.noreply.github.com>
@diatrcz
diatrcz requested a review from pyrooka July 16, 2026 09:59

@pyrooka pyrooka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@diatrcz
diatrcz merged commit e9e0d22 into main Jul 16, 2026
12 checks passed
@diatrcz
diatrcz deleted the lt/vpc-auth-extensions branch July 16, 2026 10:01
ibm-devx-sdk pushed a commit that referenced this pull request Jul 16, 2026
# [9.27.0](9.26.0...9.27.0) (2026-07-16)

### Features

* **auth:** add new IAM profile selector to VPC Instance Auth ([#250](#250)) ([e9e0d22](e9e0d22))
@ibm-devx-sdk

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 9.27.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.

3 participants