Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Issue 2386643003: auth: Make luci-go services trust signatures produced by the token server. (Closed)

Created:
4 years, 2 months ago by Vadim Sh.
Modified:
4 years, 2 months ago
Reviewers:
nodir, M-A Ruel
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, andrew.wang, todd, tandrii+luci-go_chromium.org, M-A Ruel
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

auth: Make luci-go services trust signatures produced by the token server. Previously luci-go auth library ignored 'issued_by' field and just always assumed tokens are signed by the auth service. Now it fetches the certificates of both the auth service and the token server and picks the correct key based on 'issued_by' field. It matches what luci-py does. It enables a migration path from "old" tokens signed by the auth service to "new" tokens, signed by the token server. R=maruel@chromium.org, nodir@chromium.org BUG= Committed: https://github.com/luci/luci-go/commit/59df90e41b87f38d73e5dde2baa0ed5ba139fe0c

Patch Set 1 #

Total comments: 17

Patch Set 2 : auth: Make luci-go services trust signatures produced by the token server. #

Patch Set 3 : add tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -72 lines) Patch
M appengine/gaeauth/server/db.go View 2 chunks +5 lines, -0 lines 0 comments Download
M server/auth/auth.go View 3 chunks +1 line, -15 lines 0 comments Download
M server/auth/auth_test.go View 2 chunks +5 lines, -0 lines 0 comments Download
M server/auth/authdb/db.go View 2 chunks +8 lines, -0 lines 0 comments Download
M server/auth/authdb/erroring.go View 2 chunks +7 lines, -0 lines 0 comments Download
M server/auth/authdb/snapshot.go View 1 6 chunks +90 lines, -1 line 0 comments Download
M server/auth/authdb/snapshot_test.go View 1 2 2 chunks +72 lines, -0 lines 0 comments Download
M server/auth/authtest/db.go View 2 chunks +6 lines, -0 lines 0 comments Download
M server/auth/delegation/checker.go View 3 chunks +21 lines, -15 lines 0 comments Download
M server/auth/delegation/checker_test.go View 1 2 2 chunks +17 lines, -1 line 0 comments Download
M server/auth/delegation/minter_test.go View 1 2 4 chunks +10 lines, -40 lines 0 comments Download
M server/auth/internal/fetch.go View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A server/auth/internal/testing.go View 1 2 1 chunk +44 lines, -0 lines 0 comments Download
M server/auth/signing/signingtest/signer.go View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
Vadim Sh.
Still need to write tests. Also depends on https://github.com/luci/luci-py/commit/6c03cbaa04dd2142326e6c59c9e67f785651e775 being deployed to chrome-infra-auth, or everything ...
4 years, 2 months ago (2016-10-01 04:04:43 UTC) #1
M-A Ruel
lgtm https://codereview.chromium.org/2386643003/diff/1/server/auth/authdb/snapshot.go File server/auth/authdb/snapshot.go (right): https://codereview.chromium.org/2386643003/diff/1/server/auth/authdb/snapshot.go#newcode286 server/auth/authdb/snapshot.go:286: func (db *SnapshotDB) GetCertificates(c context.Context, signerID identity.Identity) (*signing.PublicCertificates, ...
4 years, 2 months ago (2016-10-01 11:18:42 UTC) #2
Vadim Sh.
(still writing tests) https://codereview.chromium.org/2386643003/diff/1/appengine/gaeauth/server/db.go File appengine/gaeauth/server/db.go (right): https://codereview.chromium.org/2386643003/diff/1/appengine/gaeauth/server/db.go#newcode98 appengine/gaeauth/server/db.go:98: func (devServerDB) SharedSecrets(c context.Context) (secrets.Store, error) ...
4 years, 2 months ago (2016-10-03 20:47:12 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2386643003/40001
4 years, 2 months ago (2016-10-03 22:34:14 UTC) #6
commit-bot: I haz the power
4 years, 2 months ago (2016-10-03 23:14:26 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://github.com/luci/luci-go/commit/59df90e41b87f38d73e5dde2baa0ed5ba139fe0c

Powered by Google App Engine
This is Rietveld 408576698