Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

feat: making iam endpoint universe-aware#1604

Merged
TimurSadykov merged 11 commits intomainfrom
stim-iam
Oct 19, 2024
Merged

feat: making iam endpoint universe-aware#1604
TimurSadykov merged 11 commits intomainfrom
stim-iam

Conversation

@TimurSadykov
Copy link
Copy Markdown

@TimurSadykov TimurSadykov commented Oct 10, 2024

This adds Impersonated credential support of universe domain. So they call endpoint in proper universes.

@TimurSadykov TimurSadykov marked this pull request as ready for review October 18, 2024 15:50
@TimurSadykov TimurSadykov requested review from a team October 18, 2024 15:50
@TimurSadykov TimurSadykov requested a review from a team as a code owner October 18, 2024 15:50
@sai-sunder-s
Copy link
Copy Markdown
Contributor

Use monkeypatch to test whether the correct urls are used. One place to do is test_sign_bytes in test_impersonated_credentials.py.

For example, follow pattern in test__get_explicit_environ_credentials in test__default.py

credentials, target_audience=target_audience, include_email=True
)
id_creds = id_creds.from_credentials(target_credentials=new_credentials)
id_creds = id_creds.from_credentials(target_credentials=target_credentials)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is this line existing? IIUC, removing this will have no impact.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems to remove the target_audience?

credentials = self.make_credentials(
lifetime=None, source_credentials=source_credentials
)
target_credentials = self.make_credentials(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is same cred created 2 times?

Copy link
Copy Markdown
Contributor

@sai-sunder-s sai-sunder-s left a comment

Choose a reason for hiding this comment

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

Looks good mostly. Have that extra line in id token test. I think there is no need for the 2 creds created in same way. But that seems same way in existing test as well.

@TimurSadykov TimurSadykov merged commit 16c728d into main Oct 19, 2024
@TimurSadykov TimurSadykov deleted the stim-iam branch October 19, 2024 07:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants