Skip to content

Update URI creation for Roles Anywhere integration in govcloud#64050

Open
bmckenna805 wants to merge 3 commits intogravitational:masterfrom
bmckenna805:teleport-ra-govcloud-uri-fix
Open

Update URI creation for Roles Anywhere integration in govcloud#64050
bmckenna805 wants to merge 3 commits intogravitational:masterfrom
bmckenna805:teleport-ra-govcloud-uri-fix

Conversation

@bmckenna805
Copy link

@bmckenna805 bmckenna805 commented Feb 23, 2026

Summary

Noticed that RA defaults to a commercial URI which will not successfully launch a console in govcloud. This change updates the URI creation logic to use the correct URI when the parsed ARNs indicate a govcloud partition.
It will also handle the China ARN use case.

Tests

image

Noticed that RA defaults to a commercial URI which will not successfully
launch a console in govcloud. This change updates the URI creation logic
to use the correct URI when the parsed ARNs indicate a govcloud partition.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@bmckenna805
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@bmckenna805
Copy link
Author

bmckenna805 commented Feb 23, 2026

recheck

Issue: #64049

@marcoandredinis
Copy link
Contributor

@bmckenna805 Thank you for the PR.

Can you please also add a test to the syncer? Probably in the TestRunAWSRolesAnywherProfileSyncer test

@marcoandredinis
Copy link
Contributor

Also, did you test this? Would you mind adding a list of test scenarios you went through to the PR description?

@bmckenna805
Copy link
Author

bmckenna805 commented Mar 6, 2026

Also, did you test this? Would you mind adding a list of test scenarios you went through to the PR description?

I'll see what I can do. Your development guidelines are a little vague so I though you might have an internal test suite that would run. It won't run against my fork.

@marcoandredinis
Copy link
Contributor

Unit tests for that method look good.
I'm looking for something more integrated, look at the TestRunAWSRolesAnywherProfileSyncer.

The other part is manual testing.
You would need to build teleport and run it in a real cluster.
I can help out with this part if needed

@bmckenna805
Copy link
Author

More comprehensive Go tests have been added
image

@bmckenna805
Copy link
Author

I'm working through getting it running locally on docker.

Copy link
Contributor

@marcoandredinis marcoandredinis left a comment

Choose a reason for hiding this comment

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

I'm fine with the automated tests.

We also have to provide a manual test plan on each PR.
You can run a local build of teleport and test that it shows the expected URL when you try to navigate to it.

I can help you what on this if needed 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please also remove this file changes?
Let's keep the PR contents to the aws partition fix.

Copy link
Author

Choose a reason for hiding this comment

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

@marcoandredinis Apologies. I was trying to bridge the gap between where the mac docs end (installing dependencies) and spinning up the dev environment starts. I'll go ahead and drop those commits.

Copy link
Author

@bmckenna805 bmckenna805 Mar 9, 2026

Choose a reason for hiding this comment

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

@marcoandredinis now that I've done that, I'm not seeing any success trying to run your 'make' build as outlined here: https://github.com/gravitational/teleport/blob/master/build.assets/README.md

image

Copy link
Author

@bmckenna805 bmckenna805 Mar 9, 2026

Choose a reason for hiding this comment

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

Going to try make build, but accurate instructions would be nice for how I can get a dev environment spun up locally to test this if its required.

Copy link
Author

Choose a reason for hiding this comment

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

Yup, make build fails mid run. I've tried a few targets like the hot-reload target in https://github.com/gravitational/teleport/blob/master/README.md. I'm still trying but some form of help would be nice.

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you enabled debug logging in the Auth Service?
Do you have valid AWS IAM Profiles in AWS right next to the Profile you are using for the profile sync? (same account, same region, enabled and with at least one IAM Role?)

Copy link
Author

@bmckenna805 bmckenna805 Mar 9, 2026

Choose a reason for hiding this comment

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

"2026-03-09T11:59:08.001-05:00 WARN [AUTH:1] AWS IAM Roles Anywhere Profile Syncer requires a Proxy which isn't available yet. It will retry again later. pid:25541.1 awsra/profile_syncer.go:246"

Looks like I can't just run the single instance.

edit: I spun up a proxy service as well. Waiting to see if the auth service detects it
edit2: success! I have my integration up and an app created. Testing

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, you don't actually need the proxy service.
But we kind of need the cluster URL so that we can build the URL for the app login.

You need the following, and you can re-use your teleport.yaml where you are running the auth_service.

teleport:
# ...
auth_service:
# ...
proxy_service:
  enabled: "yes"
  web_listen_addr: 0.0.0.0:8080
  public_addr: localhost:8080

Something like this should work.

Copy link
Author

@bmckenna805 bmckenna805 Mar 9, 2026

Choose a reason for hiding this comment

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

Yep. I have a full function test and return good data with a TSH checked out AWS CLI profile. This proves my Roles Anywhere config is good and the integration is working properly.

When I try to launch the web console right now I'm getting a "Failed to parse URL: Failed to construct 'URL': Invalid URL" javascript error (I think). I'm digging into why.

Copy link
Author

@bmckenna805 bmckenna805 Mar 9, 2026

Choose a reason for hiding this comment

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

Edit: I think I see what I did wrong. Will test tomorrow US Central Time.

@bmckenna805 bmckenna805 force-pushed the teleport-ra-govcloud-uri-fix branch from 8c96c98 to 0342a11 Compare March 9, 2026 12:36
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