sourcegraph/internal
Quinn Slack 7b99e4bd98
make access tokens more identifiable with sgp_ prefix (#49989)
Access tokens now begin with the prefix `sgp_` to make them identifiable
as secrets. You can also prepend `sgp_` to previously generated access
tokens, although they will continue to work as-is without that prefix.
It is also allowed to *omit* the `sgp_` prefix from an access token, for
simplicity of backcompat (so that we do not need to distinguish between
access tokens created prior to the introduction of this prefix).

See
https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats/
for an explanation of why GitHub made a similar change. Slack, Stripe,
and many other companies have also made this change.

At some point, we should warn, deprecate, and eventually disable access
tokens that do not contain this prefix.



![sgpaccesstoken](https://user-images.githubusercontent.com/1976/227696764-c35bdcc8-41df-47bc-89cf-707e2c5af05a.png)

(Note: This access token was deleted prior to this screenshot being
uploaded.)


## Test plan

Create a new access token. Confirm it contains the `sgp_` prefix.
Confirm it works. Confirm it works without the `sgp_` prefix as well
(for backcompat).
2023-03-25 04:07:52 -07:00
..
actor bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
adminanalytics bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
api bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
audit bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
auth bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
authz bazel: routine configure run (#49889) 2023-03-23 11:32:49 +02:00
batches bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
binary bazel: fix remaining backend tests (#47961) 2023-03-01 17:03:01 +00:00
byteutils Add linereader helper (#49965) 2023-03-24 17:39:49 +01:00
cloneurls bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
cmd dep: use new docker base (#49706) 2023-03-20 18:15:21 +01:00
codeintel [sentinel] Adding group by repository functionality (#49923) 2023-03-24 21:44:38 +00:00
collections [feat] add set as a data structure (#49954) 2023-03-24 12:56:43 +00:00
comby bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
conf internal/conf: Redact Azure DevOps client secret (#49431) 2023-03-16 10:11:06 +05:30
cookie bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
database make access tokens more identifiable with sgp_ prefix (#49989) 2023-03-25 04:07:52 -07:00
debugserver grpc: add support for frontend's indexed-search internal API methods (#47710) 2023-03-08 02:15:54 +00:00
deviceid bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
diskcache bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
download bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
encryption bazel: routine configure run (#49889) 2023-03-23 11:32:49 +02:00
endpoint bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
env bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
errcode bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
eventlogger bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
executor bazel: build the //lib folder (#46929) 2023-01-27 15:30:35 +01:00
extsvc bazel: routine configure run (#49889) 2023-03-23 11:32:49 +02:00
fastwalk bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
featureflag bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
fileutil bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
gitserver Make use of new bytesutil.LineReader helper (#49975) 2023-03-24 18:23:12 +01:00
goroutine bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
gosyntect Highlighthing: make tree-sitter the default engine (#49112) 2023-03-14 14:06:23 +01:00
gqltestutil gqltest: output unexpected repos in context test (#48249) 2023-02-28 08:33:20 +02:00
gqlutil bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
grpc Update rules_rust to fix the issue with repinning the rust crates (#49698) 2023-03-21 11:02:33 +01:00
hashutil bazel: build the //lib folder (#46929) 2023-01-27 15:30:35 +01:00
honey bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
hostname bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
httpcli bazel: routine configure run (#49889) 2023-03-23 11:32:49 +02:00
httpserver bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
httptestutil bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
instrumentation bzl: update buildfiles (#48626) 2023-03-03 15:36:18 +00:00
inventory bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
jsonc bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
lazyregexp bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
limiter bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
logging bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
luasandbox bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
mapfs bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
markdown Improve Markdown rendering (#47074) 2023-01-30 13:36:56 -08:00
memo bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
metrics bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
oauthutil Revert unnecessary nil request body checks (#49591) 2023-03-17 16:32:04 +02:00
observation bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
oobmigration bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
otlpenv bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
packagefilters packages: properly handle filter scheme everywhere (#49244) 2023-03-13 20:30:32 +00:00
profiler Allow to run GCP profiler in other instances (#48204) 2023-02-24 16:30:13 +00:00
pubsub bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
randstring bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
ratelimit bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
rbac Update rules_rust to fix the issue with repinning the rust crates (#49698) 2023-03-21 11:02:33 +01:00
rcache bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
redispool bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
repos httpcli: make caching transport unwrappable (#49877) 2023-03-22 17:53:16 -05:00
repoupdater permissions-center: remove feature flag and old perms syncing code. (#49833) 2023-03-22 20:04:33 +04:00
requestclient bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
resetonce bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
search Search: allow repo:has.topic() and repo:has.description() in contexts (#49456) 2023-03-16 10:48:32 -06:00
searcher/v1 buf: pin buf.build/protocolbuffers/go to v1.29.1, buf.build/grpc/go to v1.3.0 (#49442) 2023-03-15 20:04:09 +00:00
security bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
service servegit: expose ServeGit repos function in service (#49912) 2023-03-24 06:35:23 +02:00
singleprogram set embeddings endpoint to localhost in App (#49945) 2023-03-24 20:43:20 -07:00
slack bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
src-cli v5.0.0 bake constants and static content (#49257) 2023-03-13 14:49:37 -07:00
src-prometheus bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
symbols bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
syncx bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
sysreq bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
temporarysettings bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
testutil bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
timeutil bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
trace bazel: configure (#49825) 2023-03-22 11:01:24 +02:00
tracer bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
ttlcache bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
txemail txemail: add ability to set sender name (#49906) 2023-03-23 23:03:08 +09:00
types Cloning progress updates in the database (#49933) 2023-03-24 16:51:54 +00:00
unpack bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
uploadhandler bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
uploadstore bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
usagestats insights: remove unused ping CodeInsightsExploreInsightExtensionsClick (#49579) 2023-03-22 14:16:46 +00:00
users SCIM: Add "is SCIM controlled" flag to site user, and "SCIM" badge on UI (#48727) 2023-03-07 14:15:39 +00:00
vcs bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
version bzl: disable //client/web:test target (timing out) (#49771) 2023-03-21 10:11:23 -05:00
webhooks/outbound bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
workerutil bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
wrexec bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
buf.yaml sg lint: fix 'buf lint' rule by actually adding buf.yaml file (#48076) 2023-02-22 23:04:21 +00:00
BUILD.bazel bazel: fix remaining backend tests (#47961) 2023-03-01 17:03:01 +00:00