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

Side by Side Diff: tokenserver/appengine/impl/services/admin/adminsrv/service.go

Issue 2785973002: token-server: Add protos for new API for generating service account tokens. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 // Package adminsrv implements Admin API. 5 // Package adminsrv implements Admin API.
6 // 6 //
7 // Code defined here is either invoked by an administrator or by the service 7 // Code defined here is either invoked by an administrator or by the service
8 // itself (via cron jobs or task queues). 8 // itself (via cron jobs or task queues).
9 package adminsrv 9 package adminsrv
10 10
11 import ( 11 import (
12 "github.com/luci/luci-go/appengine/gaeauth/server/gaesigner" 12 "github.com/luci/luci-go/appengine/gaeauth/server/gaesigner"
13 13
14 "github.com/luci/luci-go/tokenserver/appengine/impl/certconfig" 14 "github.com/luci/luci-go/tokenserver/appengine/impl/certconfig"
15 "github.com/luci/luci-go/tokenserver/appengine/impl/delegation" 15 "github.com/luci/luci-go/tokenserver/appengine/impl/delegation"
16 "github.com/luci/luci-go/tokenserver/appengine/impl/machinetoken" 16 "github.com/luci/luci-go/tokenserver/appengine/impl/machinetoken"
17 "github.com/luci/luci-go/tokenserver/appengine/impl/serviceaccounts"
17 18
18 "github.com/luci/luci-go/tokenserver/api/admin/v1" 19 "github.com/luci/luci-go/tokenserver/api/admin/v1"
19 ) 20 )
20 21
21 // serverImpl implements admin.AdminServer RPC interface. 22 // serverImpl implements admin.AdminServer RPC interface.
22 type serverImpl struct { 23 type serverImpl struct {
23 certconfig.ImportCAConfigsRPC 24 certconfig.ImportCAConfigsRPC
24 delegation.ImportDelegationConfigsRPC 25 delegation.ImportDelegationConfigsRPC
26 serviceaccounts.ImportServiceAccountsConfigsRPC
25 machinetoken.InspectMachineTokenRPC 27 machinetoken.InspectMachineTokenRPC
26 delegation.InspectDelegationTokenRPC 28 delegation.InspectDelegationTokenRPC
29 serviceaccounts.InspectOAuthTokenGrantRPC
27 } 30 }
28 31
29 // NewServer returns prod AdminServer implementation. 32 // NewServer returns prod AdminServer implementation.
30 // 33 //
31 // It assumes authorization has happened already. 34 // It assumes authorization has happened already.
32 func NewServer() admin.AdminServer { 35 func NewServer() admin.AdminServer {
33 signer := gaesigner.Signer{} 36 signer := gaesigner.Signer{}
34 return &serverImpl{ 37 return &serverImpl{
35 InspectMachineTokenRPC: machinetoken.InspectMachineTokenRPC{ 38 InspectMachineTokenRPC: machinetoken.InspectMachineTokenRPC{
36 Signer: signer, 39 Signer: signer,
37 }, 40 },
38 InspectDelegationTokenRPC: delegation.InspectDelegationTokenRPC{ 41 InspectDelegationTokenRPC: delegation.InspectDelegationTokenRPC{
39 Signer: signer, 42 Signer: signer,
40 }, 43 },
41 } 44 }
42 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698