Skip to content

Commit

Permalink
🎉 Source Google Analytics v4: add intermediary auth config support (#…
Browse files Browse the repository at this point in the history
…7020)

* Add intermediary auth config support

* Upd changelog

* Mark spec param as secret
  • Loading branch information
gaart authored Oct 14, 2021
1 parent f0debaa commit 62826f8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sourceDefinitionId": "eff3616a-f9c3-11eb-9a03-0242ac130003",
"name": "Google Analytics v4",
"dockerRepository": "airbyte/source-google-analytics-v4",
"dockerImageTag": "0.1.7",
"dockerImageTag": "0.1.8",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/source-google-analytics-v4",
"icon": "google-analytics.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
- sourceDefinitionId: eff3616a-f9c3-11eb-9a03-0242ac130003
name: Google Analytics v4
dockerRepository: airbyte/source-google-analytics-v4
dockerImageTag: 0.1.7
dockerImageTag: 0.1.8
documentationUrl: https://docs.airbyte.io/integrations/sources/source-google-analytics-v4
icon: google-analytics.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.7
LABEL io.airbyte.version=0.1.8
LABEL io.airbyte.name=airbyte/source-google-analytics-v4
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ def get_authenticator(config):
return GoogleAnalyticsServiceOauth2Authenticator(config)

auth_params = config.get("credentials")
if auth_params.pop("auth_type") == "Service":

if auth_params.get("auth_type") == "Service" or auth_params.get("credentials_json"):
return GoogleAnalyticsServiceOauth2Authenticator(auth_params)
else:
return Oauth2Authenticator(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"title": "Authenticate via Google (Oauth)",
"type": "object",
"required": [
"auth_type",
"client_id",
"client_secret",
"refresh_token"
Expand Down Expand Up @@ -79,7 +78,7 @@
{
"type": "object",
"title": "Service Account Key Authentication",
"required": ["auth_type", "credentials_json"],
"required": ["credentials_json"],
"properties": {
"auth_type": {
"type": "string",
Expand All @@ -93,7 +92,8 @@
"description": "The JSON key of the service account to use for authorization",
"examples": [
"{ \"type\": \"service_account\", \"project_id\": YOUR_PROJECT_ID, \"private_key_id\": YOUR_PRIVATE_KEY, ... }"
]
],
"airbyte_secret": true
}
}
}
Expand All @@ -105,8 +105,14 @@
"auth_type": "oauth2.0",
"oauth2Specification": {
"rootObject": ["credentials", 0],
"oauthFlowInitParameters": [["client_id"], ["client_secret"]],
"oauthFlowOutputParameters": [["access_token"], ["refresh_token"]]
"oauthFlowInitParameters": [
["client_id"],
["client_secret"]
],
"oauthFlowOutputParameters": [
["access_token"],
["refresh_token"]
]
}
}
}
1 change: 1 addition & 0 deletions docs/integrations/sources/google-analytics-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ The Google Analytics connector should not run into Google Analytics API limitati

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| 0.1.8 | 2021-10-13 | [7020](https://github.com/airbytehq/airbyte/pull/7020) | Add intermediary auth config support |
| 0.1.7 | 2021-10-07 | [6414](https://github.com/airbytehq/airbyte/pull/6414) | Declare oauth parameters in google sources |
| 0.1.6 | 2021-09-27 | [6459](https://github.com/airbytehq/airbyte/pull/6459) | Update OAuth Spec File |
| 0.1.3 | 2021-09-21 | [6357](https://github.com/airbytehq/airbyte/pull/6357) | Fix oauth workflow parameters |
Expand Down

0 comments on commit 62826f8

Please sign in to comment.