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

jwt transport: fix retry on unauthorized from CAPI #3006

Merged
merged 2 commits into from
May 24, 2024
Merged

Conversation

blotus
Copy link
Member

@blotus blotus commented May 13, 2024

Fix unauthorized from CAPI that might happen in the following scenario:

  • enroll instance
  • restart crowdsec
  • accept instance (on the console)
  • generate alert

Copy link

@blotus: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

Copy link

@blotus: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@buixor buixor added this to the 1.6.2 milestone May 14, 2024
@mmetc mmetc added the kind/fix label May 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 15, 2024

Codecov Report

Attention: Patch coverage is 85.91549% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 52.41%. Comparing base (816608d) to head (5f2fa35).

Files Patch % Lines
pkg/apiclient/auth_jwt.go 79.16% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3006   +/-   ##
=======================================
  Coverage   52.41%   52.41%           
=======================================
  Files         277      278    +1     
  Lines       35180    35212   +32     
=======================================
+ Hits        18440    18458   +18     
- Misses      14915    14928   +13     
- Partials     1825     1826    +1     
Flag Coverage Δ
bats 40.32% <77.19%> (+0.01%) ⬆️
unit-linux 34.85% <77.19%> (+0.01%) ⬆️
unit-windows 31.03% <73.23%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@buixor
Copy link
Contributor

buixor commented May 24, 2024

/kind fix
/area local-api

Copy link
Contributor

@buixor buixor left a comment

Choose a reason for hiding this comment

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

LGTM

@blotus blotus merged commit f06e3e7 into master May 24, 2024
15 checks passed
@blotus blotus deleted the fix-jwt-auth-retry branch May 24, 2024 12:43
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.

None yet

4 participants