-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: adds integration tests for workload identity federation (#581)
A setup script workloadidentityfederation-setup.sh is added to make the workload identity pool configuration changes on the current project, if needed. The setup script only needs to be run once on a project (already ran).
- Loading branch information
Showing
14 changed files
with
663 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
oauth2_http/java/com/google/auth/oauth2/EnvironmentProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.google.auth.oauth2; | ||
|
||
/** Interface for an environment provider. */ | ||
interface EnvironmentProvider { | ||
String getEnv(String name); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
oauth2_http/java/com/google/auth/oauth2/SystemEnvironmentProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.google.auth.oauth2; | ||
|
||
/** Represents the default system environment provider. */ | ||
class SystemEnvironmentProvider implements EnvironmentProvider { | ||
static final SystemEnvironmentProvider INSTANCE = new SystemEnvironmentProvider(); | ||
|
||
private SystemEnvironmentProvider() {} | ||
|
||
@Override | ||
public String getEnv(String name) { | ||
return System.getenv(name); | ||
} | ||
|
||
public static SystemEnvironmentProvider getInstance() { | ||
return INSTANCE; | ||
} | ||
} |
Oops, something went wrong.