-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: GCS provisioner using ADC or existing service account for acces…
…s tokens (#111) * feat: IAM service account impersonation and ADC access token * refactor: use type inference * refactor: variable name * refactor: single-field builder for IAM Service - IamServiceImpl.Builder now single-field - Added AccessTokenProvider interface for adding app default credential provider and related test * chore: update dependencies * refactor: added @OverRide annotation * refactor: IAM service unit test * refactor: IAM service impl. ADC token provider with record * feat: GCS provisioner using existing credentials GCS provisioner uses either application default credentials or existing service account to generate the access token for the sink * feat: GCS provisioner uses connector configuration to fetch user account - GCS provisioner finds service account name for access token from (first valid in sequence): - transfer request configuration - connector configuration from GcpConfiguration - application default credentials - refactor serviceAccount to serviceAccountName for GcsResourceDefinition * chore: updated dependencies google-api-services-iam v2-rev20240108-2.0.0 license is apache 2.0 https://mvnrepository.com/artifact/com.google.apis/google-api-services-iam/v2-rev20240108-2.0.0 * refactor: GCP config returns null if no parameter, GCS provisioner removed / inlined functions
- Loading branch information
Showing
13 changed files
with
244 additions
and
221 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
29 changes: 29 additions & 0 deletions
29
...nsions/common/gcp/gcp-core/src/main/java/org/eclipse/edc/gcp/iam/AccessTokenProvider.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,29 @@ | ||
/* | ||
* Copyright (c) 2024 Google LLC | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Google LCC - Initial implementation | ||
* | ||
*/ | ||
|
||
package org.eclipse.edc.gcp.iam; | ||
|
||
import org.eclipse.edc.gcp.common.GcpAccessToken; | ||
|
||
/** | ||
* Interface for credentials providing access tokens. | ||
*/ | ||
public interface AccessTokenProvider { | ||
/** | ||
* Returns the access token generated for the credentials. | ||
* | ||
* @return the {@link GcpAccessToken} for the credentials, null if error occurs. | ||
*/ | ||
GcpAccessToken getAccessToken(); | ||
} |
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
Oops, something went wrong.