You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/10/02 13:13:52 UTC
[PR] CAMEL-17368: document Google Functions ADC and GKE authentication [camel]
oscerd opened a new pull request, #27284:
URL: https://github.com/apache/camel/pull/27284
Google Functions already falls back to Application Default Credentials when no `serviceAccountKey` is supplied, but its guide only describes key-file authentication. This documents keyless GKE workload identity, credential precedence, and a route using the pod identity.
Adds factory tests proving ADC credentials reach the client, an explicit key bypasses ADC, and credential lookup failures propagate without creating a client. Includes the mirrored catalog documentation. Authentication behavior is unchanged.
Validation: Functions module tests and formatter/import sorter passed (24 tests, zero failures/errors, one existing disabled test). The full 692-module reactor build passed with `mvn -Dquickly install` (tests skipped in that build).
Live GKE verification remains outstanding: this workspace has no configured Google Cloud project or `kubectl`. This draft addresses the original GKE/ADC scope of CAMEL-17368; explicit WIF endpoint options are outside this changeset.
_AI-generated by Codex on behalf of oscerd._
Generated by Codex via OSS Helper
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-17368: document Google Functions ADC and GKE authentication [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #27284:
URL: https://github.com/apache/camel/pull/27284#discussion_r4192763312
##########
components/camel-google/camel-google-functions/src/main/docs/google-functions-component.adoc:
##########
@@ -55,6 +55,36 @@ export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/my-key.json"
----
+=== Application Default Credentials and GKE
+
+When `serviceAccountKey` is not configured, the component uses Google's
+https://cloud.google.com/docs/authentication/application-default-credentials[Application Default Credentials (ADC)].
+ADC discovers credentials from the environment, local application default credentials,
+or the metadata server of the Google Cloud environment. An explicitly configured
+`serviceAccountKey` takes precedence over ADC.
+
+On Google Kubernetes Engine (GKE), configure
+https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity[Workload Identity Federation for GKE]
+for the cluster and the node pool where the Camel pod runs. Configure the pod to use
+a Kubernetes ServiceAccount with the IAM permissions required for the Cloud Functions
+operations it performs, either through direct IAM access or by linking it to an IAM
+service account as described in the GKE documentation.
+
+The Google authentication library obtains credentials through the GKE metadata server.
+No service account key file or Camel-specific Workload Identity option is required.
+Leave `serviceAccountKey` unset and do not set `GOOGLE_APPLICATION_CREDENTIALS` to a
+credential file when using the pod's workload identity, since ADC checks that environment
+variable before the metadata server.
+
+For example, this route lists functions using the pod's identity:
Review Comment:
Minor: the other route examples on this page use `[tabs]` with Java, XML and YAML. The example also shows nothing specific to ADC (it is the same as the `listFunctions` example further down), so either add the XML/YAML tabs (canonical YAML with `uri:` and `parameters:`) or drop it and say there is nothing to configure, as the pubsub page does.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-17368: document Google Functions ADC and GKE authentication [camel]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on code in PR #27284:
URL: https://github.com/apache/camel/pull/27284#discussion_r4193459779
##########
components/camel-google/camel-google-functions/src/main/docs/google-functions-component.adoc:
##########
@@ -55,6 +55,36 @@ export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/my-key.json"
----
+=== Application Default Credentials and GKE
+
+When `serviceAccountKey` is not configured, the component uses Google's
+https://cloud.google.com/docs/authentication/application-default-credentials[Application Default Credentials (ADC)].
+ADC discovers credentials from the environment, local application default credentials,
+or the metadata server of the Google Cloud environment. An explicitly configured
+`serviceAccountKey` takes precedence over ADC.
+
+On Google Kubernetes Engine (GKE), configure
+https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity[Workload Identity Federation for GKE]
+for the cluster and the node pool where the Camel pod runs. Configure the pod to use
+a Kubernetes ServiceAccount with the IAM permissions required for the Cloud Functions
+operations it performs, either through direct IAM access or by linking it to an IAM
+service account as described in the GKE documentation.
+
+The Google authentication library obtains credentials through the GKE metadata server.
+No service account key file or Camel-specific Workload Identity option is required.
+Leave `serviceAccountKey` unset and do not set `GOOGLE_APPLICATION_CREDENTIALS` to a
+credential file when using the pod's workload identity, since ADC checks that environment
+variable before the metadata server.
+
+For example, this route lists functions using the pod's identity:
Review Comment:
Done in e0012f5. I added the tabs rather than dropping the example: the example is now Java/XML/YAML like the rest of the page, with canonical YAML using `uri:` and `parameters:`. The lead-in also says what makes it ADC-specific: unlike the later examples it leaves `serviceAccountKey` out, and there is nothing else to configure. The catalog copy is updated and byte-identical.
_Claude Code on behalf of oscerd_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-17368: document Google Functions ADC and GKE authentication [camel]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on PR #27284:
URL: https://github.com/apache/camel/pull/27284#issuecomment-6013007648
Thanks @davsclaus. On the two nits in the review summary:
- **WIF / impersonation NOTE:** added in e0012f5, with the same wording as the google-pubsub page. I checked that it holds for this component too. `GoogleCloudFunctionsConfiguration` does not override `isUseWorkloadIdentityFederation()`, `getWorkloadIdentityConfig()` or `getImpersonatedServiceAccount()` from `GoogleCommonConfiguration`, so they keep their defaults and are not endpoint options.
- **Dead `else` branch in `GoogleCloudFunctionsClientFactory`:** agreed. `isAuthenticate()` is not overridden either, so it always returns `true`, and `GoogleCredentialsHelper.getCredentials` then never returns `null`: ADC throws rather than returning nothing. I've kept that cleanup out of this docs PR as a separate follow-up.
_Claude Code on behalf of oscerd_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-17368: document Google Functions ADC and GKE authentication [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27284:
URL: https://github.com/apache/camel/pull/27284#issuecomment-5953197830
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
* You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-17368: document Google Functions ADC and GKE authentication [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27284:
URL: https://github.com/apache/camel/pull/27284#issuecomment-5953734695
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `catalog/camel-catalog`
- `components/camel-google/camel-google-functions`
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 9 of 698 tested, 26 compile-only — current: 9 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **9 affected modules** (current approach: 9).
**Skip-tests mode would test 9 modules** (2 direct + 8 downstream), **skip tests for 26** (generated code, meta-modules)
<details><summary>Modules Scalpel would test (9)</summary>
- `camel-google-functions` ← components/camel-google/camel-google-functions/src/main/docs/google-functions-component.adoc, components/camel-google/camel-google-functions/src/test/java/org/apache/camel/component/google/functions/unit/GoogleCloudFunctionsClientFactoryTest.java
- `camel-jbang-mcp` ← downstream of org.apache.camel:camel-catalog
- `camel-jbang-plugin-mcp` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-route-parser` ← downstream of org.apache.camel:camel-route-parser
- `camel-jbang-plugin-tui` ← downstream of org.apache.camel:camel-catalog
- `camel-jbang-plugin-validate` ← downstream of org.apache.camel:camel-yaml-dsl-validator
- `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
- `camel-yaml-dsl-validator` ← downstream of org.apache.camel:camel-catalog
- `camel-yaml-dsl-validator-maven-plugin` ← downstream of org.apache.camel:camel-yaml-dsl-validator
</details>
<details><summary>Modules with tests skipped (26)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog-console`
- `camel-catalog-maven`
- `camel-catalog-suggest`
- `camel-componentdsl`
- `camel-endpointdsl`
- `camel-endpointdsl-support`
- `camel-itest`
- `camel-jbang-core`
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-kamelet-main`
- `camel-launcher`
- `camel-report-maven-plugin`
- `camel-route-parser`
- `camel-yaml-dsl`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `coverage`
- `docs`
- `dummy-component`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
<details><summary>All tested modules (36 modules, 5m 31s total)</summary>
**Total reactor time:** 5m 31s
| Module | Duration | Status |
| --- | --- | --- |
| Camel :: Launcher | 47.9s | SUCCESS |
| Camel :: JBang :: Plugin :: TUI | 41.4s | SUCCESS |
| Camel :: JBang :: MCP | 38.9s | SUCCESS |
| Camel :: Component DSL | 22.9s | SUCCESS |
| Camel :: Catalog :: Camel Catalog | 22.4s | SUCCESS |
| Camel :: YAML DSL | 18.1s | SUCCESS |
| Camel :: JBang :: Plugin :: Kubernetes | 17.7s | SUCCESS |
| Camel :: YAML DSL :: Validator | 17.5s | SUCCESS |
| Camel :: Docs | 14.7s | SUCCESS |
| Camel :: Google :: Functions | 12.9s | SUCCESS |
| Camel :: Kamelet Main | 10.4s | SUCCESS |
| Camel :: YAML DSL :: Deserializers | 8.5s | SUCCESS |
| Camel :: Catalog :: Camel Route Parser | 7.8s | SUCCESS |
| Camel :: JBang :: Plugin :: Testing | 7.7s | SUCCESS |
| Camel :: Catalog :: Camel Report Maven Plugin | 6.0s | SUCCESS |
| Camel :: JBang :: Plugin :: Validate | 5.5s | SUCCESS |
| Camel :: All Components Sync point | 5.2s | SUCCESS |
| Camel :: YAML DSL :: Validator Maven Plugin | 4.8s | SUCCESS |
| Camel :: YAML DSL :: Maven Plugins | 3.4s | SUCCESS |
| Camel :: Catalog :: Maven | 2.9s | SUCCESS |
| Camel :: Catalog :: Suggest (deprecated) | 2.8s | SUCCESS |
| Camel :: Assembly | 1.8s | SUCCESS |
| Camel :: Coverage | 1.8s | SUCCESS |
| Camel :: Catalog :: Dummy Component | 1.2s | SUCCESS |
| Camel :: JBang :: Plugin :: Edit | 1.2s | SUCCESS |
| Camel :: JBang :: Plugin :: Generate | 1.0s | SUCCESS |
| Camel :: Catalog :: Console | 0.9s | SUCCESS |
| Camel :: JBang :: Main | 0.8s | SUCCESS |
| Camel :: JBang :: Integration tests | 0.8s | SUCCESS |
| Camel :: JBang :: Plugin :: MCP | 0.7s | SUCCESS |
| Camel :: Endpoint DSL :: Support | 0.7s | SUCCESS |
| Camel :: Launcher :: Container | 0.7s | SUCCESS |
| Camel :: JBang :: Plugin :: Route Parser | 0.5s | SUCCESS |
| Camel :: Endpoint DSL | n/a | |
| Camel :: Integration Tests | n/a | |
| Camel :: JBang :: Core | n/a | |
**Top 20 slowest modules:**
- `Camel :: Launcher` (47.9s)
- `Camel :: JBang :: Plugin :: TUI` (41.4s)
- `Camel :: JBang :: MCP` (38.9s)
- `Camel :: Component DSL` (22.9s)
- `Camel :: Catalog :: Camel Catalog` (22.4s)
- `Camel :: YAML DSL` (18.1s)
- `Camel :: JBang :: Plugin :: Kubernetes` (17.7s)
- `Camel :: YAML DSL :: Validator` (17.5s)
- `Camel :: Docs` (14.7s)
- `Camel :: Google :: Functions` (12.9s)
- `Camel :: Kamelet Main` (10.4s)
- `Camel :: YAML DSL :: Deserializers` (8.5s)
- `Camel :: Catalog :: Camel Route Parser` (7.8s)
- `Camel :: JBang :: Plugin :: Testing` (7.7s)
- `Camel :: Catalog :: Camel Report Maven Plugin` (6.0s)
- `Camel :: JBang :: Plugin :: Validate` (5.5s)
- `Camel :: All Components Sync point` (5.2s)
- `Camel :: YAML DSL :: Validator Maven Plugin` (4.8s)
- `Camel :: YAML DSL :: Maven Plugins` (3.4s)
- `Camel :: Catalog :: Maven` (2.9s)
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/37011618615)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-17368: document Google Functions ADC and GKE authentication [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #27284:
URL: https://github.com/apache/camel/pull/27284
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org