-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Create detector for Azure refresh tokens #2978
Merged
Merged
+691
−11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rgmz
force-pushed
the
feat/azure-tokens
branch
4 times, most recently
from
June 17, 2024 23:11
502c15c
to
8ccea30
Compare
2 tasks
rgmz
force-pushed
the
feat/azure-tokens
branch
2 times, most recently
from
July 1, 2024 18:39
1991146
to
e0d92e6
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
from
November 3, 2024 15:48
e0d92e6
to
f364ca6
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
2 times, most recently
from
November 11, 2024 19:23
54caf4c
to
037c374
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
from
November 20, 2024 14:09
037c374
to
339bb6b
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
3 times, most recently
from
November 20, 2024 23:00
c15da95
to
e0521fe
Compare
rgmz
commented
Nov 21, 2024
|
||
func (Scanner) MaxSecretSize() int64 { return 2048 } | ||
|
||
func (Scanner) StartOffset() int64 { return 4096 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahrav In this case the token can be quite long (1000+) and the other fields can be either before or after it. What's the correct way to look +/- ~1024 on either side?
rgmz
force-pushed
the
feat/azure-tokens
branch
2 times, most recently
from
November 27, 2024 00:24
3df9330
to
97deeb7
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
from
December 2, 2024 13:28
97deeb7
to
1562bfb
Compare
the refresh token doesnt always start with 0.A. it could be 1.A |
rgmz
force-pushed
the
feat/azure-tokens
branch
6 times, most recently
from
December 15, 2024 16:35
7d90dba
to
946a07a
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
3 times, most recently
from
December 25, 2024 19:30
6c5d0b8
to
11bab1d
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
from
December 31, 2024 15:20
11bab1d
to
6122116
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
from
January 11, 2025 19:01
6122116
to
de1c4cf
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
2 times, most recently
from
January 27, 2025 14:10
6dd68f4
to
ed7179c
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
from
January 29, 2025 02:22
ed7179c
to
a87c001
Compare
rgmz
force-pushed
the
feat/azure-tokens
branch
from
February 2, 2025 17:30
a87c001
to
934b13f
Compare
ahrav
approved these changes
Feb 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
(This should only be merged after #2985.)
Azure refresh tokens are long-lived opaque tokens returned alongside access tokens1. They can remain valid for an indefinite period, and can be used to generate a new valid access token on behalf of the subject.
This detector can be tested by obtaining a live refresh token. I like using ROADtools:
This detector only works with refresh tokens created for public clients. If a client is confidential, the required tenant, id, and secret should trigger the service principal detector.
Checklist:
make test-community
)?make lint
this requires golangci-lint)?Footnotes
https://learn.microsoft.com/en-us/azure/energy-data-services/how-to-generate-auth-token#get-an-auth-token-and-a-refresh-token ↩