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: adds support for 3PI credentials #464

Merged
merged 6 commits into from
Aug 26, 2020
Merged

feat: adds support for 3PI credentials #464

merged 6 commits into from
Aug 26, 2020

Conversation

lsirac
Copy link
Contributor

@lsirac lsirac commented Aug 19, 2020

No description provided.

@lsirac lsirac requested a review from a team as a code owner August 19, 2020 22:29
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 19, 2020
@lsirac lsirac changed the title Adds support for 3PI credentials feat: adds support for 3PI credentials Aug 19, 2020
@lsirac lsirac requested a review from chingor13 August 19, 2020 22:54
elharo
elharo previously requested changes Aug 20, 2020

private static final JsonFactory JSON_FACTORY = JacksonFactory.getDefaultInstance();

public static final String UTF_8 = "UTF-8";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please see comments on original PR

subjectTokenType,
tokenUrl,
tokenInfoUrl,
new IdentityPoolCredentialSource(credentialSourceMap),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should knowledge of this inner class belong only to the IdentityPoolCredentials?

Comment on lines +265 to +267
if (serviceAccountImpersonationUrl == null) {
return accessToken;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would a caller of this need to know if this was skipped?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean? Are you suggesting I log something here or?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is an internal method so it probably doesn't actually matter.

I was just wondering if somewhere that calls this method might want to conditionally do something else if we did not actually attempt impersonation.

Comment on lines +81 to +84
} else {
credentialLocation = (String) credentialSourceMap.get("url");
credentialSourceType = IdentityPoolCredentialSourceType.URL;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we fail early if this input is invalid and doesn't contain file or url?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, I'm not sure. The input here should be from a file generated by gCloud, and should be valid.

@chingor13 chingor13 dismissed elharo’s stale review August 26, 2020 19:00

We can address constant nits in the final PR to master

@chingor13 chingor13 merged commit ebb4486 into googleapis:3pi Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants