Skip to content

Conversation

@kuranium
Copy link

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

Old implementation could loop thru irrelevant public keys and trying to decode with them, causing unnecessary and missleading exceptions in logs.
In this commit the "net" fetched keys get filtered upon fetching, using the basic jwt functionality. So now we only use and cache keys with matching "kid" fields.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

@kuranium
Copy link
Author

@yoshiokatsuneo any clue who might be invested in / responsible for the authentication related code?

else:
if url.startswith(FILE_SCHEME_PREFIX):
keys = [get_public_key_from_file(url)]
key = [get_signing_key_from_file(url)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I just guess that "key" should not be an array.

Copy link
Author

Choose a reason for hiding this comment

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

thanks, should be fixed now

@yoshiokatsuneo
Copy link
Contributor

@yoshiokatsuneo any clue who might be invested in / responsible for the authentication related code?

@kuranium
I have no idea whether there is any component owner or not...

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 this pull request may close these issues.

2 participants