Skip to content

fix(symbolicator): add Bearer to the obtained gcp token before pass… #92204

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sentry/lang/native/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def fetch_token_for_gcp_source(source, organization):
# if target_credentials.token is None it means that the
# token could not be fetched successfully
if token is not None:
source["bearer_token"] = token
source["bearer_token"] = "Bearer " + token

# Remove other credentials if we have a token
if "client_email" in source:
Expand Down
4 changes: 2 additions & 2 deletions tests/sentry/lang/native/test_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_sources_gcp_bearer_authentication(self, mock_get_gcp_token, default_pro
for i in (1, 2):
assert "client_email" not in sources[i]
assert "private_key" not in sources[i]
assert sources[i]["bearer_token"] == "ya29.TOKEN"
assert sources[i]["bearer_token"] == "Bearer ya29.TOKEN"

@override_settings(SENTRY_BUILTIN_SOURCES=SENTRY_BUILTIN_SOURCES_TEST)
@patch("sentry.lang.native.sources.get_gcp_token")
Expand All @@ -84,7 +84,7 @@ def test_source_alias(self, mock_get_gcp_token, default_project):
for i in (1, 2):
assert "client_email" not in sources[i]
assert "private_key" not in sources[i]
assert sources[i]["bearer_token"] == "ya29.TOKEN"
assert sources[i]["bearer_token"] == "Bearer ya29.TOKEN"


class TestIgnoredSourcesFiltering:
Expand Down
Loading