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

fix(#31): Enable OIDC support on integration sources #50

Merged

Conversation

christophd
Copy link
Contributor

Changes

  • Enables OIDC support on integration sources as it is provided by Camel 4.9.0
  • Added some documentation of how to enable OIDC on IntegrationSource pre-built container images

/kind enhancement

Fixes #31

Release Note


Docs


Copy link

knative-prow bot commented Dec 12, 2024

@christophd: The label(s) kind/enhancement cannot be applied, because the repository doesn't have them.

In response to this:

Changes

  • Enables OIDC support on integration sources as it is provided by Camel 4.9.0
  • Added some documentation of how to enable OIDC on IntegrationSource pre-built container images

/kind enhancement

Fixes #31

Release Note


Docs


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@matzew
Copy link
Contributor

matzew commented Dec 12, 2024

Caused by: [org.apache.camel.CamelException - HTTP operation failed invoking https://sink-ubblwutz.test-awubkjns.svc.cluster.local caused by: java.io.FileNotFoundException: Cannot find resource: /oidc/token for URI: /oidc/token, Cannot find resource: /oidc/token for URI: /oidc/token]: org.apache.camel.CamelException: HTTP operation failed invoking https://sink-ubblwutz.test-awubkjns.svc.cluster.local caused by: java.io.FileNotFoundException: Cannot find resource: /oidc/token for URI: /oidc/token, Cannot find resource: /oidc/token for URI: /oidc/token
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at org.apache.camel.component.knative.http.KnativeHttpProducer.lambda$process$0(KnativeHttpProducer.java:159)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.handleFailure(HttpContext.java:398)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:387)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:362)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:329)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.createRequest(HttpContext.java:220)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.handlePrepareRequest(HttpContext.java:423)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:369)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:362)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:329)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpContext.prepareRequest(HttpContext.java:208)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpRequestImpl.send(HttpRequestImpl.java:538)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at io.vertx.ext.web.client.impl.HttpRequestImpl.sendBuffer(HttpRequestImpl.java:425)
test-awubkjns integrationsource-dekxiqad-containersource-deployment-54cfrlc7f source 	at org.apache.camel.component.knative.http.KnativeHttpProducer.process(KnativeHttpProducer.java:114)

here is details from the /oidc folder:

k -n test-awubkjns exec -it integrationsource-dekxiqad-containersource-deployment-54cfrlc7f -- bash 
[jboss@integrationsource-dekxiqad-containersource-deployment-54cfrlc7f ~]$ ls -la /oidc/
..2024_12_12_14_12_39.3991469401/ ..data/                           token                             
[jboss@integrationsource-dekxiqad-containersource-deployment-54cfrlc7f ~]$ ls -la /oidc/
total 4
drwxrwxrwt 3 root root  100 Dec 12 14:12 .
drwxr-xr-x 1 root root 4096 Dec 12 14:12 ..
drwxr-xr-x 2 root root   60 Dec 12 14:12 ..2024_12_12_14_12_39.3991469401
lrwxrwxrwx 1 root root   32 Dec 12 14:12 ..data -> ..2024_12_12_14_12_39.3991469401
lrwxrwxrwx 1 root root   12 Dec 12 14:12 token -> ..data/token
[jboss@integrationsource-dekxiqad-containersource-deployment-54cfrlc7f ~]$ ls -la /oidc/token 
lrwxrwxrwx 1 root root 12 Dec 12 14:12 /oidc/token -> ..data/token
[jboss@integrationsource-dekxiqad-containersource-deployment-54cfrlc7f ~]$ cat /oidc/token 
eyJhbGciOiJSUzI1NiIsImtpZCI6Ilk0dVpwYWlwRnZ3OXhuREhUTGNuTVJPai1hUHpjamhVNTU3Z0xuN0hNTFUifQ.eyJhdWQiOlsiYXVkaWVuY2UiXSwiZXhwIjoxNzM0MDE2MzU5LCJpYXQiOjE3MzQwMTI3NTksImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJ0ZXN0LWF3dWJram5zIiwic2VydmljZWFjY291bnQiOnsibmFtZSI6ImludGVncmF0aW9uc291cmNlLWRla3hpcWFkLWNvbnRkYjMzMzRmZjg4NjkwMzg2MTc1ZjYxMThkYjNiZWE2MyIsInVpZCI6IjBhZmFjZDVhLTA5MDUtNGU2Mi05MzA3LTUyODFjYWRmNDg3OCJ9fSwibmJmIjoxNzM0MDEyNzU5LCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6dGVzdC1hd3Via2puczppbnRlZ3JhdGlvbnNvdXJjZS1kZWt4aXFhZC1jb250ZGIzMzM0ZmY4ODY5MDM4NjE3NWY2MTE4ZGIzYmVhNjMifQ.r-1ZVHtwTkN1UKSuOZ4YaQmk5BtqMGURR_a90UsLbml0ZQWHB1vxZEYrooVDRh464EMfQzL71x5yCvujD8rTQ4I1kOQQYyZMNUGa8McnqokRx2rH0BQzdFcixfUTPo-Yu_dTsQuzLADHPE73jsNQY2OfK7wrmzter7lWWexucdwa8IZ0RWqvHMCvcjOuNt6TUbHWCMc9FtlJHYtDTdviRnPgY4bcAxACV9XiQmPejnBaByqdT_KlokPXauZaYUIIoo4HX65CJ5sG-AuLDq3KJT2YbWtQ2Rmp7eLd9k6QN9b6pV0AqxmKnB

@christophd
Copy link
Contributor Author

christophd commented Dec 12, 2024

Please try to use file:// as a prefix: file:///oidc/token

Copy link
Contributor

@matzew matzew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Copy link

knative-prow bot commented Dec 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christophd, matzew

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit b3c1497 into knative-extensions:main Dec 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OIDC issue: 401 Unauthorized
2 participants