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

Bouncer gets LAPI delete decisions but doesn't actually delete them from Cloudflare #34

Closed
Staene opened this issue May 10, 2024 · 6 comments · Fixed by #36
Closed

Bouncer gets LAPI delete decisions but doesn't actually delete them from Cloudflare #34

Staene opened this issue May 10, 2024 · 6 comments · Fixed by #36

Comments

@Staene
Copy link

Staene commented May 10, 2024

I've been running the bouncer for about a week and every ban is successfully initiated but only about 1/3 of them are actually deleted once the ban expires.

My log is filled with "Received x deleted decisions" but most are not followed up with "Deleted x decisions" account=xx

When I restart the bouncer, all the expired bans are deleted.

Any ideas? Screenshot of log below... there are no errors.

screenshot

@Staene
Copy link
Author

Staene commented May 19, 2024

I put the log into debug mode and here's an entire refresh session. It seems to know about the ban lift... but just doesn't do it.

time="19-05-2024 07:33:08" level=debug msg="No keys to write" account=xxx
time="19-05-2024 07:33:08" level=debug msg="No keys to delete" account=xxx
time="19-05-2024 07:33:08" level=info msg="Received 1 deleted decisions"
time="19-05-2024 07:33:08" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 228\r\nContent-Type: application/json; charset=utf-8\r\nDate: Sun, 19 May 2024 12:33:08 GMT\r\n\r\n{\"deleted\":[{\"duration\":\"-7.349550195s\",\"id\":4160935,\"origin\":\"crowdsec\",\"scenario\":\"crowdsecurity/http-bad-user-agent\",\"scope\":\"Ip\",\"type\":\"ban\",\"uuid\":\"058333bf-3040-4ab8-a06b-e0685f5efec1\",\"value\":\"3.215.186.30\"}],\"new\":null}"
time="19-05-2024 07:33:08" level=debug msg="[headers] Content-Length : [228]"
time="19-05-2024 07:33:08" level=debug msg="[headers] Date : [Sun, 19 May 2024 12:33:08 GMT]"
time="19-05-2024 07:33:08" level=debug msg="[headers] Content-Type : [application/json; charset=utf-8]"
time="19-05-2024 07:33:08" level=debug msg="resp-api: http 200"
time="19-05-2024 07:33:08" level=debug msg="req-api: GET http://127.0.0.1:8080/v1/decisions/stream?scopes=ip,range,as,country"
time="19-05-2024 07:33:08" level=debug msg="[URL] GET http://127.0.0.1:8080/v1/decisions/stream?scopes=ip,range,as,country"

@dreary-ennui
Copy link

I have also ran into this issue. You can test manually by adding a random decision with a short expiry time.

@LaurenceJJones
Copy link
Contributor

FYI, we have merged a fix but currently our build pipelines are having an issue internally once this is resolved we will publish a new release that will be distributed to our repositories.

@Staene
Copy link
Author

Staene commented Jul 4, 2024

Thanks, all! Will the updated bouncer be put on packagecloud or should we upgrade from here?

@blotus
Copy link
Member

blotus commented Jul 4, 2024

Hello,

I thought the package was published to our repositories, but the push was never approved.
I will rerun it, and the packages should be available soon.

@blotus
Copy link
Member

blotus commented Jul 4, 2024

Packages have been pushed @Staene, sorry for the delay.

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

Successfully merging a pull request may close this issue.

4 participants