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: add workload identity federation support #547

Merged
merged 30 commits into from Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e3b2751
feat: add STS token exchange utility (#454)
lsirac Aug 5, 2020
ebb4486
feat: adds support for 3PI credentials (#464)
lsirac Aug 26, 2020
4ee1a14
feat: implements AWS signature version 4 for signing requests (#476)
lsirac Sep 30, 2020
d639a78
Merge branch 'master' into 3pi
chingor13 Oct 12, 2020
4666949
feat: support generic token formats in IdentityPoolCredentials (#484)
lsirac Oct 15, 2020
9d4d721
feat: adds support for AWS credentials (#483)
lsirac Oct 15, 2020
f7f741a
Merge branch 'master' into 3pi
chingor13 Oct 15, 2020
dc16550
feat: add quota project ID to requestMetadata if present (#495)
lsirac Oct 15, 2020
6d04b05
chore: remove use of Truth assertions (#498)
lsirac Oct 16, 2020
124c77c
feat: add external account credentials to ADC (#500)
lsirac Oct 21, 2020
17e849e
chore: use ImpersonatedCredentials for service account impersonation …
lsirac Oct 29, 2020
223c6ec
fix: fix issues found through manual testing (#506)
lsirac Nov 17, 2020
478f33b
Merge branch 'master' into 3pi
chingor13 Dec 14, 2020
3769b90
fix: updates AWS credential source (#520)
lsirac Dec 15, 2020
0ccd43d
Merge branch 'master' into 3pi
chingor13 Jan 28, 2021
48405f7
fix: merge
lsirac Jan 28, 2021
e481da2
fix: change copyright year to 2021
lsirac Jan 29, 2021
36ff0f6
fix: address review comments
lsirac Jan 29, 2021
b9b9f8d
fix: remove assertThrows
lsirac Feb 2, 2021
a980a19
fix: address review comments
lsirac Feb 3, 2021
6c3982c
fix: review comments
lsirac Feb 12, 2021
25c884b
fix: more review comments
lsirac Feb 12, 2021
bd49373
fix: review
lsirac Feb 13, 2021
de0960d
fix: review
lsirac Feb 13, 2021
4d384b9
Merge branch 'master' of https://github.com/googleapis/google-auth-li…
lsirac Feb 17, 2021
c9ee282
fix: review
lsirac Feb 17, 2021
623d878
fix: add CredentialFormatException
lsirac Feb 17, 2021
1fe5188
fix: review
lsirac Feb 17, 2021
56a2e2b
Merge branch 'master' of https://github.com/googleapis/google-auth-li…
lsirac Feb 18, 2021
c7f5730
Merge branch 'master' into byoid
chingor13 Feb 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 56 additions & 0 deletions oauth2_http/java/com/google/auth/oauth2/ActingParty.java
@@ -0,0 +1,56 @@
/*
* Copyright 2021 Google LLC
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
*
* * Neither the name of Google LLC nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package com.google.auth.oauth2;

import static com.google.common.base.Preconditions.checkNotNull;

/**
* The acting party as defined in <a href="https://tools.ietf.org/html/rfc8693">OAuth 2.0 Token
* Exchange</a>.
*/
final class ActingParty {
private final String actorToken;
private final String actorTokenType;

ActingParty(String actorToken, String actorTokenType) {
this.actorToken = checkNotNull(actorToken);
this.actorTokenType = checkNotNull(actorTokenType);
}

String getActorToken() {
return actorToken;
}

String getActorTokenType() {
return actorTokenType;
}
}