Skip to content

Fix a token rotation bug where a bot token is not refreshed if a user token does not exist - #437

Merged
seratch merged 1 commit into
slackapi:mainfrom
seratch:token-rotation-bug
Aug 11, 2021
Merged

seratch merged 1 commit into
slackapi:mainfrom
seratch:token-rotation-bug

Conversation

@seratch

@seratch seratch commented Aug 11, 2021

Copy link
Copy Markdown
Contributor

This pull request fixes a token rotation feature bug where a bot token cannot be refreshed if a user token does not exist in the same installation. This bug can affect all token-rotation enabled apps using the built-in InstallationStoreAuthorize. I overlooked this bug as I did tests only with installations that have both a bot and a user token 🤦

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@seratch seratch added bug Something isn't working area:async area:sync labels Aug 11, 2021
@seratch seratch added this to the 1.8.0 milestone Aug 11, 2021
@codecov

codecov Bot commented Aug 11, 2021

Copy link
Copy Markdown

Codecov Report

Merging #437 (4e053ff) into main (f70e1f4) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #437   +/-   ##
=======================================
  Coverage   91.34%   91.34%           
=======================================
  Files         167      167           
  Lines        5497     5497           
=======================================
  Hits         5021     5021           
  Misses        476      476           
Impacted Files Coverage Δ
slack_bolt/authorization/async_authorize.py 79.16% <100.00%> (ø)
slack_bolt/authorization/authorize.py 78.99% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f70e1f4...4e053ff. Read the comment docs.

@seratch
seratch merged commit 4a7bfa1 into slackapi:main Aug 11, 2021
@seratch
seratch deleted the token-rotation-bug branch August 11, 2021 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:async area:sync bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant