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

authantication headers in webhook #4

Open
TimTinneveld opened this issue Jul 4, 2023 · 6 comments
Open

authantication headers in webhook #4

TimTinneveld opened this issue Jul 4, 2023 · 6 comments

Comments

@TimTinneveld
Copy link

Hi,

Is is possible to give like basic authenitcation in the headers for the webhook. we don't want to make the webhook available for everyone and a webhook seems to be a bit more straightforward then mailing.

Like to hear, thanks in advance.

@vitobotta
Copy link
Owner

Hi,

I think you can specify basic auth credentials in the format https://username:[email protected]. Have you tried?

@TimTinneveld
Copy link
Author

Hi vitobotta,

Thank you for your reply. I found some time again to work on this project. i am able to successvoly deploy the pod.

2023-07-26T13:12:39.240322Z INFO - kube.transport: GET /api/v1 => HTTP OK in 00:00:00.002163620s
2023-07-26T13:12:39.243143Z INFO - kube.transport: GET /api/v1/namespaces/velero/configmaps/backups-last-resource-version => HTTP OK in 00:00:00.002418123s
2023-07-26T13:12:39.244663Z INFO - kube.transport: GET /apis/velero.io/v1 => HTTP OK in 00:00:00.001046933s
2023-07-26T13:12:39.254155Z INFO - kube.transport: GET /apis/velero.io/v1/namespaces/velero/backups => HTTP OK in 00:00:00.007153433s
2023-07-26T13:12:39.254165Z INFO - Resource version for backups: 17501581
2023-07-26T13:12:39.258936Z INFO - kube.transport: PATCH /api/v1/namespaces/velero/configmaps/backups-last-resource-version <NamedTuple(data: NamedTuple(resourceVersion: String))> => HTTP OK in 00:00:00.004520991s
2023-07-26T13:12:39.258941Z INFO - Watching backups from resource version 17501581
2023-07-26T13:13:04.420640Z INFO - Resource version for backups: 17501657
2023-07-26T13:13:04.435971Z INFO - kube.transport: PATCH /api/v1/namespaces/velero/configmaps/backups-last-resource-version <NamedTuple(data: NamedTuple(resourceVersion: String))> => HTTP OK in 00:00:00.013417878s
2023-07-26T13:13:04.435989Z INFO - Resource version for backups: 17501658
2023-07-26T13:13:04.439494Z INFO - kube.transport: PATCH /api/v1/namespaces/velero/configmaps/backups-last-resource-version <NamedTuple(data: NamedTuple(resourceVersion: String))> => HTTP OK in 00:00:00.002973762s
2023-07-26T13:13:21.405100Z INFO - Resource version for backups: 17501714
2023-07-26T13:13:21.409283Z INFO - kube.transport: PATCH /api/v1/namespaces/velero/configmaps/backups-last-resource-version <NamedTuple(data: NamedTuple(resourceVersion: String))> => HTTP OK in 00:00:00.003842359s
2023-07-26T13:13:21.733767Z INFO - [Velero] Backup test5 Completed ✅
2023-07-26T13:13:22.241332Z INFO - Resource version for backups: 17501716
2023-07-26T13:13:22.251819Z INFO - kube.transport: PATCH /api/v1/namespaces/velero/configmaps/backups-last-resource-version <NamedTuple(data: NamedTuple(resourceVersion: String))> => HTTP OK in 00:00:00.009894310s

It also seems to detect whenever back-ups are succeeded, but it doesn't seem to send anything to the webhook address i have configured.

With postman it seems to work in this format "https://username:[email protected]". I also cannot see any logging trying to send http request to my webhook address.

Do you maybe have any idea. Thank you.

@vitobotta
Copy link
Owner

Does the endpoint expect GET or POST requests?

@TimTinneveld
Copy link
Author

It expects a POST request. Is that something that can be defined?

@vitobotta
Copy link
Owner

Not at the moment, that's why I asked. At the moment it makes a GET request. I will make it configurable when I have time

@TimTinneveld
Copy link
Author

Hi Vitobotta,

Did you find the time to make the adjustment?

Thanks in advanced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants